diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md
index fc476f67b51b6..8cbe0857154af 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-10-25)
+- 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-2021-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2021-04-20)
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md
index a81755a5f6f36..56bfedeb59067 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-2020-10-20. 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-2021-08-01. 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.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md
new file mode 100644
index 0000000000000..01056a4bf3690
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md
@@ -0,0 +1,2733 @@
+# Code snippets and samples
+
+
+## AnalyticsItems
+
+- [Delete](#analyticsitems_delete)
+- [Get](#analyticsitems_get)
+- [List](#analyticsitems_list)
+- [Put](#analyticsitems_put)
+
+## Annotations
+
+- [Create](#annotations_create)
+- [Delete](#annotations_delete)
+- [Get](#annotations_get)
+- [List](#annotations_list)
+
+## ApiKeys
+
+- [Create](#apikeys_create)
+- [Delete](#apikeys_delete)
+- [Get](#apikeys_get)
+- [List](#apikeys_list)
+
+## ComponentAvailableFeatures
+
+- [Get](#componentavailablefeatures_get)
+
+## ComponentCurrentBillingFeatures
+
+- [Get](#componentcurrentbillingfeatures_get)
+- [Update](#componentcurrentbillingfeatures_update)
+
+## ComponentFeatureCapabilities
+
+- [Get](#componentfeaturecapabilities_get)
+
+## ComponentLinkedStorageAccountsOperation
+
+- [CreateAndUpdate](#componentlinkedstorageaccountsoperation_createandupdate)
+- [Delete](#componentlinkedstorageaccountsoperation_delete)
+- [Get](#componentlinkedstorageaccountsoperation_get)
+- [Update](#componentlinkedstorageaccountsoperation_update)
+
+## ComponentQuotaStatus
+
+- [Get](#componentquotastatus_get)
+
+## Components
+
+- [CreateOrUpdate](#components_createorupdate)
+- [Delete](#components_delete)
+- [GetByResourceGroup](#components_getbyresourcegroup)
+- [GetPurgeStatus](#components_getpurgestatus)
+- [List](#components_list)
+- [ListByResourceGroup](#components_listbyresourcegroup)
+- [Purge](#components_purge)
+- [UpdateTags](#components_updatetags)
+
+## ExportConfigurations
+
+- [Create](#exportconfigurations_create)
+- [Delete](#exportconfigurations_delete)
+- [Get](#exportconfigurations_get)
+- [List](#exportconfigurations_list)
+- [Update](#exportconfigurations_update)
+
+## Favorites
+
+- [Add](#favorites_add)
+- [Delete](#favorites_delete)
+- [Get](#favorites_get)
+- [List](#favorites_list)
+- [Update](#favorites_update)
+
+## LiveToken
+
+- [Get](#livetoken_get)
+
+## MyWorkbooks
+
+- [CreateOrUpdate](#myworkbooks_createorupdate)
+- [Delete](#myworkbooks_delete)
+- [GetByResourceGroup](#myworkbooks_getbyresourcegroup)
+- [List](#myworkbooks_list)
+- [ListByResourceGroup](#myworkbooks_listbyresourcegroup)
+- [Update](#myworkbooks_update)
+
+## Operations
+
+- [List](#operations_list)
+
+## ProactiveDetectionConfigurations
+
+- [Get](#proactivedetectionconfigurations_get)
+- [List](#proactivedetectionconfigurations_list)
+- [Update](#proactivedetectionconfigurations_update)
+
+## WebTestLocations
+
+- [List](#webtestlocations_list)
+
+## WebTests
+
+- [CreateOrUpdate](#webtests_createorupdate)
+- [Delete](#webtests_delete)
+- [GetByResourceGroup](#webtests_getbyresourcegroup)
+- [List](#webtests_list)
+- [ListByComponent](#webtests_listbycomponent)
+- [ListByResourceGroup](#webtests_listbyresourcegroup)
+- [UpdateTags](#webtests_updatetags)
+
+## WorkItemConfigurations
+
+- [Create](#workitemconfigurations_create)
+- [Delete](#workitemconfigurations_delete)
+- [GetDefault](#workitemconfigurations_getdefault)
+- [GetItem](#workitemconfigurations_getitem)
+- [List](#workitemconfigurations_list)
+- [UpdateItem](#workitemconfigurations_updateitem)
+
+## WorkbookTemplates
+
+- [CreateOrUpdate](#workbooktemplates_createorupdate)
+- [Delete](#workbooktemplates_delete)
+- [GetByResourceGroup](#workbooktemplates_getbyresourcegroup)
+- [ListByResourceGroup](#workbooktemplates_listbyresourcegroup)
+- [Update](#workbooktemplates_update)
+
+## Workbooks
+
+- [CreateOrUpdate](#workbooks_createorupdate)
+- [Delete](#workbooks_delete)
+- [GetByResourceGroup](#workbooks_getbyresourcegroup)
+- [List](#workbooks_list)
+- [ListByResourceGroup](#workbooks_listbyresourcegroup)
+- [RevisionGet](#workbooks_revisionget)
+- [RevisionsList](#workbooks_revisionslist)
+- [Update](#workbooks_update)
+### AnalyticsItems_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.ItemScopePath;
+
+/** Samples for AnalyticsItems Delete. */
+public final class AnalyticsItemsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemDelete.json
+ */
+ /**
+ * Sample code: AnalyticsItemDelete.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void analyticsItemDelete(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .analyticsItems()
+ .deleteWithResponse(
+ "my-resource-group",
+ "my-component",
+ ItemScopePath.ANALYTICS_ITEMS,
+ "3466c160-4a10-4df8-afdf-0007f3f6dee5",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### AnalyticsItems_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.ItemScopePath;
+
+/** Samples for AnalyticsItems Get. */
+public final class AnalyticsItemsGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemGet.json
+ */
+ /**
+ * Sample code: AnalyticsItemGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void analyticsItemGet(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .analyticsItems()
+ .getWithResponse(
+ "my-resource-group",
+ "my-component",
+ ItemScopePath.ANALYTICS_ITEMS,
+ "3466c160-4a10-4df8-afdf-0007f3f6dee5",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### AnalyticsItems_List
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.ItemScopePath;
+
+/** Samples for AnalyticsItems List. */
+public final class AnalyticsItemsListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemList.json
+ */
+ /**
+ * Sample code: AnalyticsItemList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void analyticsItemList(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .analyticsItems()
+ .listWithResponse(
+ "my-resource-group", "my-component", ItemScopePath.ANALYTICS_ITEMS, null, null, null, Context.NONE);
+ }
+}
+```
+
+### 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;
+import com.azure.resourcemanager.applicationinsights.models.ItemType;
+
+/** Samples for AnalyticsItems Put. */
+public final class AnalyticsItemsPutSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemPut.json
+ */
+ /**
+ * Sample code: AnalyticsItemPut.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void analyticsItemPut(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .analyticsItems()
+ .putWithResponse(
+ "my-resource-group",
+ "my-component",
+ ItemScopePath.ANALYTICS_ITEMS,
+ new ApplicationInsightsComponentAnalyticsItemInner()
+ .withName("Exceptions - New in the last 24 hours")
+ .withContent(
+ "let newExceptionsTimeRange = 1d;\n"
+ + "let timeRangeToCheckBefore = 7d;\n"
+ + "exceptions\n"
+ + "| where timestamp < ago(timeRangeToCheckBefore)\n"
+ + "| summarize count() by problemId\n"
+ + "| join kind= rightanti (\n"
+ + "exceptions\n"
+ + "| where timestamp >= ago(newExceptionsTimeRange)\n"
+ + "| extend stack = tostring(details[0].rawStack)\n"
+ + "| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp),"
+ + " any(stack) by problemId \n"
+ + ") on problemId \n"
+ + "| order by count_ desc\n")
+ .withScope(ItemScope.SHARED)
+ .withType(ItemType.QUERY),
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### Annotations_Create
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner;
+import java.time.OffsetDateTime;
+
+/** Samples for Annotations Create. */
+public final class AnnotationsCreateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsCreate.json
+ */
+ /**
+ * Sample code: AnnotationsCreate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void annotationsCreate(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .annotations()
+ .createWithResponse(
+ "my-resource-group",
+ "my-component",
+ new AnnotationInner()
+ .withAnnotationName("TestAnnotation")
+ .withCategory("Text")
+ .withEventTime(OffsetDateTime.parse("2018-01-31T13:41:38.657Z"))
+ .withId("444e2c08-274a-4bbb-a89e-d77bb720f44a")
+ .withProperties("{\"Comments\":\"Testing\",\"Label\":\"Success\"}"),
+ Context.NONE);
+ }
+}
+```
+
+### Annotations_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Annotations Delete. */
+public final class AnnotationsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsDelete.json
+ */
+ /**
+ * Sample code: AnnotationsDelete.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void annotationsDelete(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .annotations()
+ .deleteWithResponse(
+ "my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", Context.NONE);
+ }
+}
+```
+
+### Annotations_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Annotations Get. */
+public final class AnnotationsGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsGet.json
+ */
+ /**
+ * Sample code: AnnotationsGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ 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);
+ }
+}
+```
+
+### Annotations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Annotations List. */
+public final class AnnotationsListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsList.json
+ */
+ /**
+ * Sample code: AnnotationsList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void annotationsList(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .annotations()
+ .list(
+ "my-resource-group",
+ "my-component",
+ "2018-02-05T00%253A30%253A00.000Z",
+ "2018-02-06T00%253A33A00.000Z",
+ Context.NONE);
+ }
+}
+```
+
+### ApiKeys_Create
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest;
+import java.util.Arrays;
+
+/** Samples for ApiKeys Create. */
+public final class ApiKeysCreateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysCreate.json
+ */
+ /**
+ * Sample code: APIKeyCreate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void aPIKeyCreate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .apiKeys()
+ .createWithResponse(
+ "my-resource-group",
+ "my-component",
+ new ApiKeyRequest()
+ .withName("test2")
+ .withLinkedReadProperties(
+ Arrays
+ .asList(
+ "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/api",
+ "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/agentconfig"))
+ .withLinkedWriteProperties(
+ Arrays
+ .asList(
+ "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/annotations")),
+ Context.NONE);
+ }
+}
+```
+
+### ApiKeys_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ApiKeys Delete. */
+public final class ApiKeysDeleteSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysDelete.json
+ */
+ /**
+ * Sample code: APIKeyDelete.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void aPIKeyDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .apiKeys()
+ .deleteWithResponse(
+ "my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", Context.NONE);
+ }
+}
+```
+
+### ApiKeys_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ApiKeys Get. */
+public final class ApiKeysGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysGet.json
+ */
+ /**
+ * Sample code: APIKeysGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ 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);
+ }
+}
+```
+
+### ApiKeys_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ApiKeys List. */
+public final class ApiKeysListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysList.json
+ */
+ /**
+ * Sample code: APIKeysList.
+ *
+ * @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);
+ }
+}
+```
+
+### ComponentAvailableFeatures_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ComponentAvailableFeatures Get. */
+public final class ComponentAvailableFeaturesGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AvailableBillingFeaturesGet.json
+ */
+ /**
+ * Sample code: ComponentCurrentBillingFeaturesGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentCurrentBillingFeaturesGet(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.componentAvailableFeatures().getWithResponse("my-resource-group", "my-component", Context.NONE);
+ }
+}
+```
+
+### ComponentCurrentBillingFeatures_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ComponentCurrentBillingFeatures Get. */
+public final class ComponentCurrentBillingFeaturesGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesGet.json
+ */
+ /**
+ * Sample code: ComponentCurrentBillingFeaturesGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentCurrentBillingFeaturesGet(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.componentCurrentBillingFeatures().getWithResponse("my-resource-group", "my-component", Context.NONE);
+ }
+}
+```
+
+### 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;
+
+/** Samples for ComponentCurrentBillingFeatures Update. */
+public final class ComponentCurrentBillingFeaturesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesUpdate.json
+ */
+ /**
+ * Sample code: ComponentCurrentBillingFeaturesUpdate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentCurrentBillingFeaturesUpdate(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .componentCurrentBillingFeatures()
+ .updateWithResponse(
+ "my-resource-group",
+ "my-component",
+ new ApplicationInsightsComponentBillingFeaturesInner()
+ .withDataVolumeCap(
+ new ApplicationInsightsComponentDataVolumeCap()
+ .withCap(100.0f)
+ .withStopSendNotificationWhenHitCap(true))
+ .withCurrentBillingFeatures(Arrays.asList("Basic", "Application Insights Enterprise")),
+ Context.NONE);
+ }
+}
+```
+
+### ComponentFeatureCapabilities_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ComponentFeatureCapabilities Get. */
+public final class ComponentFeatureCapabilitiesGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FeatureCapabilitiesGet.json
+ */
+ /**
+ * Sample code: ComponentCurrentBillingFeaturesGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentCurrentBillingFeaturesGet(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.componentFeatureCapabilities().getWithResponse("my-resource-group", "my-component", Context.NONE);
+ }
+}
+```
+
+### ComponentLinkedStorageAccountsOperation_CreateAndUpdate
+
+```java
+import com.azure.resourcemanager.applicationinsights.models.StorageType;
+
+/** Samples for ComponentLinkedStorageAccountsOperation CreateAndUpdate. */
+public final class ComponentLinkedStorageAccountsOperationCreateAndUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.json
+ */
+ /**
+ * Sample code: ComponentLinkedStorageAccountsCreateAndUpdate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentLinkedStorageAccountsCreateAndUpdate(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .componentLinkedStorageAccountsOperations()
+ .define(StorageType.SERVICE_PROFILER)
+ .withExistingComponent("someResourceGroupName", "myComponent")
+ .withLinkedStorageAccount(
+ "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname")
+ .create();
+ }
+}
+```
+
+### ComponentLinkedStorageAccountsOperation_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.StorageType;
+
+/** Samples for ComponentLinkedStorageAccountsOperation Delete. */
+public final class ComponentLinkedStorageAccountsOperationDeleteSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json
+ */
+ /**
+ * Sample code: ComponentLinkedStorageAccountsDelete.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentLinkedStorageAccountsDelete(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .componentLinkedStorageAccountsOperations()
+ .deleteWithResponse("someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, Context.NONE);
+ }
+}
+```
+
+### ComponentLinkedStorageAccountsOperation_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.StorageType;
+
+/** Samples for ComponentLinkedStorageAccountsOperation Get. */
+public final class ComponentLinkedStorageAccountsOperationGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json
+ */
+ /**
+ * Sample code: ComponentLinkedStorageAccountsGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentLinkedStorageAccountsGet(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .componentLinkedStorageAccountsOperations()
+ .getWithResponse("someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, Context.NONE);
+ }
+}
+```
+
+### ComponentLinkedStorageAccountsOperation_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts;
+import com.azure.resourcemanager.applicationinsights.models.StorageType;
+
+/** Samples for ComponentLinkedStorageAccountsOperation Update. */
+public final class ComponentLinkedStorageAccountsOperationUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.json
+ */
+ /**
+ * Sample code: ComponentLinkedStorageAccountsUpdate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentLinkedStorageAccountsUpdate(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ ComponentLinkedStorageAccounts resource =
+ manager
+ .componentLinkedStorageAccountsOperations()
+ .getWithResponse("someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withLinkedStorageAccount(
+ "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname")
+ .apply();
+ }
+}
+```
+
+### ComponentQuotaStatus_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ComponentQuotaStatus Get. */
+public final class ComponentQuotaStatusGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/QuotaStatusGet.json
+ */
+ /**
+ * Sample code: ComponentCurrentBillingFeaturesGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentCurrentBillingFeaturesGet(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.componentQuotaStatus().getWithResponse("my-resource-group", "my-component", Context.NONE);
+ }
+}
+```
+
+### Components_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.applicationinsights.models.ApplicationType;
+import com.azure.resourcemanager.applicationinsights.models.FlowType;
+import com.azure.resourcemanager.applicationinsights.models.RequestSource;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Components CreateOrUpdate. */
+public final class ComponentsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01-preview/examples/ComponentsCreate.json
+ */
+ /**
+ * Sample code: ComponentCreate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentCreate(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .components()
+ .define("my-component")
+ .withRegion("South Central US")
+ .withExistingResourceGroup("my-resource-group")
+ .withKind("web")
+ .withApplicationType(ApplicationType.WEB)
+ .withFlowType(FlowType.BLUEFIELD)
+ .withRequestSource(RequestSource.REST)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01-preview/examples/ComponentsUpdate.json
+ */
+ /**
+ * Sample code: ComponentUpdate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentUpdate(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .components()
+ .define("my-component")
+ .withRegion("South Central US")
+ .withExistingResourceGroup("my-resource-group")
+ .withKind("web")
+ .withTags(mapOf("ApplicationGatewayType", "Internal-Only", "BillingEntity", "Self"))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Components_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Components Delete. */
+public final class ComponentsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01-preview/examples/ComponentsDelete.json
+ */
+ /**
+ * Sample code: ComponentsDelete.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentsDelete(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.components().deleteWithResponse("my-resource-group", "my-component", Context.NONE);
+ }
+}
+```
+
+### Components_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Components GetByResourceGroup. */
+public final class ComponentsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01-preview/examples/ComponentsGet.json
+ */
+ /**
+ * Sample code: ComponentGet.
+ *
+ * @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);
+ }
+}
+```
+
+### Components_GetPurgeStatus
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Components GetPurgeStatus. */
+public final class ComponentsGetPurgeStatusSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01-preview/examples/ComponentsPurgeStatus.json
+ */
+ /**
+ * Sample code: ComponentPurge.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentPurge(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .components()
+ .getPurgeStatusWithResponse(
+ "OIAutoRest5123", "aztest5048", "purge-970318e7-b859-4edb-8903-83b1b54d0b74", Context.NONE);
+ }
+}
+```
+
+### Components_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Components List. */
+public final class ComponentsListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01-preview/examples/ComponentsList.json
+ */
+ /**
+ * Sample code: ComponentsList.json.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentsListJson(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.components().list(Context.NONE);
+ }
+}
+```
+
+### Components_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Components ListByResourceGroup. */
+public final class ComponentsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01-preview/examples/ComponentsListByResourceGroup.json
+ */
+ /**
+ * Sample code: ComponentListByResourceGroup.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentListByResourceGroup(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.components().listByResourceGroup("my-resource-group", Context.NONE);
+ }
+}
+```
+
+### 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;
+
+/** Samples for Components Purge. */
+public final class ComponentsPurgeSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01-preview/examples/ComponentsPurge.json
+ */
+ /**
+ * Sample code: ComponentPurge.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentPurge(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .components()
+ .purgeWithResponse(
+ "OIAutoRest5123",
+ "aztest5048",
+ new ComponentPurgeBody()
+ .withTable("Heartbeat")
+ .withFilters(
+ Arrays
+ .asList(
+ new ComponentPurgeBodyFilters()
+ .withColumn("TimeGenerated")
+ .withOperator(">")
+ .withValue("2017-09-01T00:00:00"))),
+ Context.NONE);
+ }
+}
+```
+
+### Components_UpdateTags
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponent;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Components UpdateTags. */
+public final class ComponentsUpdateTagsSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01-preview/examples/ComponentsUpdateTagsOnly.json
+ */
+ /**
+ * Sample code: ComponentUpdateTagsOnly.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void componentUpdateTagsOnly(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ ApplicationInsightsComponent resource =
+ manager
+ .components()
+ .getByResourceGroupWithResponse("my-resource-group", "my-component", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(
+ mapOf(
+ "ApplicationGatewayType",
+ "Internal-Only",
+ "BillingEntity",
+ "Self",
+ "Color",
+ "AzureBlue",
+ "CustomField_01",
+ "Custom text in some random field named randomly",
+ "NodeType",
+ "Edge"))
+ .apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ExportConfigurations_Create
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest;
+
+/** Samples for ExportConfigurations Create. */
+public final class ExportConfigurationsCreateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsPost.json
+ */
+ /**
+ * Sample code: ExportConfigurationPost.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void exportConfigurationPost(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .exportConfigurations()
+ .createWithResponse(
+ "my-resource-group",
+ "my-component",
+ new ApplicationInsightsComponentExportRequest()
+ .withRecordTypes(
+ "Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd,"
+ + " PerformanceCounters, Availability")
+ .withDestinationType("Blob")
+ .withDestinationAddress(
+ "https://mystorageblob.blob.core.windows.net/testexport?sv=2015-04-05&sr=c&sig=token")
+ .withIsEnabled("true")
+ .withNotificationQueueEnabled("false")
+ .withNotificationQueueUri("")
+ .withDestinationStorageSubscriptionId("subid")
+ .withDestinationStorageLocationId("eastus")
+ .withDestinationAccountId(
+ "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"),
+ Context.NONE);
+ }
+}
+```
+
+### ExportConfigurations_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ExportConfigurations Delete. */
+public final class ExportConfigurationsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationDelete.json
+ */
+ /**
+ * Sample code: ExportConfigurationDelete.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void exportConfigurationDelete(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .exportConfigurations()
+ .deleteWithResponse("my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", Context.NONE);
+ }
+}
+```
+
+### ExportConfigurations_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ExportConfigurations Get. */
+public final class ExportConfigurationsGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationGet.json
+ */
+ /**
+ * Sample code: ExportConfigurationGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void exportConfigurationGet(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .exportConfigurations()
+ .getWithResponse("my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", Context.NONE);
+ }
+}
+```
+
+### ExportConfigurations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ExportConfigurations List. */
+public final class ExportConfigurationsListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsList.json
+ */
+ /**
+ * Sample code: ExportConfigurationsList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void exportConfigurationsList(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.exportConfigurations().listWithResponse("my-resource-group", "my-component", Context.NONE);
+ }
+}
+```
+
+### ExportConfigurations_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest;
+
+/** Samples for ExportConfigurations Update. */
+public final class ExportConfigurationsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationUpdate.json
+ */
+ /**
+ * Sample code: ExportConfigurationUpdate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void exportConfigurationUpdate(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .exportConfigurations()
+ .updateWithResponse(
+ "my-resource-group",
+ "my-component",
+ "uGOoki0jQsyEs3IdQ83Q4QsNr4=",
+ new ApplicationInsightsComponentExportRequest()
+ .withRecordTypes(
+ "Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd,"
+ + " PerformanceCounters, Availability")
+ .withDestinationType("Blob")
+ .withDestinationAddress(
+ "https://mystorageblob.blob.core.windows.net/fchentest?sv=2015-04-05&sr=c&sig=token")
+ .withIsEnabled("true")
+ .withNotificationQueueEnabled("false")
+ .withNotificationQueueUri("")
+ .withDestinationStorageSubscriptionId("subid")
+ .withDestinationStorageLocationId("eastus")
+ .withDestinationAccountId(
+ "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"),
+ Context.NONE);
+ }
+}
+```
+
+### 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;
+
+/** Samples for Favorites Add. */
+public final class FavoritesAddSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteAdd.json
+ */
+ /**
+ * Sample code: FavoriteAdd.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void favoriteAdd(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .favorites()
+ .addWithResponse(
+ "my-resource-group",
+ "my-ai-component",
+ "deadb33f-8bee-4d3b-a059-9be8dac93960",
+ new ApplicationInsightsComponentFavoriteInner()
+ .withName("Blah Blah Blah")
+ .withConfig(
+ "{\"MEDataModelRawJSON\":\"{\\n"
+ + " \\\"version\\\": \\\"1.4.1\\\",\\n"
+ + " \\\"isCustomDataModel\\\": true,\\n"
+ + " \\\"items\\\": [\\n"
+ + " {\\n"
+ + " \\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\n"
+ + " \\\"chartType\\\": \\\"Area\\\",\\n"
+ + " \\\"chartHeight\\\": 4,\\n"
+ + " \\\"metrics\\\": [\\n"
+ + " {\\n"
+ + " \\\"id\\\": \\\"preview/requests/count\\\",\\n"
+ + " \\\"metricAggregation\\\": \\\"Sum\\\",\\n"
+ + " \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n"
+ + " }\\n"
+ + " ],\\n"
+ + " \\\"priorPeriod\\\": false,\\n"
+ + " \\\"clickAction\\\": {\\n"
+ + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n"
+ + " },\\n"
+ + " \\\"horizontalBars\\\": true,\\n"
+ + " \\\"showOther\\\": true,\\n"
+ + " \\\"aggregation\\\": \\\"Sum\\\",\\n"
+ + " \\\"percentage\\\": false,\\n"
+ + " \\\"palette\\\": \\\"fail\\\",\\n"
+ + " \\\"yAxisOption\\\": 0,\\n"
+ + " \\\"title\\\": \\\"\\\"\\n"
+ + " },\\n"
+ + " {\\n"
+ + " \\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\n"
+ + " \\\"chartType\\\": \\\"Area\\\",\\n"
+ + " \\\"chartHeight\\\": 2,\\n"
+ + " \\\"metrics\\\": [\\n"
+ + " {\\n"
+ + " \\\"id\\\": \\\"preview/requests/duration\\\",\\n"
+ + " \\\"metricAggregation\\\": \\\"Avg\\\",\\n"
+ + " \\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"\\n"
+ + " }\\n"
+ + " ],\\n"
+ + " \\\"priorPeriod\\\": false,\\n"
+ + " \\\"clickAction\\\": {\\n"
+ + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n"
+ + " },\\n"
+ + " \\\"horizontalBars\\\": true,\\n"
+ + " \\\"showOther\\\": true,\\n"
+ + " \\\"aggregation\\\": \\\"Avg\\\",\\n"
+ + " \\\"percentage\\\": false,\\n"
+ + " \\\"palette\\\": \\\"greenHues\\\",\\n"
+ + " \\\"yAxisOption\\\": 0,\\n"
+ + " \\\"title\\\": \\\"\\\"\\n"
+ + " },\\n"
+ + " {\\n"
+ + " \\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\n"
+ + " \\\"chartType\\\": \\\"Bar\\\",\\n"
+ + " \\\"chartHeight\\\": 4,\\n"
+ + " \\\"metrics\\\": [\\n"
+ + " {\\n"
+ + " \\\"id\\\": \\\"preview/requests/duration\\\",\\n"
+ + " \\\"metricAggregation\\\": \\\"Avg\\\",\\n"
+ + " \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n"
+ + " }\\n"
+ + " ],\\n"
+ + " \\\"priorPeriod\\\": false,\\n"
+ + " \\\"clickAction\\\": {\\n"
+ + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n"
+ + " },\\n"
+ + " \\\"horizontalBars\\\": true,\\n"
+ + " \\\"showOther\\\": true,\\n"
+ + " \\\"aggregation\\\": \\\"Avg\\\",\\n"
+ + " \\\"percentage\\\": false,\\n"
+ + " \\\"palette\\\": \\\"magentaHues\\\",\\n"
+ + " \\\"yAxisOption\\\": 0,\\n"
+ + " \\\"title\\\": \\\"\\\"\\n"
+ + " },\\n"
+ + " {\\n"
+ + " \\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\n"
+ + " \\\"grouping\\\": {\\n"
+ + " \\\"kind\\\": \\\"ByDimension\\\",\\n"
+ + " \\\"dimension\\\": \\\"context.application.version\\\"\\n"
+ + " },\\n"
+ + " \\\"chartType\\\": \\\"Grid\\\",\\n"
+ + " \\\"chartHeight\\\": 1,\\n"
+ + " \\\"metrics\\\": [\\n"
+ + " {\\n"
+ + " \\\"id\\\": \\\"basicException.count\\\",\\n"
+ + " \\\"metricAggregation\\\": \\\"Sum\\\",\\n"
+ + " \\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"\\n"
+ + " },\\n"
+ + " {\\n"
+ + " \\\"id\\\": \\\"requestFailed.count\\\",\\n"
+ + " \\\"metricAggregation\\\": \\\"Sum\\\",\\n"
+ + " \\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"\\n"
+ + " }\\n"
+ + " ],\\n"
+ + " \\\"priorPeriod\\\": true,\\n"
+ + " \\\"clickAction\\\": {\\n"
+ + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n"
+ + " },\\n"
+ + " \\\"horizontalBars\\\": true,\\n"
+ + " \\\"showOther\\\": true,\\n"
+ + " \\\"percentage\\\": false,\\n"
+ + " \\\"palette\\\": \\\"blueHues\\\",\\n"
+ + " \\\"yAxisOption\\\": 0,\\n"
+ + " \\\"title\\\": \\\"\\\"\\n"
+ + " }\\n"
+ + " ],\\n"
+ + " \\\"currentFilter\\\": {\\n"
+ + " \\\"eventTypes\\\": [\\n"
+ + " 1,\\n"
+ + " 2\\n"
+ + " ],\\n"
+ + " \\\"typeFacets\\\": {},\\n"
+ + " \\\"isPermissive\\\": false\\n"
+ + " },\\n"
+ + " \\\"timeContext\\\": {\\n"
+ + " \\\"durationMs\\\": 75600000,\\n"
+ + " \\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\n"
+ + " \\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\n"
+ + " \\\"isInitialTime\\\": false,\\n"
+ + " \\\"grain\\\": 1,\\n"
+ + " \\\"useDashboardTimeRange\\\": false\\n"
+ + " },\\n"
+ + " \\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\n"
+ + " \\\"timeSource\\\": 0\\n"
+ + "}\"}")
+ .withVersion("ME")
+ .withFavoriteType(FavoriteType.SHARED)
+ .withTags(Arrays.asList("TagSample01", "TagSample02"))
+ .withIsGeneratedFromTemplate(false),
+ Context.NONE);
+ }
+}
+```
+
+### Favorites_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Favorites Delete. */
+public final class FavoritesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteDelete.json
+ */
+ /**
+ * Sample code: FavoriteList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void favoriteList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .favorites()
+ .deleteWithResponse(
+ "my-resource-group", "my-ai-component", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
+ }
+}
+```
+
+### Favorites_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Favorites Get. */
+public final class FavoritesGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteGet.json
+ */
+ /**
+ * Sample code: FavoriteGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void favoriteGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .favorites()
+ .getWithResponse(
+ "my-resource-group", "my-ai-component", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
+ }
+}
+```
+
+### Favorites_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Favorites List. */
+public final class FavoritesListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoritesList.json
+ */
+ /**
+ * Sample code: FavoritesList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ 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);
+ }
+}
+```
+
+### 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;
+
+/** Samples for Favorites Update. */
+public final class FavoritesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteUpdate.json
+ */
+ /**
+ * Sample code: FavoriteList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void favoriteList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .favorites()
+ .updateWithResponse(
+ "my-resource-group",
+ "my-ai-component",
+ "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
+ new ApplicationInsightsComponentFavoriteInner()
+ .withName("Derek Changed This")
+ .withConfig(
+ "{\"MEDataModelRawJSON\":\"{\\\"version\\\": \\\"1.4.1\\\",\\\"isCustomDataModel\\\":"
+ + " true,\\\"items\\\": [{\\\"id\\\":"
+ + " \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\\"chartType\\\":"
+ + " \\\"Area\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\":"
+ + " \\\"preview/requests/count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\":"
+ + " \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\":"
+ + " {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\":"
+ + " true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Sum\\\",\\\"percentage\\\":"
+ + " false,\\\"palette\\\": \\\"fail\\\",\\\"yAxisOption\\\": 0,\\\"title\\\":"
+ + " \\\"\\\"},{\\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\\"chartType\\\":"
+ + " \\\"Area\\\",\\\"chartHeight\\\": 2,\\\"metrics\\\": [{\\\"id\\\":"
+ + " \\\"preview/requests/duration\\\",\\\"metricAggregation\\\":"
+ + " \\\"Avg\\\",\\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"}],\\\"priorPeriod\\\":"
+ + " false,\\\"clickAction\\\": {\\\"defaultBlade\\\":"
+ + " \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\":"
+ + " true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\": false,\\\"palette\\\":"
+ + " \\\"greenHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"},{\\\"id\\\":"
+ + " \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\\"chartType\\\":"
+ + " \\\"Bar\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\":"
+ + " \\\"preview/requests/duration\\\",\\\"metricAggregation\\\":"
+ + " \\\"Avg\\\",\\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\":"
+ + " false,\\\"clickAction\\\": {\\\"defaultBlade\\\":"
+ + " \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\":"
+ + " true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\": false,\\\"palette\\\":"
+ + " \\\"magentaHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"},{\\\"id\\\":"
+ + " \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\\"grouping\\\": {\\\"kind\\\":"
+ + " \\\"ByDimension\\\",\\\"dimension\\\":"
+ + " \\\"context.application.version\\\"},\\\"chartType\\\":"
+ + " \\\"Grid\\\",\\\"chartHeight\\\": 1,\\\"metrics\\\": [{\\\"id\\\":"
+ + " \\\"basicException.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\":"
+ + " \\\"msportalfx-bgcolor-g0\\\"},{\\\"id\\\":"
+ + " \\\"requestFailed.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\":"
+ + " \\\"msportalfx-bgcolor-f0s2\\\"}],\\\"priorPeriod\\\": true,\\\"clickAction\\\":"
+ + " {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\":"
+ + " true,\\\"showOther\\\": true,\\\"percentage\\\": false,\\\"palette\\\":"
+ + " \\\"blueHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\":"
+ + " \\\"\\\"}],\\\"currentFilter\\\": {\\\"eventTypes\\\": [1,2],\\\"typeFacets\\\":"
+ + " {},\\\"isPermissive\\\": false},\\\"timeContext\\\": {\\\"durationMs\\\":"
+ + " 75600000,\\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\\"createdTime\\\":"
+ + " \\\"2018-01-31T23:54:26.280Z\\\",\\\"isInitialTime\\\": false,\\\"grain\\\":"
+ + " 1,\\\"useDashboardTimeRange\\\": false},\\\"jsonUri\\\":"
+ + " \\\"Favorite_BlankChart\\\",\\\"timeSource\\\": 0}\"}")
+ .withVersion("ME")
+ .withFavoriteType(FavoriteType.SHARED)
+ .withTags(Arrays.asList("TagSample01", "TagSample02", "TagSample03"))
+ .withIsGeneratedFromTemplate(false),
+ Context.NONE);
+ }
+}
+```
+
+### LiveToken_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LiveToken Get. */
+public final class LiveTokenGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-06-02-preview/examples/LiveTokenGet.json
+ */
+ /**
+ * Sample code: Get live token for resource.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void getLiveTokenForResource(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .liveTokens()
+ .getWithResponse(
+ "subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/FabrikamFiberApp/providers/microsoft.insights/components/CustomAvailabilityTest/providers/microsoft.insights/generatelivetoken",
+ Context.NONE);
+ }
+}
+```
+
+### MyWorkbooks_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.applicationinsights.models.Kind;
+import java.util.Map;
+
+/**
+ * Samples for MyWorkbooks CreateOrUpdate.
+ */
+public final class MyWorkbooksCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookAdd.json
+ */
+ /**
+ * Sample code: WorkbookAdd.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookAdd(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.myWorkbooks().define("deadb33f-8bee-4d3b-a059-9be8dac93960").withRegion("west us").withExistingResourceGroup("my-resource-group").withTags([TagSample01, TagSample02]).withName("deadb33f-8bee-4d3b-a059-9be8dac93960").withKind(Kind.USER).withDisplayName("Blah Blah Blah").withSerializedData("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}").withCategory("workbook").withSourceId("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens").create();
+ }
+}
+```
+
+### MyWorkbooks_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MyWorkbooks Delete. */
+public final class MyWorkbooksDeleteSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookDelete.json
+ */
+ /**
+ * Sample code: WorkbookDelete.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookDelete(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .myWorkbooks()
+ .deleteWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
+ }
+}
+```
+
+### MyWorkbooks_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MyWorkbooks GetByResourceGroup. */
+public final class MyWorkbooksGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookGet.json
+ */
+ /**
+ * Sample code: WorkbookGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .myWorkbooks()
+ .getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
+ }
+}
+```
+
+### MyWorkbooks_List
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.CategoryType;
+
+/** Samples for MyWorkbooks List. */
+public final class MyWorkbooksListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList.json
+ */
+ /**
+ * Sample code: WorkbooksList.
+ *
+ * @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);
+ }
+
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList2.json
+ */
+ /**
+ * Sample code: WorkbooksList2.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbooksList2(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE);
+ }
+}
+```
+
+### MyWorkbooks_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.CategoryType;
+
+/** Samples for MyWorkbooks ListByResourceGroup. */
+public final class MyWorkbooksListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList.json
+ */
+ /**
+ * Sample code: WorkbooksList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbooksList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .myWorkbooks()
+ .listByResourceGroup("my-resource-group", CategoryType.WORKBOOK, null, null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList2.json
+ */
+ /**
+ * Sample code: WorkbooksList2.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbooksList2(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .myWorkbooks()
+ .listByResourceGroup("my-resource-group", CategoryType.WORKBOOK, null, null, null, Context.NONE);
+ }
+}
+```
+
+### MyWorkbooks_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.Kind;
+import com.azure.resourcemanager.applicationinsights.models.MyWorkbook;
+import java.util.Map;
+
+/**
+ * Samples for MyWorkbooks Update.
+ */
+public final class MyWorkbooksUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookUpdate.json
+ */
+ /**
+ * Sample code: WorkbookUpdate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookUpdate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ MyWorkbook resource = manager.myWorkbooks().getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE).getValue();
+ resource.update().withTags([TagSample01, TagSample02]).withKind(Kind.USER).withDisplayName("Blah Blah Blah").withSerializedData("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}").withVersion("ME").withCategory("workbook").withSourceId("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens").apply();
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-06-02-preview/examples/Operations_List.json
+ */
+ /**
+ * Sample code: Operations_List.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void operationsList(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### ProactiveDetectionConfigurations_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProactiveDetectionConfigurations Get. */
+public final class ProactiveDetectionConfigurationsGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationGet.json
+ */
+ /**
+ * Sample code: ProactiveDetectionConfigurationGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void proactiveDetectionConfigurationGet(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .proactiveDetectionConfigurations()
+ .getWithResponse("my-resource-group", "my-component", "slowpageloadtime", Context.NONE);
+ }
+}
+```
+
+### ProactiveDetectionConfigurations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProactiveDetectionConfigurations List. */
+public final class ProactiveDetectionConfigurationsListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationsList.json
+ */
+ /**
+ * Sample code: ProactiveDetectionConfigurationsList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void proactiveDetectionConfigurationsList(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.proactiveDetectionConfigurations().listWithResponse("my-resource-group", "my-component", Context.NONE);
+ }
+}
+```
+
+### 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;
+
+/** Samples for ProactiveDetectionConfigurations Update. */
+public final class ProactiveDetectionConfigurationsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationUpdate.json
+ */
+ /**
+ * Sample code: ProactiveDetectionConfigurationUpdate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void proactiveDetectionConfigurationUpdate(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .proactiveDetectionConfigurations()
+ .updateWithResponse(
+ "my-resource-group",
+ "my-component",
+ "slowpageloadtime",
+ new ApplicationInsightsComponentProactiveDetectionConfigurationInner()
+ .withName("slowpageloadtime")
+ .withEnabled(true)
+ .withSendEmailsToSubscriptionOwners(true)
+ .withCustomEmails(Arrays.asList("foo@microsoft.com", "foo2@microsoft.com"))
+ .withRuleDefinitions(
+ new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions()
+ .withName("slowpageloadtime")
+ .withDisplayName("Slow page load time")
+ .withDescription("Smart Detection rules notify you of performance anomaly issues.")
+ .withHelpUrl(
+ "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics")
+ .withIsHidden(false)
+ .withIsEnabledByDefault(true)
+ .withIsInPreview(false)
+ .withSupportsEmailNotifications(true)),
+ Context.NONE);
+ }
+}
+```
+
+### WebTestLocations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WebTestLocations List. */
+public final class WebTestLocationsListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestLocationsList.json
+ */
+ /**
+ * Sample code: WebTestLocationsList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void webTestLocationsList(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.webTestLocations().list("my-resource-group", "my-component", Context.NONE);
+ }
+}
+```
+
+### WebTests_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation;
+import com.azure.resourcemanager.applicationinsights.models.WebTestKind;
+import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration;
+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
+ */
+ /**
+ * Sample code: webTestCreate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void webTestCreate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .webTests()
+ .define("my-webtest-my-component")
+ .withRegion("South Central US")
+ .withExistingResourceGroup("my-resource-group")
+ .withKind(WebTestKind.PING)
+ .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.PING)
+ .withRetryEnabled(true)
+ .withLocations(Arrays.asList(new WebTestGeolocation().withLocation("us-fl-mia-edge")))
+ .withConfiguration(
+ new WebTestPropertiesConfiguration()
+ .withWebTest(
+ ""))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestUpdate.json
+ */
+ /**
+ * Sample code: webTestUpdate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void webTestUpdate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .webTests()
+ .define("my-webtest-my-component")
+ .withRegion("South Central US")
+ .withExistingResourceGroup("my-resource-group")
+ .withKind(WebTestKind.PING)
+ .withSyntheticMonitorId("my-webtest-my-component")
+ .withWebTestName("my-webtest-my-component")
+ .withFrequency(600)
+ .withTimeout(30)
+ .withWebTestKind(WebTestKind.PING)
+ .withLocations(
+ Arrays
+ .asList(
+ new WebTestGeolocation().withLocation("us-fl-mia-edge"),
+ new WebTestGeolocation().withLocation("apac-hk-hkn-azr")))
+ .withConfiguration(
+ new WebTestPropertiesConfiguration()
+ .withWebTest(
+ ""))
+ .create();
+ }
+}
+```
+
+### 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
+ */
+ /**
+ * Sample code: webTestDelete.
+ *
+ * @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);
+ }
+}
+```
+
+### 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
+ */
+ /**
+ * Sample code: webTestGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void webTestGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .webTests()
+ .getByResourceGroupWithResponse("my-resource-group", "my-webtest-01-mywebservice", Context.NONE);
+ }
+}
+```
+
+### 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
+ */
+ /**
+ * Sample code: webTestList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void webTestList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.webTests().list(Context.NONE);
+ }
+}
+```
+
+### 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
+ */
+ /**
+ * Sample code: webTestListByComponent.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void webTestListByComponent(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.webTests().listByComponent("my-component", "my-resource-group", Context.NONE);
+ }
+}
+```
+
+### 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
+ */
+ /**
+ * Sample code: webTestListByResourceGroup.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void webTestListByResourceGroup(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.webTests().listByResourceGroup("my-resource-group", Context.NONE);
+ }
+}
+```
+
+### WebTests_UpdateTags
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.WebTest;
+import java.util.HashMap;
+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
+ */
+ /**
+ * Sample code: webTestUpdateTags.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void webTestUpdateTags(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ WebTest resource =
+ manager
+ .webTests()
+ .getByResourceGroupWithResponse("my-resource-group", "my-webtest-my-component", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(
+ mapOf(
+ "Color",
+ "AzureBlue",
+ "CustomField-01",
+ "This is a random value",
+ "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();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### WorkItemConfigurations_Create
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration;
+import java.util.Map;
+
+/**
+ * Samples for WorkItemConfigurations Create.
+ */
+public final class WorkItemConfigurationsCreateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigCreate.json
+ */
+ /**
+ * Sample code: WorkItemConfigurationsCreate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workItemConfigurationsCreate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workItemConfigurations().createWithResponse("my-resource-group", "my-component", new WorkItemCreateConfiguration().withConnectorId("d334e2a4-6733-488e-8645-a9fdc1694f41").withConnectorDataConfiguration("{\"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([{name=Title, value=Validate Only Title}, {name=Description, value=Validate Only Description}]), Context.NONE);
+ }
+}
+```
+
+### WorkItemConfigurations_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkItemConfigurations Delete. */
+public final class WorkItemConfigurationsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigDelete.json
+ */
+ /**
+ * Sample code: WorkItemConfigurationDelete.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workItemConfigurationDelete(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .workItemConfigurations()
+ .deleteWithResponse("my-resource-group", "my-component", "Visual Studio Team Services", Context.NONE);
+ }
+}
+```
+
+### WorkItemConfigurations_GetDefault
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkItemConfigurations GetDefault. */
+public final class WorkItemConfigurationsGetDefaultSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigDefaultGet.json
+ */
+ /**
+ * Sample code: WorkItemConfigurationsGetDefault.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workItemConfigurationsGetDefault(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workItemConfigurations().getDefaultWithResponse("my-resource-group", "my-component", Context.NONE);
+ }
+}
+```
+
+### WorkItemConfigurations_GetItem
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkItemConfigurations GetItem. */
+public final class WorkItemConfigurationsGetItemSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigGet.json
+ */
+ /**
+ * Sample code: WorkItemConfigurationsGetDefault.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workItemConfigurationsGetDefault(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .workItemConfigurations()
+ .getItemWithResponse("my-resource-group", "my-component", "Visual Studio Team Services", Context.NONE);
+ }
+}
+```
+
+### WorkItemConfigurations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkItemConfigurations List. */
+public final class WorkItemConfigurationsListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigsGet.json
+ */
+ /**
+ * Sample code: WorkItemConfigurationsList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workItemConfigurationsList(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workItemConfigurations().list("my-resource-group", "my-component", Context.NONE);
+ }
+}
+```
+
+### WorkItemConfigurations_UpdateItem
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration;
+import java.util.Map;
+
+/**
+ * Samples for WorkItemConfigurations UpdateItem.
+ */
+public final class WorkItemConfigurationsUpdateItemSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigUpdate.json
+ */
+ /**
+ * Sample code: WorkItemConfigurationsCreate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workItemConfigurationsCreate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workItemConfigurations().updateItemWithResponse("my-resource-group", "my-component", "Visual Studio Team Services", new WorkItemCreateConfiguration().withConnectorId("d334e2a4-6733-488e-8645-a9fdc1694f41").withConnectorDataConfiguration("{\"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([{name=Title, value=Validate Only Title}, {name=Description, value=Validate Only Description}]), Context.NONE);
+ }
+}
+```
+
+### WorkbookTemplates_CreateOrUpdate
+
+```java
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery;
+import java.io.IOException;
+import java.util.Arrays;
+
+/** Samples for WorkbookTemplates CreateOrUpdate. */
+public final class WorkbookTemplatesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateAdd.json
+ */
+ /**
+ * Sample code: WorkbookTemplateAdd.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookTemplateAdd(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) throws IOException {
+ manager
+ .workbookTemplates()
+ .define("testtemplate2")
+ .withRegion("west us")
+ .withExistingResourceGroup("my-resource-group")
+ .withPriority(1)
+ .withAuthor("Contoso")
+ .withTemplateData(
+ SerializerFactory
+ .createDefaultManagementSerializerAdapter()
+ .deserialize(
+ "{\"$schema\":\"https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json\",\"items\":[{\"name\":\"text"
+ + " - 2\",\"type\":1,\"content\":{\"json\":\"## New workbook\\n"
+ + "---\\n"
+ + "\\n"
+ + "Welcome to your new workbook. This area will display text formatted as markdown.\\n"
+ + "\\n"
+ + "\\n"
+ + "We've included a basic analytics query to get you started. Use the `Edit` button below"
+ + " each section to configure it or add more sections.\"}},{\"name\":\"query -"
+ + " 2\",\"type\":3,\"content\":{\"exportToExcelOptions\":\"visible\",\"query\":\"union"
+ + " withsource=TableName *\\n"
+ + "| summarize Count=count() by TableName\\n"
+ + "| render"
+ + " barchart\",\"queryType\":0,\"resourceType\":\"microsoft.operationalinsights/workspaces\",\"size\":1,\"version\":\"KqlItem/1.0\"}}],\"styleSettings\":{},\"version\":\"Notebook/1.0\"}",
+ Object.class,
+ SerializerEncoding.JSON))
+ .withGalleries(
+ Arrays
+ .asList(
+ new WorkbookTemplateGallery()
+ .withName("Simple Template")
+ .withCategory("Failures")
+ .withType("tsg")
+ .withOrder(100)
+ .withResourceType("microsoft.insights/components")))
+ .create();
+ }
+}
+```
+
+### WorkbookTemplates_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkbookTemplates Delete. */
+public final class WorkbookTemplatesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateDelete.json
+ */
+ /**
+ * Sample code: WorkbookTemplateDelete.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookTemplateDelete(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workbookTemplates().deleteWithResponse("my-resource-group", "my-template-resource", Context.NONE);
+ }
+}
+```
+
+### WorkbookTemplates_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkbookTemplates GetByResourceGroup. */
+public final class WorkbookTemplatesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateGet.json
+ */
+ /**
+ * Sample code: WorkbookTemplateGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookTemplateGet(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .workbookTemplates()
+ .getByResourceGroupWithResponse("my-resource-group", "my-resource-name", Context.NONE);
+ }
+}
+```
+
+### WorkbookTemplates_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkbookTemplates ListByResourceGroup. */
+public final class WorkbookTemplatesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplatesList.json
+ */
+ /**
+ * Sample code: WorkbookTemplatesList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookTemplatesList(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workbookTemplates().listByResourceGroup("my-resource-group", Context.NONE);
+ }
+}
+```
+
+### WorkbookTemplates_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate;
+
+/** Samples for WorkbookTemplates Update. */
+public final class WorkbookTemplatesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateUpdate.json
+ */
+ /**
+ * Sample code: WorkbookTemplateUpdate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookTemplateUpdate(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ WorkbookTemplate resource =
+ manager
+ .workbookTemplates()
+ .getByResourceGroupWithResponse("my-resource-group", "my-template-resource", Context.NONE)
+ .getValue();
+ resource.update().apply();
+ }
+}
+```
+
+### Workbooks_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.applicationinsights.models.Kind;
+import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Workbooks CreateOrUpdate. */
+public final class WorkbooksCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookManagedAdd.json
+ */
+ /**
+ * Sample code: WorkbookManagedAdd.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookManagedAdd(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .workbooks()
+ .define("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2")
+ .withRegion("westus")
+ .withExistingResourceGroup("my-resource-group")
+ .withTags(mapOf("hidden-title", "tttt"))
+ .withIdentity(
+ new WorkbookResourceIdentity()
+ .withType(ManagedServiceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
+ new UserAssignedIdentity())))
+ .withKind(Kind.SHARED)
+ .withEtag("\"4a00f78d-0000-0700-0000-5f8f616c1000\"")
+ .withDisplayName("tttt")
+ .withSerializedData(
+ "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text"
+ + " - 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup\"]}")
+ .withVersion("Notebook/1.0")
+ .withCategory("workbook")
+ .withTagsPropertiesTags(Arrays.asList())
+ .withStorageUri(
+ "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/testStorage/blobServices/default/containers/testContainer")
+ .withDescription("Sample workbook")
+ .withSourceIdParameter("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookAdd.json
+ */
+ /**
+ * Sample code: WorkbookAdd.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookAdd(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .workbooks()
+ .define("deadb33f-8bee-4d3b-a059-9be8dac93960")
+ .withRegion("west us")
+ .withExistingResourceGroup("my-resource-group")
+ .withTags(mapOf("TagSample01", "sample01", "TagSample02", "sample02"))
+ .withKind(Kind.SHARED)
+ .withDisplayName("tttt")
+ .withSerializedData(
+ "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r"
+ + "\\n"
+ + "---\\r"
+ + "\\n"
+ + "\\r"
+ + "\\n"
+ + "Welcome to your new workbook. This area will display text formatted as markdown.\\r"
+ + "\\n"
+ + "\\r"
+ + "\\n"
+ + "\\r"
+ + "\\n"
+ + "We've included a basic analytics query to get you started. Use the `Edit` button below each"
+ + " section to configure it or add more"
+ + " sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union"
+ + " withsource=TableName *\\n"
+ + "| summarize Count=count() by TableName\\n"
+ + "| render"
+ + " barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}")
+ .withCategory("workbook")
+ .withDescription("Sample workbook")
+ .withSourceIdParameter("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup")
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Workbooks_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Workbooks Delete. */
+public final class WorkbooksDeleteSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookDelete.json
+ */
+ /**
+ * Sample code: WorkbookDelete.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookDelete(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .workbooks()
+ .deleteWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
+ }
+}
+```
+
+### Workbooks_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Workbooks GetByResourceGroup. */
+public final class WorkbooksGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookGet1.json
+ */
+ /**
+ * Sample code: WorkbookGet1.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookGet1(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .workbooks()
+ .getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookManagedGet.json
+ */
+ /**
+ * Sample code: WorkbookManagedGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookManagedGet(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .workbooks()
+ .getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookGet.json
+ */
+ /**
+ * Sample code: WorkbookGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .workbooks()
+ .getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
+ }
+}
+```
+
+### Workbooks_List
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.CategoryType;
+
+/** Samples for Workbooks List. */
+public final class WorkbooksListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksManagedList.json
+ */
+ /**
+ * Sample code: WorkbooksManagedList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbooksManagedList(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksListSub.json
+ */
+ /**
+ * Sample code: WorkbooksListSub.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbooksListSub(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList2.json
+ */
+ /**
+ * Sample code: WorkbooksList2.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbooksList2(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE);
+ }
+}
+```
+
+### Workbooks_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.CategoryType;
+
+/** Samples for Workbooks ListByResourceGroup. */
+public final class WorkbooksListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList.json
+ */
+ /**
+ * Sample code: WorkbooksList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbooksList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .workbooks()
+ .listByResourceGroup(
+ "my-resource-group",
+ CategoryType.WORKBOOK,
+ null,
+ "/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### Workbooks_RevisionGet
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Workbooks RevisionGet. */
+public final class WorkbooksRevisionGetSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookRevisionGet.json
+ */
+ /**
+ * Sample code: WorkbookRevisionGet.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookRevisionGet(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager
+ .workbooks()
+ .revisionGetWithResponse(
+ "my-resource-group",
+ "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
+ "1e2f8435b98248febee70c64ac22e1ab",
+ Context.NONE);
+ }
+}
+```
+
+### Workbooks_RevisionsList
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Workbooks RevisionsList. */
+public final class WorkbooksRevisionsListSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookRevisionsList.json
+ */
+ /**
+ * Sample code: WorkbookRevisionsList.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookRevisionsList(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workbooks().revisionsList("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
+ }
+}
+```
+
+### Workbooks_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.models.Workbook;
+
+/** Samples for Workbooks Update. */
+public final class WorkbooksUpdateSamples {
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookUpdate.json
+ */
+ /**
+ * Sample code: WorkbookUpdate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookUpdate(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ Workbook resource =
+ manager
+ .workbooks()
+ .getByResourceGroupWithResponse(
+ "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withSourceId(
+ "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1")
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookManagedUpdate.json
+ */
+ /**
+ * Sample code: WorkbookManagedUpdate.
+ *
+ * @param manager Entry point to ApplicationInsightsManager.
+ */
+ public static void workbookManagedUpdate(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ Workbook resource =
+ manager
+ .workbooks()
+ .getByResourceGroupWithResponse(
+ "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withSourceId("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup")
+ .apply();
+ }
+}
+```
+
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml
index de8ac898ec293..76e241c90dc3e 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml
@@ -1,67 +1,86 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-applicationinsights
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-applicationinsights
+ 1.0.0-beta.2
+ 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-2020-10-20.
- https://github.com/Azure/azure-sdk-for-java
+ 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-2021-08-01.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
-
-
-
-
- com.azure
- azure-core
- 1.21.0
-
-
- com.azure
- azure-core-management
- 1.4.2
-
-
-
-
-
- org.jacoco
- jacoco-maven-plugin
- 0.8.7
-
- true
-
-
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core
+ 1.21.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.2
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.7
+
+ true
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
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 bd7b5e4889807..56318411638ee 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
@@ -9,7 +9,6 @@
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +16,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -28,16 +28,19 @@
import com.azure.resourcemanager.applicationinsights.implementation.ComponentAvailableFeaturesImpl;
import com.azure.resourcemanager.applicationinsights.implementation.ComponentCurrentBillingFeaturesImpl;
import com.azure.resourcemanager.applicationinsights.implementation.ComponentFeatureCapabilitiesImpl;
+import com.azure.resourcemanager.applicationinsights.implementation.ComponentLinkedStorageAccountsOperationsImpl;
import com.azure.resourcemanager.applicationinsights.implementation.ComponentQuotaStatusImpl;
import com.azure.resourcemanager.applicationinsights.implementation.ComponentsImpl;
import com.azure.resourcemanager.applicationinsights.implementation.ExportConfigurationsImpl;
import com.azure.resourcemanager.applicationinsights.implementation.FavoritesImpl;
+import com.azure.resourcemanager.applicationinsights.implementation.LiveTokensImpl;
import com.azure.resourcemanager.applicationinsights.implementation.MyWorkbooksImpl;
import com.azure.resourcemanager.applicationinsights.implementation.OperationsImpl;
import com.azure.resourcemanager.applicationinsights.implementation.ProactiveDetectionConfigurationsImpl;
import com.azure.resourcemanager.applicationinsights.implementation.WebTestLocationsImpl;
import com.azure.resourcemanager.applicationinsights.implementation.WebTestsImpl;
import com.azure.resourcemanager.applicationinsights.implementation.WorkItemConfigurationsImpl;
+import com.azure.resourcemanager.applicationinsights.implementation.WorkbookTemplatesImpl;
import com.azure.resourcemanager.applicationinsights.implementation.WorkbooksImpl;
import com.azure.resourcemanager.applicationinsights.models.AnalyticsItems;
import com.azure.resourcemanager.applicationinsights.models.Annotations;
@@ -45,16 +48,19 @@
import com.azure.resourcemanager.applicationinsights.models.ComponentAvailableFeatures;
import com.azure.resourcemanager.applicationinsights.models.ComponentCurrentBillingFeatures;
import com.azure.resourcemanager.applicationinsights.models.ComponentFeatureCapabilities;
+import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsOperations;
import com.azure.resourcemanager.applicationinsights.models.ComponentQuotaStatus;
import com.azure.resourcemanager.applicationinsights.models.Components;
import com.azure.resourcemanager.applicationinsights.models.ExportConfigurations;
import com.azure.resourcemanager.applicationinsights.models.Favorites;
+import com.azure.resourcemanager.applicationinsights.models.LiveTokens;
import com.azure.resourcemanager.applicationinsights.models.MyWorkbooks;
import com.azure.resourcemanager.applicationinsights.models.Operations;
import com.azure.resourcemanager.applicationinsights.models.ProactiveDetectionConfigurations;
import com.azure.resourcemanager.applicationinsights.models.WebTestLocations;
import com.azure.resourcemanager.applicationinsights.models.WebTests;
import com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurations;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplates;
import com.azure.resourcemanager.applicationinsights.models.Workbooks;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
@@ -64,7 +70,7 @@
/** Entry point to ApplicationInsightsManager. Composite Swagger for Application Insights Management Client. */
public final class ApplicationInsightsManager {
- private AnalyticsItems analyticsItems;
+ private Operations operations;
private Annotations annotations;
@@ -82,8 +88,6 @@ public final class ApplicationInsightsManager {
private ProactiveDetectionConfigurations proactiveDetectionConfigurations;
- private Components components;
-
private WorkItemConfigurations workItemConfigurations;
private Favorites favorites;
@@ -92,11 +96,19 @@ public final class ApplicationInsightsManager {
private WebTests webTests;
+ private AnalyticsItems analyticsItems;
+
+ private WorkbookTemplates workbookTemplates;
+
private MyWorkbooks myWorkbooks;
private Workbooks workbooks;
- private Operations operations;
+ private Components components;
+
+ private ComponentLinkedStorageAccountsOperations componentLinkedStorageAccountsOperations;
+
+ private LiveTokens liveTokens;
private final ApplicationInsightsManagementClient clientObject;
@@ -141,6 +153,7 @@ public static final class Configurable {
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -180,6 +193,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -236,6 +260,9 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
@@ -245,10 +272,7 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
- policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies);
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
@@ -261,12 +285,12 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure
}
}
- /** @return Resource collection API of AnalyticsItems. */
- public AnalyticsItems analyticsItems() {
- if (this.analyticsItems == null) {
- this.analyticsItems = new AnalyticsItemsImpl(clientObject.getAnalyticsItems(), this);
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
- return analyticsItems;
+ return operations;
}
/** @return Resource collection API of Annotations. */
@@ -337,14 +361,6 @@ public ProactiveDetectionConfigurations proactiveDetectionConfigurations() {
return proactiveDetectionConfigurations;
}
- /** @return Resource collection API of Components. */
- public Components components() {
- if (this.components == null) {
- this.components = new ComponentsImpl(clientObject.getComponents(), this);
- }
- return components;
- }
-
/** @return Resource collection API of WorkItemConfigurations. */
public WorkItemConfigurations workItemConfigurations() {
if (this.workItemConfigurations == null) {
@@ -378,6 +394,22 @@ public WebTests webTests() {
return webTests;
}
+ /** @return Resource collection API of AnalyticsItems. */
+ public AnalyticsItems analyticsItems() {
+ if (this.analyticsItems == null) {
+ this.analyticsItems = new AnalyticsItemsImpl(clientObject.getAnalyticsItems(), this);
+ }
+ return analyticsItems;
+ }
+
+ /** @return Resource collection API of WorkbookTemplates. */
+ public WorkbookTemplates workbookTemplates() {
+ if (this.workbookTemplates == null) {
+ this.workbookTemplates = new WorkbookTemplatesImpl(clientObject.getWorkbookTemplates(), this);
+ }
+ return workbookTemplates;
+ }
+
/** @return Resource collection API of MyWorkbooks. */
public MyWorkbooks myWorkbooks() {
if (this.myWorkbooks == null) {
@@ -394,12 +426,30 @@ public Workbooks workbooks() {
return workbooks;
}
- /** @return Resource collection API of Operations. */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ /** @return Resource collection API of Components. */
+ public Components components() {
+ if (this.components == null) {
+ this.components = new ComponentsImpl(clientObject.getComponents(), this);
}
- return operations;
+ return components;
+ }
+
+ /** @return Resource collection API of ComponentLinkedStorageAccountsOperations. */
+ public ComponentLinkedStorageAccountsOperations componentLinkedStorageAccountsOperations() {
+ if (this.componentLinkedStorageAccountsOperations == null) {
+ this.componentLinkedStorageAccountsOperations =
+ new ComponentLinkedStorageAccountsOperationsImpl(
+ clientObject.getComponentLinkedStorageAccountsOperations(), this);
+ }
+ return componentLinkedStorageAccountsOperations;
+ }
+
+ /** @return Resource collection API of LiveTokens. */
+ public LiveTokens liveTokens() {
+ if (this.liveTokens == null) {
+ this.liveTokens = new LiveTokensImpl(clientObject.getLiveTokens(), this);
+ }
+ return liveTokens;
}
/**
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 575ecdd9abe75..5b4984d43ad4e 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 AnalyticsItemsClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the AnalyticsItemsClient object.
+ * @return the OperationsClient object.
*/
- AnalyticsItemsClient getAnalyticsItems();
+ OperationsClient getOperations();
/**
* Gets the AnnotationsClient object to access its operations.
@@ -100,13 +100,6 @@ public interface ApplicationInsightsManagementClient {
*/
ProactiveDetectionConfigurationsClient getProactiveDetectionConfigurations();
- /**
- * Gets the ComponentsClient object to access its operations.
- *
- * @return the ComponentsClient object.
- */
- ComponentsClient getComponents();
-
/**
* Gets the WorkItemConfigurationsClient object to access its operations.
*
@@ -135,6 +128,20 @@ public interface ApplicationInsightsManagementClient {
*/
WebTestsClient getWebTests();
+ /**
+ * Gets the AnalyticsItemsClient object to access its operations.
+ *
+ * @return the AnalyticsItemsClient object.
+ */
+ AnalyticsItemsClient getAnalyticsItems();
+
+ /**
+ * Gets the WorkbookTemplatesClient object to access its operations.
+ *
+ * @return the WorkbookTemplatesClient object.
+ */
+ WorkbookTemplatesClient getWorkbookTemplates();
+
/**
* Gets the MyWorkbooksClient object to access its operations.
*
@@ -150,9 +157,23 @@ public interface ApplicationInsightsManagementClient {
WorkbooksClient getWorkbooks();
/**
- * 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 ComponentLinkedStorageAccountsOperationsClient object to access its operations.
+ *
+ * @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/ComponentLinkedStorageAccountsOperationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java
new file mode 100644
index 0000000000000..2f3430b9aa8ad
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java
@@ -0,0 +1,162 @@
+// 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.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner;
+import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsPatch;
+import com.azure.resourcemanager.applicationinsights.models.StorageType;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * ComponentLinkedStorageAccountsOperationsClient.
+ */
+public interface ComponentLinkedStorageAccountsOperationsClient {
+ /**
+ * Returns the current linked storage settings 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 storageType The type of the Application Insights component data source for the linked storage account.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ComponentLinkedStorageAccountsInner get(String resourceGroupName, String resourceName, StorageType storageType);
+
+ /**
+ * Returns the current linked storage settings 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String resourceName, StorageType storageType, Context context);
+
+ /**
+ * Replace current linked storage account 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 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.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ComponentLinkedStorageAccountsInner createAndUpdate(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties);
+
+ /**
+ * Replace current linked storage account 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createAndUpdateWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties,
+ Context context);
+
+ /**
+ * Update linked storage accounts 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 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.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ComponentLinkedStorageAccountsInner update(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties);
+
+ /**
+ * Update linked storage accounts 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties,
+ Context context);
+
+ /**
+ * Delete linked storage accounts 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 storageType The type of the Application Insights component data source for the linked storage account.
+ * @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, StorageType storageType);
+
+ /**
+ * Delete linked storage accounts 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 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName, String resourceName, StorageType storageType, Context context);
+}
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
new file mode 100644
index 0000000000000..ea0169cb7b165
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/LiveTokensClient.java
@@ -0,0 +1,39 @@
+// 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.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.fluent.models.LiveTokenResponseInner;
+
+/** An instance of this class provides access to all the operations defined in LiveTokensClient. */
+public interface LiveTokensClient {
+ /**
+ * **Gets an access token for live metrics stream data.**.
+ *
+ * @param resourceUri The identifier of the 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 response to a live token query.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LiveTokenResponseInner get(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 com.azure.core.management.exception.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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceUri, Context context);
+}
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 cf11e5eb39881..1e2ec3a8b7524 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
@@ -9,6 +9,7 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner;
+import com.azure.resourcemanager.applicationinsights.fluent.models.OperationLiveInner;
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public interface OperationsClient {
@@ -17,7 +18,7 @@ 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 Azure Workbooks operations.
+ * @return result of the request to list CDN operations.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,8 +30,30 @@ 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 Azure Workbooks operations.
+ * @return result of the request to list CDN operations.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
+
+ /**
+ * List the available operations supported by the resource provider.
+ *
+ * @throws com.azure.core.management.exception.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 List Operations operation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the available operations supported by the resource provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the List Operations operation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
}
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
new file mode 100644
index 0000000000000..b78ea25bcae81
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.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.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in WorkbookTemplatesClient. */
+public interface WorkbookTemplatesClient {
+ /**
+ * Get all Workbook templates defined within a 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 Workbook templates defined within a specified resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Get all Workbook templates defined within a 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 Workbook templates defined within a specified resource group.
+ */
+ @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.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ 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.
+ * @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);
+
+ /**
+ * 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * 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 createOrUpdate(
+ String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties);
+
+ /**
+ * 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.
+ * @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 workbook template definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ WorkbookTemplateInner workbookTemplateProperties,
+ 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);
+
+ /**
+ * 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 com.azure.core.management.exception.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)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters,
+ Context context);
+}
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 0d76cb25e105d..a7184033735c1 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
@@ -216,4 +216,65 @@ Response updateWithResponse(
String sourceId,
WorkbookUpdateParameters workbookUpdateParameters,
Context context);
+
+ /**
+ * Get the revisions for the workbook defined 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.WorkbookErrorException thrown if the request is
+ * rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the revisions for the workbook defined by its resourceName.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable revisionsList(String resourceGroupName, String resourceName);
+
+ /**
+ * Get the revisions for the workbook defined 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.WorkbookErrorException thrown if the request is
+ * rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the revisions for the workbook defined by its resourceName.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable revisionsList(String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get a single workbook revision defined by its revisionId.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The name of the Application Insights component resource.
+ * @param revisionId The id of the workbook's revision.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkbookInner revisionGet(String resourceGroupName, String resourceName, String revisionId);
+
+ /**
+ * Get a single workbook revision defined by its revisionId.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The name of the Application Insights component 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.WorkbookErrorException 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response revisionGetWithResponse(
+ String resourceGroupName, String resourceName, String revisionId, Context context);
}
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 5b3fc73c3a261..f7cb867215a1c 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
@@ -5,13 +5,13 @@
package com.azure.resourcemanager.applicationinsights.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.applicationinsights.models.ApplicationType;
import com.azure.resourcemanager.applicationinsights.models.ComponentsResource;
import com.azure.resourcemanager.applicationinsights.models.FlowType;
import com.azure.resourcemanager.applicationinsights.models.IngestionMode;
import com.azure.resourcemanager.applicationinsights.models.PrivateLinkScopedResource;
+import com.azure.resourcemanager.applicationinsights.models.PublicNetworkAccessType;
import com.azure.resourcemanager.applicationinsights.models.RequestSource;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -20,9 +20,8 @@
import java.util.Map;
/** An Application Insights component definition. */
-@JsonFlatten
@Fluent
-public class ApplicationInsightsComponentInner extends ComponentsResource {
+public final class ApplicationInsightsComponentInner extends ComponentsResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentInner.class);
/*
@@ -34,126 +33,10 @@ public class ApplicationInsightsComponentInner extends ComponentsResource {
private String kind;
/*
- * The unique ID of your application. This field mirrors the 'Name' field
- * and cannot be changed.
+ * Properties that define an Application Insights component resource.
*/
- @JsonProperty(value = "properties.ApplicationId", access = JsonProperty.Access.WRITE_ONLY)
- private String applicationId;
-
- /*
- * Application Insights Unique ID for your Application.
- */
- @JsonProperty(value = "properties.AppId", access = JsonProperty.Access.WRITE_ONLY)
- private String appId;
-
- /*
- * Type of application being monitored.
- */
- @JsonProperty(value = "properties.Application_Type")
- 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.
- */
- @JsonProperty(value = "properties.Flow_Type")
- private FlowType flowType;
-
- /*
- * Describes what tool created this Application Insights component.
- * Customers using this API should set this to the default 'rest'.
- */
- @JsonProperty(value = "properties.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.
- */
- @JsonProperty(value = "properties.InstrumentationKey", access = JsonProperty.Access.WRITE_ONLY)
- private String instrumentationKey;
-
- /*
- * Creation Date for the Application Insights component, in ISO 8601
- * format.
- */
- @JsonProperty(value = "properties.CreationDate", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime creationDate;
-
- /*
- * Azure Tenant Id.
- */
- @JsonProperty(value = "properties.TenantId", access = JsonProperty.Access.WRITE_ONLY)
- private String tenantId;
-
- /*
- * The unique application ID created when a new application is added to
- * HockeyApp, used for communications with HockeyApp.
- */
- @JsonProperty(value = "properties.HockeyAppId")
- private String hockeyAppId;
-
- /*
- * Token used to authenticate communications with between Application
- * Insights and HockeyApp.
- */
- @JsonProperty(value = "properties.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.
- */
- @JsonProperty(value = "properties.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.
- */
- @JsonProperty(value = "properties.SamplingPercentage")
- private Double samplingPercentage;
-
- /*
- * Application Insights component connection string.
- */
- @JsonProperty(value = "properties.ConnectionString", access = JsonProperty.Access.WRITE_ONLY)
- private String connectionString;
-
- /*
- * Retention period in days.
- */
- @JsonProperty(value = "properties.RetentionInDays")
- private Integer retentionInDays;
-
- /*
- * Disable IP masking.
- */
- @JsonProperty(value = "properties.DisableIpMasking")
- private Boolean disableIpMasking;
-
- /*
- * Purge data immediately after 30 days.
- */
- @JsonProperty(value = "properties.ImmediatePurgeDataOn30Days")
- private Boolean immediatePurgeDataOn30Days;
-
- /*
- * List of linked private link scope resources.
- */
- @JsonProperty(value = "properties.PrivateLinkScopedResources", access = JsonProperty.Access.WRITE_ONLY)
- private List privateLinkScopedResources;
-
- /*
- * Indicates the flow of the ingestion.
- */
- @JsonProperty(value = "properties.IngestionMode")
- private IngestionMode ingestionMode;
+ @JsonProperty(value = "properties")
+ private ApplicationInsightsComponentProperties innerProperties;
/**
* Get the kind property: The kind of application that this component refers to, used to customize UI. This value is
@@ -177,6 +60,29 @@ public ApplicationInsightsComponentInner withKind(String kind) {
return this;
}
+ /**
+ * Get the innerProperties property: Properties that define an Application Insights component resource.
+ *
+ * @return the innerProperties value.
+ */
+ private ApplicationInsightsComponentProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ApplicationInsightsComponentInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ApplicationInsightsComponentInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the applicationId property: The unique ID of your application. This field mirrors the 'Name' field and cannot
* be changed.
@@ -184,7 +90,7 @@ public ApplicationInsightsComponentInner withKind(String kind) {
* @return the applicationId value.
*/
public String applicationId() {
- return this.applicationId;
+ return this.innerProperties() == null ? null : this.innerProperties().applicationId();
}
/**
@@ -193,7 +99,7 @@ public String applicationId() {
* @return the appId value.
*/
public String appId() {
- return this.appId;
+ return this.innerProperties() == null ? null : this.innerProperties().appId();
}
/**
@@ -202,7 +108,7 @@ public String appId() {
* @return the applicationType value.
*/
public ApplicationType applicationType() {
- return this.applicationType;
+ return this.innerProperties() == null ? null : this.innerProperties().applicationType();
}
/**
@@ -212,7 +118,10 @@ public ApplicationType applicationType() {
* @return the ApplicationInsightsComponentInner object itself.
*/
public ApplicationInsightsComponentInner withApplicationType(ApplicationType applicationType) {
- this.applicationType = applicationType;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationInsightsComponentProperties();
+ }
+ this.innerProperties().withApplicationType(applicationType);
return this;
}
@@ -223,7 +132,7 @@ public ApplicationInsightsComponentInner withApplicationType(ApplicationType app
* @return the flowType value.
*/
public FlowType flowType() {
- return this.flowType;
+ return this.innerProperties() == null ? null : this.innerProperties().flowType();
}
/**
@@ -234,7 +143,10 @@ public FlowType flowType() {
* @return the ApplicationInsightsComponentInner object itself.
*/
public ApplicationInsightsComponentInner withFlowType(FlowType flowType) {
- this.flowType = flowType;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationInsightsComponentProperties();
+ }
+ this.innerProperties().withFlowType(flowType);
return this;
}
@@ -245,7 +157,7 @@ public ApplicationInsightsComponentInner withFlowType(FlowType flowType) {
* @return the requestSource value.
*/
public RequestSource requestSource() {
- return this.requestSource;
+ return this.innerProperties() == null ? null : this.innerProperties().requestSource();
}
/**
@@ -256,7 +168,10 @@ public RequestSource requestSource() {
* @return the ApplicationInsightsComponentInner object itself.
*/
public ApplicationInsightsComponentInner withRequestSource(RequestSource requestSource) {
- this.requestSource = requestSource;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationInsightsComponentProperties();
+ }
+ this.innerProperties().withRequestSource(requestSource);
return this;
}
@@ -268,7 +183,7 @@ public ApplicationInsightsComponentInner withRequestSource(RequestSource request
* @return the instrumentationKey value.
*/
public String instrumentationKey() {
- return this.instrumentationKey;
+ return this.innerProperties() == null ? null : this.innerProperties().instrumentationKey();
}
/**
@@ -277,7 +192,7 @@ public String instrumentationKey() {
* @return the creationDate value.
*/
public OffsetDateTime creationDate() {
- return this.creationDate;
+ return this.innerProperties() == null ? null : this.innerProperties().creationDate();
}
/**
@@ -286,7 +201,7 @@ public OffsetDateTime creationDate() {
* @return the tenantId value.
*/
public String tenantId() {
- return this.tenantId;
+ return this.innerProperties() == null ? null : this.innerProperties().tenantId();
}
/**
@@ -296,7 +211,7 @@ public String tenantId() {
* @return the hockeyAppId value.
*/
public String hockeyAppId() {
- return this.hockeyAppId;
+ return this.innerProperties() == null ? null : this.innerProperties().hockeyAppId();
}
/**
@@ -307,7 +222,10 @@ public String hockeyAppId() {
* @return the ApplicationInsightsComponentInner object itself.
*/
public ApplicationInsightsComponentInner withHockeyAppId(String hockeyAppId) {
- this.hockeyAppId = hockeyAppId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationInsightsComponentProperties();
+ }
+ this.innerProperties().withHockeyAppId(hockeyAppId);
return this;
}
@@ -318,7 +236,7 @@ public ApplicationInsightsComponentInner withHockeyAppId(String hockeyAppId) {
* @return the hockeyAppToken value.
*/
public String hockeyAppToken() {
- return this.hockeyAppToken;
+ return this.innerProperties() == null ? null : this.innerProperties().hockeyAppToken();
}
/**
@@ -329,7 +247,7 @@ public String hockeyAppToken() {
* @return the provisioningState value.
*/
public String provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -339,7 +257,7 @@ public String provisioningState() {
* @return the samplingPercentage value.
*/
public Double samplingPercentage() {
- return this.samplingPercentage;
+ return this.innerProperties() == null ? null : this.innerProperties().samplingPercentage();
}
/**
@@ -350,7 +268,10 @@ public Double samplingPercentage() {
* @return the ApplicationInsightsComponentInner object itself.
*/
public ApplicationInsightsComponentInner withSamplingPercentage(Double samplingPercentage) {
- this.samplingPercentage = samplingPercentage;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationInsightsComponentProperties();
+ }
+ this.innerProperties().withSamplingPercentage(samplingPercentage);
return this;
}
@@ -360,7 +281,7 @@ public ApplicationInsightsComponentInner withSamplingPercentage(Double samplingP
* @return the connectionString value.
*/
public String connectionString() {
- return this.connectionString;
+ return this.innerProperties() == null ? null : this.innerProperties().connectionString();
}
/**
@@ -369,7 +290,7 @@ public String connectionString() {
* @return the retentionInDays value.
*/
public Integer retentionInDays() {
- return this.retentionInDays;
+ return this.innerProperties() == null ? null : this.innerProperties().retentionInDays();
}
/**
@@ -379,7 +300,10 @@ public Integer retentionInDays() {
* @return the ApplicationInsightsComponentInner object itself.
*/
public ApplicationInsightsComponentInner withRetentionInDays(Integer retentionInDays) {
- this.retentionInDays = retentionInDays;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationInsightsComponentProperties();
+ }
+ this.innerProperties().withRetentionInDays(retentionInDays);
return this;
}
@@ -389,7 +313,7 @@ public ApplicationInsightsComponentInner withRetentionInDays(Integer retentionIn
* @return the disableIpMasking value.
*/
public Boolean disableIpMasking() {
- return this.disableIpMasking;
+ return this.innerProperties() == null ? null : this.innerProperties().disableIpMasking();
}
/**
@@ -399,7 +323,10 @@ public Boolean disableIpMasking() {
* @return the ApplicationInsightsComponentInner object itself.
*/
public ApplicationInsightsComponentInner withDisableIpMasking(Boolean disableIpMasking) {
- this.disableIpMasking = disableIpMasking;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationInsightsComponentProperties();
+ }
+ this.innerProperties().withDisableIpMasking(disableIpMasking);
return this;
}
@@ -409,7 +336,7 @@ public ApplicationInsightsComponentInner withDisableIpMasking(Boolean disableIpM
* @return the immediatePurgeDataOn30Days value.
*/
public Boolean immediatePurgeDataOn30Days() {
- return this.immediatePurgeDataOn30Days;
+ return this.innerProperties() == null ? null : this.innerProperties().immediatePurgeDataOn30Days();
}
/**
@@ -419,7 +346,10 @@ public Boolean immediatePurgeDataOn30Days() {
* @return the ApplicationInsightsComponentInner object itself.
*/
public ApplicationInsightsComponentInner withImmediatePurgeDataOn30Days(Boolean immediatePurgeDataOn30Days) {
- this.immediatePurgeDataOn30Days = immediatePurgeDataOn30Days;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationInsightsComponentProperties();
+ }
+ this.innerProperties().withImmediatePurgeDataOn30Days(immediatePurgeDataOn30Days);
return this;
}
@@ -429,40 +359,79 @@ public ApplicationInsightsComponentInner withImmediatePurgeDataOn30Days(Boolean
* @return the privateLinkScopedResources value.
*/
public List privateLinkScopedResources() {
- return this.privateLinkScopedResources;
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkScopedResources();
}
/**
- * Get the ingestionMode property: Indicates the flow of the ingestion.
+ * Get the publicNetworkAccessForIngestion property: The network access type for accessing Application Insights
+ * ingestion.
*
- * @return the ingestionMode value.
+ * @return the publicNetworkAccessForIngestion value.
*/
- public IngestionMode ingestionMode() {
- return this.ingestionMode;
+ public PublicNetworkAccessType publicNetworkAccessForIngestion() {
+ return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccessForIngestion();
}
/**
- * Set the ingestionMode property: Indicates the flow of the ingestion.
+ * Set the publicNetworkAccessForIngestion property: The network access type for accessing Application Insights
+ * ingestion.
*
- * @param ingestionMode the ingestionMode value to set.
+ * @param publicNetworkAccessForIngestion the publicNetworkAccessForIngestion value to set.
* @return the ApplicationInsightsComponentInner object itself.
*/
- public ApplicationInsightsComponentInner withIngestionMode(IngestionMode ingestionMode) {
- this.ingestionMode = ingestionMode;
+ public ApplicationInsightsComponentInner withPublicNetworkAccessForIngestion(
+ PublicNetworkAccessType publicNetworkAccessForIngestion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationInsightsComponentProperties();
+ }
+ this.innerProperties().withPublicNetworkAccessForIngestion(publicNetworkAccessForIngestion);
return this;
}
- /** {@inheritDoc} */
- @Override
- public ApplicationInsightsComponentInner withLocation(String location) {
- super.withLocation(location);
+ /**
+ * Get the publicNetworkAccessForQuery property: The network access type for accessing Application Insights query.
+ *
+ * @return the publicNetworkAccessForQuery value.
+ */
+ public PublicNetworkAccessType publicNetworkAccessForQuery() {
+ return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccessForQuery();
+ }
+
+ /**
+ * Set the publicNetworkAccessForQuery property: The network access type for accessing Application Insights query.
+ *
+ * @param publicNetworkAccessForQuery the publicNetworkAccessForQuery value to set.
+ * @return the ApplicationInsightsComponentInner object itself.
+ */
+ public ApplicationInsightsComponentInner withPublicNetworkAccessForQuery(
+ PublicNetworkAccessType publicNetworkAccessForQuery) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationInsightsComponentProperties();
+ }
+ this.innerProperties().withPublicNetworkAccessForQuery(publicNetworkAccessForQuery);
return this;
}
- /** {@inheritDoc} */
- @Override
- public ApplicationInsightsComponentInner withTags(Map tags) {
- super.withTags(tags);
+ /**
+ * Get the ingestionMode property: Indicates the flow of the ingestion.
+ *
+ * @return the ingestionMode value.
+ */
+ public IngestionMode ingestionMode() {
+ return this.innerProperties() == null ? null : this.innerProperties().ingestionMode();
+ }
+
+ /**
+ * Set the ingestionMode property: Indicates the flow of the ingestion.
+ *
+ * @param ingestionMode the ingestionMode value to set.
+ * @return the ApplicationInsightsComponentInner object itself.
+ */
+ public ApplicationInsightsComponentInner withIngestionMode(IngestionMode ingestionMode) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationInsightsComponentProperties();
+ }
+ this.innerProperties().withIngestionMode(ingestionMode);
return this;
}
@@ -480,8 +449,8 @@ public void validate() {
new IllegalArgumentException(
"Missing required property kind in model ApplicationInsightsComponentInner"));
}
- if (privateLinkScopedResources() != null) {
- privateLinkScopedResources().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
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
new file mode 100644
index 0000000000000..a2c31f62359db
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java
@@ -0,0 +1,494 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.applicationinsights.models.ApplicationType;
+import com.azure.resourcemanager.applicationinsights.models.FlowType;
+import com.azure.resourcemanager.applicationinsights.models.IngestionMode;
+import com.azure.resourcemanager.applicationinsights.models.PrivateLinkScopedResource;
+import com.azure.resourcemanager.applicationinsights.models.PublicNetworkAccessType;
+import com.azure.resourcemanager.applicationinsights.models.RequestSource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** Properties that define an Application Insights component resource. */
+@Fluent
+public final class ApplicationInsightsComponentProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentProperties.class);
+
+ /*
+ * 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;
+
+ /*
+ * Application Insights Unique ID for your Application.
+ */
+ @JsonProperty(value = "AppId", access = JsonProperty.Access.WRITE_ONLY)
+ private String appId;
+
+ /*
+ * Type of application being monitored.
+ */
+ @JsonProperty(value = "Application_Type", required = true)
+ 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.
+ */
+ @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'.
+ */
+ @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.
+ */
+ @JsonProperty(value = "InstrumentationKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String instrumentationKey;
+
+ /*
+ * Creation Date for the Application Insights component, in ISO 8601
+ * format.
+ */
+ @JsonProperty(value = "CreationDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime creationDate;
+
+ /*
+ * Azure Tenant Id.
+ */
+ @JsonProperty(value = "TenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String tenantId;
+
+ /*
+ * 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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @JsonProperty(value = "SamplingPercentage")
+ private Double samplingPercentage;
+
+ /*
+ * Application Insights component connection string.
+ */
+ @JsonProperty(value = "ConnectionString", access = JsonProperty.Access.WRITE_ONLY)
+ private String connectionString;
+
+ /*
+ * Retention period in days.
+ */
+ @JsonProperty(value = "RetentionInDays")
+ private Integer retentionInDays;
+
+ /*
+ * Disable IP masking.
+ */
+ @JsonProperty(value = "DisableIpMasking")
+ private Boolean disableIpMasking;
+
+ /*
+ * Purge data immediately after 30 days.
+ */
+ @JsonProperty(value = "ImmediatePurgeDataOn30Days")
+ private Boolean immediatePurgeDataOn30Days;
+
+ /*
+ * List of linked private link scope resources.
+ */
+ @JsonProperty(value = "PrivateLinkScopedResources", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateLinkScopedResources;
+
+ /*
+ * The network access type for accessing Application Insights ingestion.
+ */
+ @JsonProperty(value = "publicNetworkAccessForIngestion")
+ private PublicNetworkAccessType publicNetworkAccessForIngestion;
+
+ /*
+ * The network access type for accessing Application Insights query.
+ */
+ @JsonProperty(value = "publicNetworkAccessForQuery")
+ private PublicNetworkAccessType publicNetworkAccessForQuery;
+
+ /*
+ * Indicates the flow of the ingestion.
+ */
+ @JsonProperty(value = "IngestionMode")
+ private IngestionMode ingestionMode;
+
+ /**
+ * Get the applicationId property: The unique ID of your application. This field mirrors the 'Name' field and cannot
+ * be changed.
+ *
+ * @return the applicationId value.
+ */
+ public String applicationId() {
+ return this.applicationId;
+ }
+
+ /**
+ * Get the appId property: Application Insights Unique ID for your Application.
+ *
+ * @return the appId value.
+ */
+ public String appId() {
+ return this.appId;
+ }
+
+ /**
+ * Get the applicationType property: Type of application being monitored.
+ *
+ * @return the applicationType value.
+ */
+ public ApplicationType applicationType() {
+ return this.applicationType;
+ }
+
+ /**
+ * Set the applicationType property: Type of application being monitored.
+ *
+ * @param applicationType the applicationType value to set.
+ * @return the ApplicationInsightsComponentProperties object itself.
+ */
+ public ApplicationInsightsComponentProperties withApplicationType(ApplicationType applicationType) {
+ this.applicationType = applicationType;
+ return this;
+ }
+
+ /**
+ * Get the flowType property: 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.
+ *
+ * @return the flowType value.
+ */
+ public FlowType flowType() {
+ return this.flowType;
+ }
+
+ /**
+ * Set the flowType property: 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.
+ *
+ * @param flowType the flowType value to set.
+ * @return the ApplicationInsightsComponentProperties object itself.
+ */
+ public ApplicationInsightsComponentProperties withFlowType(FlowType flowType) {
+ this.flowType = flowType;
+ return this;
+ }
+
+ /**
+ * Get the requestSource property: Describes what tool created this Application Insights component. Customers using
+ * this API should set this to the default 'rest'.
+ *
+ * @return the requestSource value.
+ */
+ public RequestSource requestSource() {
+ return this.requestSource;
+ }
+
+ /**
+ * Set the requestSource property: Describes what tool created this Application Insights component. Customers using
+ * this API should set this to the default 'rest'.
+ *
+ * @param requestSource the requestSource value to set.
+ * @return the ApplicationInsightsComponentProperties object itself.
+ */
+ public ApplicationInsightsComponentProperties withRequestSource(RequestSource requestSource) {
+ this.requestSource = requestSource;
+ return this;
+ }
+
+ /**
+ * Get the instrumentationKey property: 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.
+ *
+ * @return the instrumentationKey value.
+ */
+ public String instrumentationKey() {
+ return this.instrumentationKey;
+ }
+
+ /**
+ * Get the creationDate property: Creation Date for the Application Insights component, in ISO 8601 format.
+ *
+ * @return the creationDate value.
+ */
+ public OffsetDateTime creationDate() {
+ return this.creationDate;
+ }
+
+ /**
+ * Get the tenantId property: Azure Tenant Id.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the hockeyAppId property: The unique application ID created when a new application is added to HockeyApp,
+ * used for communications with HockeyApp.
+ *
+ * @return the hockeyAppId value.
+ */
+ public String hockeyAppId() {
+ return this.hockeyAppId;
+ }
+
+ /**
+ * Set the hockeyAppId property: The unique application ID created when a new application is added to HockeyApp,
+ * used for communications with HockeyApp.
+ *
+ * @param hockeyAppId the hockeyAppId value to set.
+ * @return the ApplicationInsightsComponentProperties object itself.
+ */
+ public ApplicationInsightsComponentProperties withHockeyAppId(String hockeyAppId) {
+ this.hockeyAppId = hockeyAppId;
+ return this;
+ }
+
+ /**
+ * Get the hockeyAppToken property: Token used to authenticate communications with between Application Insights and
+ * HockeyApp.
+ *
+ * @return the hockeyAppToken value.
+ */
+ public String hockeyAppToken() {
+ return this.hockeyAppToken;
+ }
+
+ /**
+ * Get the provisioningState property: 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.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the samplingPercentage property: Percentage of the data produced by the application being monitored that is
+ * being sampled for Application Insights telemetry.
+ *
+ * @return the samplingPercentage value.
+ */
+ public Double samplingPercentage() {
+ return this.samplingPercentage;
+ }
+
+ /**
+ * Set the samplingPercentage property: Percentage of the data produced by the application being monitored that is
+ * being sampled for Application Insights telemetry.
+ *
+ * @param samplingPercentage the samplingPercentage value to set.
+ * @return the ApplicationInsightsComponentProperties object itself.
+ */
+ public ApplicationInsightsComponentProperties withSamplingPercentage(Double samplingPercentage) {
+ this.samplingPercentage = samplingPercentage;
+ return this;
+ }
+
+ /**
+ * Get the connectionString property: Application Insights component connection string.
+ *
+ * @return the connectionString value.
+ */
+ public String connectionString() {
+ return this.connectionString;
+ }
+
+ /**
+ * Get the retentionInDays property: Retention period in days.
+ *
+ * @return the retentionInDays value.
+ */
+ public Integer retentionInDays() {
+ return this.retentionInDays;
+ }
+
+ /**
+ * Set the retentionInDays property: Retention period in days.
+ *
+ * @param retentionInDays the retentionInDays value to set.
+ * @return the ApplicationInsightsComponentProperties object itself.
+ */
+ public ApplicationInsightsComponentProperties withRetentionInDays(Integer retentionInDays) {
+ this.retentionInDays = retentionInDays;
+ return this;
+ }
+
+ /**
+ * Get the disableIpMasking property: Disable IP masking.
+ *
+ * @return the disableIpMasking value.
+ */
+ public Boolean disableIpMasking() {
+ return this.disableIpMasking;
+ }
+
+ /**
+ * Set the disableIpMasking property: Disable IP masking.
+ *
+ * @param disableIpMasking the disableIpMasking value to set.
+ * @return the ApplicationInsightsComponentProperties object itself.
+ */
+ public ApplicationInsightsComponentProperties withDisableIpMasking(Boolean disableIpMasking) {
+ this.disableIpMasking = disableIpMasking;
+ return this;
+ }
+
+ /**
+ * Get the immediatePurgeDataOn30Days property: Purge data immediately after 30 days.
+ *
+ * @return the immediatePurgeDataOn30Days value.
+ */
+ public Boolean immediatePurgeDataOn30Days() {
+ return this.immediatePurgeDataOn30Days;
+ }
+
+ /**
+ * Set the immediatePurgeDataOn30Days property: Purge data immediately after 30 days.
+ *
+ * @param immediatePurgeDataOn30Days the immediatePurgeDataOn30Days value to set.
+ * @return the ApplicationInsightsComponentProperties object itself.
+ */
+ public ApplicationInsightsComponentProperties withImmediatePurgeDataOn30Days(Boolean immediatePurgeDataOn30Days) {
+ this.immediatePurgeDataOn30Days = immediatePurgeDataOn30Days;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkScopedResources property: List of linked private link scope resources.
+ *
+ * @return the privateLinkScopedResources value.
+ */
+ public List privateLinkScopedResources() {
+ return this.privateLinkScopedResources;
+ }
+
+ /**
+ * Get the publicNetworkAccessForIngestion property: The network access type for accessing Application Insights
+ * ingestion.
+ *
+ * @return the publicNetworkAccessForIngestion value.
+ */
+ public PublicNetworkAccessType publicNetworkAccessForIngestion() {
+ return this.publicNetworkAccessForIngestion;
+ }
+
+ /**
+ * Set the publicNetworkAccessForIngestion property: The network access type for accessing Application Insights
+ * ingestion.
+ *
+ * @param publicNetworkAccessForIngestion the publicNetworkAccessForIngestion value to set.
+ * @return the ApplicationInsightsComponentProperties object itself.
+ */
+ public ApplicationInsightsComponentProperties withPublicNetworkAccessForIngestion(
+ PublicNetworkAccessType publicNetworkAccessForIngestion) {
+ this.publicNetworkAccessForIngestion = publicNetworkAccessForIngestion;
+ return this;
+ }
+
+ /**
+ * Get the publicNetworkAccessForQuery property: The network access type for accessing Application Insights query.
+ *
+ * @return the publicNetworkAccessForQuery value.
+ */
+ public PublicNetworkAccessType publicNetworkAccessForQuery() {
+ return this.publicNetworkAccessForQuery;
+ }
+
+ /**
+ * Set the publicNetworkAccessForQuery property: The network access type for accessing Application Insights query.
+ *
+ * @param publicNetworkAccessForQuery the publicNetworkAccessForQuery value to set.
+ * @return the ApplicationInsightsComponentProperties object itself.
+ */
+ public ApplicationInsightsComponentProperties withPublicNetworkAccessForQuery(
+ PublicNetworkAccessType publicNetworkAccessForQuery) {
+ this.publicNetworkAccessForQuery = publicNetworkAccessForQuery;
+ return this;
+ }
+
+ /**
+ * Get the ingestionMode property: Indicates the flow of the ingestion.
+ *
+ * @return the ingestionMode value.
+ */
+ public IngestionMode ingestionMode() {
+ return this.ingestionMode;
+ }
+
+ /**
+ * Set the ingestionMode property: Indicates the flow of the ingestion.
+ *
+ * @param ingestionMode the ingestionMode value to set.
+ * @return the ApplicationInsightsComponentProperties object itself.
+ */
+ public ApplicationInsightsComponentProperties withIngestionMode(IngestionMode ingestionMode) {
+ this.ingestionMode = ingestionMode;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (applicationType() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property applicationType in model ApplicationInsightsComponentProperties"));
+ }
+ if (privateLinkScopedResources() != null) {
+ privateLinkScopedResources().forEach(e -> e.validate());
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..3c03751128c10
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java
@@ -0,0 +1,66 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An Application Insights component linked storage accounts. */
+@Fluent
+public final class ComponentLinkedStorageAccountsInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentLinkedStorageAccountsInner.class);
+
+ /*
+ * The properties of the linked storage accounts.
+ */
+ @JsonProperty(value = "properties")
+ private LinkedStorageAccountsProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: The properties of the linked storage accounts.
+ *
+ * @return the innerProperties value.
+ */
+ private LinkedStorageAccountsProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the linkedStorageAccount property: Linked storage account resource ID.
+ *
+ * @return the linkedStorageAccount value.
+ */
+ public String linkedStorageAccount() {
+ return this.innerProperties() == null ? null : this.innerProperties().linkedStorageAccount();
+ }
+
+ /**
+ * Set the linkedStorageAccount property: Linked storage account resource ID.
+ *
+ * @param linkedStorageAccount the linkedStorageAccount value to set.
+ * @return the ComponentLinkedStorageAccountsInner object itself.
+ */
+ public ComponentLinkedStorageAccountsInner withLinkedStorageAccount(String linkedStorageAccount) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LinkedStorageAccountsProperties();
+ }
+ this.innerProperties().withLinkedStorageAccount(linkedStorageAccount);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..d5cbc7b4628fd
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java
@@ -0,0 +1,50 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An Application Insights component linked storage account. */
+@Fluent
+public final class LinkedStorageAccountsProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedStorageAccountsProperties.class);
+
+ /*
+ * Linked storage account resource ID
+ */
+ @JsonProperty(value = "linkedStorageAccount")
+ private String linkedStorageAccount;
+
+ /**
+ * Get the linkedStorageAccount property: Linked storage account resource ID.
+ *
+ * @return the linkedStorageAccount value.
+ */
+ public String linkedStorageAccount() {
+ return this.linkedStorageAccount;
+ }
+
+ /**
+ * Set the linkedStorageAccount property: Linked storage account resource ID.
+ *
+ * @param linkedStorageAccount the linkedStorageAccount value to set.
+ * @return the LinkedStorageAccountsProperties object itself.
+ */
+ public LinkedStorageAccountsProperties withLinkedStorageAccount(String linkedStorageAccount) {
+ this.linkedStorageAccount = linkedStorageAccount;
+ 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/fluent/models/LiveTokenResponseInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java
new file mode 100644
index 0000000000000..19d5a6f6a5312
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java
@@ -0,0 +1,39 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The response to a live token query. */
+@Immutable
+public final class LiveTokenResponseInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveTokenResponseInner.class);
+
+ /*
+ * JWT token for accessing live metrics stream data.
+ */
+ @JsonProperty(value = "liveToken", access = JsonProperty.Access.WRITE_ONLY)
+ private String liveToken;
+
+ /**
+ * Get the liveToken property: JWT token for accessing live metrics stream data.
+ *
+ * @return the liveToken value.
+ */
+ public String liveToken() {
+ return this.liveToken;
+ }
+
+ /**
+ * 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/fluent/models/MyWorkbookInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookInner.java
index f475ac944cceb..067723284c9db 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
@@ -5,10 +5,10 @@
package com.azure.resourcemanager.applicationinsights.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.applicationinsights.models.Kind;
-import com.azure.resourcemanager.applicationinsights.models.ManagedIdentity;
+import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentity;
import com.azure.resourcemanager.applicationinsights.models.MyWorkbookResource;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -16,9 +16,8 @@
import java.util.Map;
/** An Application Insights private workbook definition. */
-@JsonFlatten
@Fluent
-public class MyWorkbookInner extends MyWorkbookResource {
+public final class MyWorkbookInner extends MyWorkbookResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(MyWorkbookInner.class);
/*
@@ -28,62 +27,16 @@ public class MyWorkbookInner extends MyWorkbookResource {
private Kind kind;
/*
- * The user-defined name of the private workbook.
+ * Metadata describing a workbook for an Azure resource.
*/
- @JsonProperty(value = "properties.displayName")
- private String displayName;
+ @JsonProperty(value = "properties")
+ private MyWorkbookProperties innerProperties;
/*
- * Configuration of this particular private workbook. Configuration data is
- * a string containing valid JSON
+ * Metadata pertaining to creation and last modification of the resource.
*/
- @JsonProperty(value = "properties.serializedData")
- 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.
- */
- @JsonProperty(value = "properties.version")
- private String version;
-
- /*
- * Date and time in UTC of the last modification that was made to this
- * private workbook definition.
- */
- @JsonProperty(value = "properties.timeModified", access = JsonProperty.Access.WRITE_ONLY)
- private String timeModified;
-
- /*
- * Workbook category, as defined by the user at creation time.
- */
- @JsonProperty(value = "properties.category")
- private String category;
-
- /*
- * A list of 0 or more tags that are associated with this private workbook
- * definition
- */
- @JsonProperty(value = "properties.tags")
- private List tagsPropertiesTags;
-
- /*
- * Unique user id of the specific user that owns this private workbook.
- */
- @JsonProperty(value = "properties.userId", access = JsonProperty.Access.WRITE_ONLY)
- private String userId;
-
- /*
- * Optional resourceId for a source resource.
- */
- @JsonProperty(value = "properties.sourceId")
- private String sourceId;
-
- /*
- * BYOS Storage Account URI
- */
- @JsonProperty(value = "properties.storageUri")
- private String storageUri;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/**
* Get the kind property: The kind of workbook. Choices are user and shared.
@@ -105,13 +58,80 @@ public MyWorkbookInner withKind(Kind kind) {
return this;
}
+ /**
+ * Get the innerProperties property: Metadata describing a workbook for an Azure resource.
+ *
+ * @return the innerProperties value.
+ */
+ private MyWorkbookProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public MyWorkbookInner withIdentity(MyWorkbookManagedIdentity identity) {
+ super.withIdentity(identity);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public MyWorkbookInner withId(String id) {
+ super.withId(id);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public MyWorkbookInner withName(String name) {
+ super.withName(name);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public MyWorkbookInner withType(String type) {
+ super.withType(type);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public MyWorkbookInner withEtag(Map etag) {
+ super.withEtag(etag);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public MyWorkbookInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public MyWorkbookInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the displayName property: The user-defined name of the private workbook.
*
* @return the displayName value.
*/
public String displayName() {
- return this.displayName;
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
}
/**
@@ -121,7 +141,10 @@ public String displayName() {
* @return the MyWorkbookInner object itself.
*/
public MyWorkbookInner withDisplayName(String displayName) {
- this.displayName = displayName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MyWorkbookProperties();
+ }
+ this.innerProperties().withDisplayName(displayName);
return this;
}
@@ -132,7 +155,7 @@ public MyWorkbookInner withDisplayName(String displayName) {
* @return the serializedData value.
*/
public String serializedData() {
- return this.serializedData;
+ return this.innerProperties() == null ? null : this.innerProperties().serializedData();
}
/**
@@ -143,7 +166,10 @@ public String serializedData() {
* @return the MyWorkbookInner object itself.
*/
public MyWorkbookInner withSerializedData(String serializedData) {
- this.serializedData = serializedData;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MyWorkbookProperties();
+ }
+ this.innerProperties().withSerializedData(serializedData);
return this;
}
@@ -154,7 +180,7 @@ public MyWorkbookInner withSerializedData(String serializedData) {
* @return the version value.
*/
public String version() {
- return this.version;
+ return this.innerProperties() == null ? null : this.innerProperties().version();
}
/**
@@ -165,7 +191,10 @@ public String version() {
* @return the MyWorkbookInner object itself.
*/
public MyWorkbookInner withVersion(String version) {
- this.version = version;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MyWorkbookProperties();
+ }
+ this.innerProperties().withVersion(version);
return this;
}
@@ -176,7 +205,7 @@ public MyWorkbookInner withVersion(String version) {
* @return the timeModified value.
*/
public String timeModified() {
- return this.timeModified;
+ return this.innerProperties() == null ? null : this.innerProperties().timeModified();
}
/**
@@ -185,7 +214,7 @@ public String timeModified() {
* @return the category value.
*/
public String category() {
- return this.category;
+ return this.innerProperties() == null ? null : this.innerProperties().category();
}
/**
@@ -195,29 +224,33 @@ public String category() {
* @return the MyWorkbookInner object itself.
*/
public MyWorkbookInner withCategory(String category) {
- this.category = category;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MyWorkbookProperties();
+ }
+ this.innerProperties().withCategory(category);
return this;
}
/**
- * Get the tagsPropertiesTags property: A list of 0 or more tags that are associated with this private workbook
- * definition.
+ * Get the tags property: A list of 0 or more tags that are associated with this private workbook definition.
*
- * @return the tagsPropertiesTags value.
+ * @return the tags value.
*/
public List tagsPropertiesTags() {
- return this.tagsPropertiesTags;
+ return this.innerProperties() == null ? null : this.innerProperties().tags();
}
/**
- * Set the tagsPropertiesTags property: A list of 0 or more tags that are associated with this private workbook
- * definition.
+ * Set the tags property: A list of 0 or more tags that are associated with this private workbook definition.
*
- * @param tagsPropertiesTags the tagsPropertiesTags value to set.
+ * @param tags the tags value to set.
* @return the MyWorkbookInner object itself.
*/
- public MyWorkbookInner withTagsPropertiesTags(List tagsPropertiesTags) {
- this.tagsPropertiesTags = tagsPropertiesTags;
+ public MyWorkbookInner withTagsPropertiesTags(List tags) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MyWorkbookProperties();
+ }
+ this.innerProperties().withTags(tags);
return this;
}
@@ -227,7 +260,7 @@ public MyWorkbookInner withTagsPropertiesTags(List tagsPropertiesTags) {
* @return the userId value.
*/
public String userId() {
- return this.userId;
+ return this.innerProperties() == null ? null : this.innerProperties().userId();
}
/**
@@ -236,7 +269,7 @@ public String userId() {
* @return the sourceId value.
*/
public String sourceId() {
- return this.sourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().sourceId();
}
/**
@@ -246,7 +279,10 @@ public String sourceId() {
* @return the MyWorkbookInner object itself.
*/
public MyWorkbookInner withSourceId(String sourceId) {
- this.sourceId = sourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MyWorkbookProperties();
+ }
+ this.innerProperties().withSourceId(sourceId);
return this;
}
@@ -256,7 +292,7 @@ public MyWorkbookInner withSourceId(String sourceId) {
* @return the storageUri value.
*/
public String storageUri() {
- return this.storageUri;
+ return this.innerProperties() == null ? null : this.innerProperties().storageUri();
}
/**
@@ -266,56 +302,10 @@ public String storageUri() {
* @return the MyWorkbookInner object itself.
*/
public MyWorkbookInner withStorageUri(String storageUri) {
- this.storageUri = storageUri;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public MyWorkbookInner withIdentity(ManagedIdentity identity) {
- super.withIdentity(identity);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public MyWorkbookInner withId(String id) {
- super.withId(id);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public MyWorkbookInner withName(String name) {
- super.withName(name);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public MyWorkbookInner withType(String type) {
- super.withType(type);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public MyWorkbookInner withEtag(Map etag) {
- super.withEtag(etag);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public MyWorkbookInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public MyWorkbookInner withTags(Map tags) {
- super.withTags(tags);
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MyWorkbookProperties();
+ }
+ this.innerProperties().withStorageUri(storageUri);
return this;
}
@@ -327,5 +317,8 @@ public MyWorkbookInner withTags(Map tags) {
@Override
public void validate() {
super.validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
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
new file mode 100644
index 0000000000000..5b07673a01fc5
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookProperties.java
@@ -0,0 +1,263 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties that contain a private workbook. */
+@Fluent
+public final class MyWorkbookProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(MyWorkbookProperties.class);
+
+ /*
+ * The user-defined name of the private workbook.
+ */
+ @JsonProperty(value = "displayName", required = true)
+ private String displayName;
+
+ /*
+ * 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.
+ */
+ @JsonProperty(value = "version")
+ private String version;
+
+ /*
+ * 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;
+
+ /*
+ * Workbook category, as defined by the user at creation time.
+ */
+ @JsonProperty(value = "category", required = true)
+ private String category;
+
+ /*
+ * A list of 0 or more tags that are associated with this private workbook
+ * definition
+ */
+ @JsonProperty(value = "tags")
+ private List tags;
+
+ /*
+ * Unique user id of the specific user that owns this private workbook.
+ */
+ @JsonProperty(value = "userId", access = JsonProperty.Access.WRITE_ONLY)
+ private String userId;
+
+ /*
+ * Optional resourceId for a source resource.
+ */
+ @JsonProperty(value = "sourceId")
+ private String sourceId;
+
+ /*
+ * BYOS Storage Account URI
+ */
+ @JsonProperty(value = "storageUri")
+ private String storageUri;
+
+ /**
+ * Get the displayName property: The user-defined name of the private workbook.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The user-defined name of the private workbook.
+ *
+ * @param displayName the displayName value to set.
+ * @return the MyWorkbookProperties object itself.
+ */
+ public MyWorkbookProperties withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the serializedData property: Configuration of this particular private workbook. Configuration data is a
+ * string containing valid JSON.
+ *
+ * @return the serializedData value.
+ */
+ public String serializedData() {
+ return this.serializedData;
+ }
+
+ /**
+ * Set the serializedData property: Configuration of this particular private workbook. Configuration data is a
+ * string containing valid JSON.
+ *
+ * @param serializedData the serializedData value to set.
+ * @return the MyWorkbookProperties object itself.
+ */
+ public MyWorkbookProperties withSerializedData(String serializedData) {
+ this.serializedData = serializedData;
+ return this;
+ }
+
+ /**
+ * Get the version property: This instance's version of the data model. This can change as new features are added
+ * that can be marked private workbook.
+ *
+ * @return the version value.
+ */
+ public String version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version property: This instance's version of the data model. This can change as new features are added
+ * that can be marked private workbook.
+ *
+ * @param version the version value to set.
+ * @return the MyWorkbookProperties object itself.
+ */
+ public MyWorkbookProperties withVersion(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get the timeModified property: Date and time in UTC of the last modification that was made to this private
+ * workbook definition.
+ *
+ * @return the timeModified value.
+ */
+ public String timeModified() {
+ return this.timeModified;
+ }
+
+ /**
+ * Get the category property: Workbook category, as defined by the user at creation time.
+ *
+ * @return the category value.
+ */
+ public String category() {
+ return this.category;
+ }
+
+ /**
+ * Set the category property: Workbook category, as defined by the user at creation time.
+ *
+ * @param category the category value to set.
+ * @return the MyWorkbookProperties object itself.
+ */
+ public MyWorkbookProperties withCategory(String category) {
+ this.category = category;
+ return this;
+ }
+
+ /**
+ * Get the tags property: A list of 0 or more tags that are associated with this private workbook definition.
+ *
+ * @return the tags value.
+ */
+ public List tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: A list of 0 or more tags that are associated with this private workbook definition.
+ *
+ * @param tags the tags value to set.
+ * @return the MyWorkbookProperties object itself.
+ */
+ public MyWorkbookProperties withTags(List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the userId property: Unique user id of the specific user that owns this private workbook.
+ *
+ * @return the userId value.
+ */
+ public String userId() {
+ return this.userId;
+ }
+
+ /**
+ * Get the sourceId property: Optional resourceId for a source resource.
+ *
+ * @return the sourceId value.
+ */
+ public String sourceId() {
+ return this.sourceId;
+ }
+
+ /**
+ * Set the sourceId property: Optional resourceId for a source resource.
+ *
+ * @param sourceId the sourceId value to set.
+ * @return the MyWorkbookProperties object itself.
+ */
+ public MyWorkbookProperties withSourceId(String sourceId) {
+ this.sourceId = sourceId;
+ return this;
+ }
+
+ /**
+ * Get the storageUri property: BYOS Storage Account URI.
+ *
+ * @return the storageUri value.
+ */
+ public String storageUri() {
+ return this.storageUri;
+ }
+
+ /**
+ * Set the storageUri property: BYOS Storage Account URI.
+ *
+ * @param storageUri the storageUri value to set.
+ * @return the MyWorkbookProperties object itself.
+ */
+ public MyWorkbookProperties withStorageUri(String storageUri) {
+ this.storageUri = storageUri;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (displayName() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property displayName in model MyWorkbookProperties"));
+ }
+ if (serializedData() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property serializedData in model MyWorkbookProperties"));
+ }
+ if (category() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property category in model MyWorkbookProperties"));
+ }
+ }
+}
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 2952d50f4b29f..d2105b1acfa7c 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
@@ -10,7 +10,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** Azure Workbooks REST API operation. */
+/** CDN REST API operation. */
@Fluent
public final class OperationInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationLiveInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationLiveInner.java
new file mode 100644
index 0000000000000..40973b062bd19
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationLiveInner.java
@@ -0,0 +1,132 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.applicationinsights.models.OperationInfo;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents an operation returned by the GetOperations request. */
+@Fluent
+public final class OperationLiveInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationLiveInner.class);
+
+ /*
+ * Name of the operation
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Display name of the operation
+ */
+ @JsonProperty(value = "display")
+ private OperationInfo display;
+
+ /*
+ * Origin of the operation
+ */
+ @JsonProperty(value = "origin")
+ private String origin;
+
+ /*
+ * Properties of the operation
+ */
+ @JsonProperty(value = "properties")
+ private Object properties;
+
+ /**
+ * Get the name property: Name of the operation.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name of the operation.
+ *
+ * @param name the name value to set.
+ * @return the OperationLiveInner object itself.
+ */
+ public OperationLiveInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the display property: Display name of the operation.
+ *
+ * @return the display value.
+ */
+ public OperationInfo display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Display name of the operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationLiveInner object itself.
+ */
+ public OperationLiveInner withDisplay(OperationInfo display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: Origin of the operation.
+ *
+ * @return the origin value.
+ */
+ public String origin() {
+ return this.origin;
+ }
+
+ /**
+ * Set the origin property: Origin of the operation.
+ *
+ * @param origin the origin value to set.
+ * @return the OperationLiveInner object itself.
+ */
+ public OperationLiveInner withOrigin(String origin) {
+ this.origin = origin;
+ return this;
+ }
+
+ /**
+ * Get the properties property: Properties of the operation.
+ *
+ * @return the properties value.
+ */
+ public Object properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the operation.
+ *
+ * @param properties the properties value to set.
+ * @return the OperationLiveInner object itself.
+ */
+ public OperationLiveInner withProperties(Object properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
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 46f91d3baadc8..4c466545f0fa7 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
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.applicationinsights.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation;
import com.azure.resourcemanager.applicationinsights.models.WebTestKind;
@@ -17,9 +16,8 @@
import java.util.Map;
/** An Application Insights web test definition. */
-@JsonFlatten
@Fluent
-public class WebTestInner extends WebtestsResource {
+public final class WebTestInner extends WebtestsResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(WebTestInner.class);
/*
@@ -30,76 +28,10 @@ public class WebTestInner extends WebtestsResource {
private WebTestKind kind;
/*
- * Unique ID of this WebTest. This is typically the same value as the Name
- * field.
- */
- @JsonProperty(value = "properties.SyntheticMonitorId")
- private String syntheticMonitorId;
-
- /*
- * User defined name if this WebTest.
- */
- @JsonProperty(value = "properties.Name")
- private String webTestName;
-
- /*
- * Purpose/user defined descriptive test for this WebTest.
- */
- @JsonProperty(value = "properties.Description")
- private String description;
-
- /*
- * Is the test actively being monitored.
- */
- @JsonProperty(value = "properties.Enabled")
- private Boolean enabled;
-
- /*
- * Interval in seconds between test runs for this WebTest. Default value is
- * 300.
- */
- @JsonProperty(value = "properties.Frequency")
- private Integer frequency;
-
- /*
- * Seconds until this WebTest will timeout and fail. Default value is 30.
- */
- @JsonProperty(value = "properties.Timeout")
- private Integer timeout;
-
- /*
- * The kind of web test this is, valid choices are ping and multistep.
+ * Metadata describing a web test for an Azure resource.
*/
- @JsonProperty(value = "properties.Kind")
- private WebTestKind webTestKind;
-
- /*
- * Allow for retries should this WebTest fail.
- */
- @JsonProperty(value = "properties.RetryEnabled")
- private Boolean retryEnabled;
-
- /*
- * A list of where to physically run the tests from to give global coverage
- * for accessibility of your application.
- */
- @JsonProperty(value = "properties.Locations")
- private List locations;
-
- /*
- * An XML configuration specification for a WebTest.
- */
- @JsonProperty(value = "properties.Configuration")
- 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.
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private String provisioningState;
+ @JsonProperty(value = "properties")
+ private WebTestProperties innerProperties;
/**
* Get the kind property: The kind of web test that this web test watches. Choices are ping and multistep.
@@ -121,6 +53,29 @@ public WebTestInner withKind(WebTestKind kind) {
return this;
}
+ /**
+ * Get the innerProperties property: Metadata describing a web test for an Azure resource.
+ *
+ * @return the innerProperties value.
+ */
+ private WebTestProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public WebTestInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public WebTestInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name
* field.
@@ -128,7 +83,7 @@ public WebTestInner withKind(WebTestKind kind) {
* @return the syntheticMonitorId value.
*/
public String syntheticMonitorId() {
- return this.syntheticMonitorId;
+ return this.innerProperties() == null ? null : this.innerProperties().syntheticMonitorId();
}
/**
@@ -139,7 +94,10 @@ public String syntheticMonitorId() {
* @return the WebTestInner object itself.
*/
public WebTestInner withSyntheticMonitorId(String syntheticMonitorId) {
- this.syntheticMonitorId = syntheticMonitorId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WebTestProperties();
+ }
+ this.innerProperties().withSyntheticMonitorId(syntheticMonitorId);
return this;
}
@@ -149,7 +107,7 @@ public WebTestInner withSyntheticMonitorId(String syntheticMonitorId) {
* @return the webTestName value.
*/
public String webTestName() {
- return this.webTestName;
+ return this.innerProperties() == null ? null : this.innerProperties().webTestName();
}
/**
@@ -159,7 +117,10 @@ public String webTestName() {
* @return the WebTestInner object itself.
*/
public WebTestInner withWebTestName(String webTestName) {
- this.webTestName = webTestName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WebTestProperties();
+ }
+ this.innerProperties().withWebTestName(webTestName);
return this;
}
@@ -169,7 +130,7 @@ public WebTestInner withWebTestName(String webTestName) {
* @return the description value.
*/
public String description() {
- return this.description;
+ return this.innerProperties() == null ? null : this.innerProperties().description();
}
/**
@@ -179,7 +140,10 @@ public String description() {
* @return the WebTestInner object itself.
*/
public WebTestInner withDescription(String description) {
- this.description = description;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WebTestProperties();
+ }
+ this.innerProperties().withDescription(description);
return this;
}
@@ -189,7 +153,7 @@ public WebTestInner withDescription(String description) {
* @return the enabled value.
*/
public Boolean enabled() {
- return this.enabled;
+ return this.innerProperties() == null ? null : this.innerProperties().enabled();
}
/**
@@ -199,7 +163,10 @@ public Boolean enabled() {
* @return the WebTestInner object itself.
*/
public WebTestInner withEnabled(Boolean enabled) {
- this.enabled = enabled;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WebTestProperties();
+ }
+ this.innerProperties().withEnabled(enabled);
return this;
}
@@ -209,7 +176,7 @@ public WebTestInner withEnabled(Boolean enabled) {
* @return the frequency value.
*/
public Integer frequency() {
- return this.frequency;
+ return this.innerProperties() == null ? null : this.innerProperties().frequency();
}
/**
@@ -219,7 +186,10 @@ public Integer frequency() {
* @return the WebTestInner object itself.
*/
public WebTestInner withFrequency(Integer frequency) {
- this.frequency = frequency;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WebTestProperties();
+ }
+ this.innerProperties().withFrequency(frequency);
return this;
}
@@ -229,7 +199,7 @@ public WebTestInner withFrequency(Integer frequency) {
* @return the timeout value.
*/
public Integer timeout() {
- return this.timeout;
+ return this.innerProperties() == null ? null : this.innerProperties().timeout();
}
/**
@@ -239,7 +209,10 @@ public Integer timeout() {
* @return the WebTestInner object itself.
*/
public WebTestInner withTimeout(Integer timeout) {
- this.timeout = timeout;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WebTestProperties();
+ }
+ this.innerProperties().withTimeout(timeout);
return this;
}
@@ -249,7 +222,7 @@ public WebTestInner withTimeout(Integer timeout) {
* @return the webTestKind value.
*/
public WebTestKind webTestKind() {
- return this.webTestKind;
+ return this.innerProperties() == null ? null : this.innerProperties().webTestKind();
}
/**
@@ -259,7 +232,10 @@ public WebTestKind webTestKind() {
* @return the WebTestInner object itself.
*/
public WebTestInner withWebTestKind(WebTestKind webTestKind) {
- this.webTestKind = webTestKind;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WebTestProperties();
+ }
+ this.innerProperties().withWebTestKind(webTestKind);
return this;
}
@@ -269,7 +245,7 @@ public WebTestInner withWebTestKind(WebTestKind webTestKind) {
* @return the retryEnabled value.
*/
public Boolean retryEnabled() {
- return this.retryEnabled;
+ return this.innerProperties() == null ? null : this.innerProperties().retryEnabled();
}
/**
@@ -279,7 +255,10 @@ public Boolean retryEnabled() {
* @return the WebTestInner object itself.
*/
public WebTestInner withRetryEnabled(Boolean retryEnabled) {
- this.retryEnabled = retryEnabled;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WebTestProperties();
+ }
+ this.innerProperties().withRetryEnabled(retryEnabled);
return this;
}
@@ -290,7 +269,7 @@ public WebTestInner withRetryEnabled(Boolean retryEnabled) {
* @return the locations value.
*/
public List locations() {
- return this.locations;
+ return this.innerProperties() == null ? null : this.innerProperties().locations();
}
/**
@@ -301,7 +280,10 @@ public List locations() {
* @return the WebTestInner object itself.
*/
public WebTestInner withLocations(List locations) {
- this.locations = locations;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WebTestProperties();
+ }
+ this.innerProperties().withLocations(locations);
return this;
}
@@ -311,7 +293,7 @@ public WebTestInner withLocations(List locations) {
* @return the configuration value.
*/
public WebTestPropertiesConfiguration configuration() {
- return this.configuration;
+ return this.innerProperties() == null ? null : this.innerProperties().configuration();
}
/**
@@ -321,7 +303,10 @@ public WebTestPropertiesConfiguration configuration() {
* @return the WebTestInner object itself.
*/
public WebTestInner withConfiguration(WebTestPropertiesConfiguration configuration) {
- this.configuration = configuration;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WebTestProperties();
+ }
+ this.innerProperties().withConfiguration(configuration);
return this;
}
@@ -333,21 +318,7 @@ public WebTestInner withConfiguration(WebTestPropertiesConfiguration configurati
* @return the provisioningState value.
*/
public String provisioningState() {
- return this.provisioningState;
- }
-
- /** {@inheritDoc} */
- @Override
- public WebTestInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public WebTestInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -358,11 +329,8 @@ public WebTestInner withTags(Map tags) {
@Override
public void validate() {
super.validate();
- if (locations() != null) {
- locations().forEach(e -> e.validate());
- }
- if (configuration() != null) {
- configuration().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
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
new file mode 100644
index 0000000000000..24830c518cf8c
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestProperties.java
@@ -0,0 +1,341 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation;
+import com.azure.resourcemanager.applicationinsights.models.WebTestKind;
+import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Metadata describing a web test for an Azure resource. */
+@Fluent
+public final class WebTestProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WebTestProperties.class);
+
+ /*
+ * Unique ID of this WebTest. This is typically the same value as the Name
+ * field.
+ */
+ @JsonProperty(value = "SyntheticMonitorId", required = true)
+ private String syntheticMonitorId;
+
+ /*
+ * User defined name if this WebTest.
+ */
+ @JsonProperty(value = "Name", required = true)
+ private String webTestName;
+
+ /*
+ * Purpose/user defined descriptive test for this WebTest.
+ */
+ @JsonProperty(value = "Description")
+ private String description;
+
+ /*
+ * Is the test actively being monitored.
+ */
+ @JsonProperty(value = "Enabled")
+ private Boolean enabled;
+
+ /*
+ * Interval in seconds between test runs for this WebTest. Default value is
+ * 300.
+ */
+ @JsonProperty(value = "Frequency")
+ private Integer frequency;
+
+ /*
+ * Seconds until this WebTest will timeout and fail. Default value is 30.
+ */
+ @JsonProperty(value = "Timeout")
+ private Integer timeout;
+
+ /*
+ * The kind of web test this is, valid choices are ping and multistep.
+ */
+ @JsonProperty(value = "Kind", required = true)
+ private WebTestKind webTestKind;
+
+ /*
+ * Allow for retries should this WebTest fail.
+ */
+ @JsonProperty(value = "RetryEnabled")
+ private Boolean retryEnabled;
+
+ /*
+ * 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;
+
+ /*
+ * An XML configuration specification for a WebTest.
+ */
+ @JsonProperty(value = "Configuration")
+ 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.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /**
+ * Get the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name
+ * field.
+ *
+ * @return the syntheticMonitorId value.
+ */
+ public String syntheticMonitorId() {
+ return this.syntheticMonitorId;
+ }
+
+ /**
+ * Set the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name
+ * field.
+ *
+ * @param syntheticMonitorId the syntheticMonitorId value to set.
+ * @return the WebTestProperties object itself.
+ */
+ public WebTestProperties withSyntheticMonitorId(String syntheticMonitorId) {
+ this.syntheticMonitorId = syntheticMonitorId;
+ return this;
+ }
+
+ /**
+ * Get the webTestName property: User defined name if this WebTest.
+ *
+ * @return the webTestName value.
+ */
+ public String webTestName() {
+ return this.webTestName;
+ }
+
+ /**
+ * Set the webTestName property: User defined name if this WebTest.
+ *
+ * @param webTestName the webTestName value to set.
+ * @return the WebTestProperties object itself.
+ */
+ public WebTestProperties withWebTestName(String webTestName) {
+ this.webTestName = webTestName;
+ return this;
+ }
+
+ /**
+ * Get the description property: Purpose/user defined descriptive test for this WebTest.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Purpose/user defined descriptive test for this WebTest.
+ *
+ * @param description the description value to set.
+ * @return the WebTestProperties object itself.
+ */
+ public WebTestProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the enabled property: Is the test actively being monitored.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Is the test actively being monitored.
+ *
+ * @param enabled the enabled value to set.
+ * @return the WebTestProperties object itself.
+ */
+ public WebTestProperties withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the frequency property: Interval in seconds between test runs for this WebTest. Default value is 300.
+ *
+ * @return the frequency value.
+ */
+ public Integer frequency() {
+ return this.frequency;
+ }
+
+ /**
+ * Set the frequency property: Interval in seconds between test runs for this WebTest. Default value is 300.
+ *
+ * @param frequency the frequency value to set.
+ * @return the WebTestProperties object itself.
+ */
+ public WebTestProperties withFrequency(Integer frequency) {
+ this.frequency = frequency;
+ return this;
+ }
+
+ /**
+ * Get the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30.
+ *
+ * @return the timeout value.
+ */
+ public Integer timeout() {
+ return this.timeout;
+ }
+
+ /**
+ * Set the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30.
+ *
+ * @param timeout the timeout value to set.
+ * @return the WebTestProperties object itself.
+ */
+ public WebTestProperties withTimeout(Integer timeout) {
+ this.timeout = timeout;
+ return this;
+ }
+
+ /**
+ * Get the webTestKind property: The kind of web test this is, valid choices are ping and multistep.
+ *
+ * @return the webTestKind value.
+ */
+ public WebTestKind webTestKind() {
+ return this.webTestKind;
+ }
+
+ /**
+ * Set the webTestKind property: The kind of web test this is, valid choices are ping and multistep.
+ *
+ * @param webTestKind the webTestKind value to set.
+ * @return the WebTestProperties object itself.
+ */
+ public WebTestProperties withWebTestKind(WebTestKind webTestKind) {
+ this.webTestKind = webTestKind;
+ return this;
+ }
+
+ /**
+ * Get the retryEnabled property: Allow for retries should this WebTest fail.
+ *
+ * @return the retryEnabled value.
+ */
+ public Boolean retryEnabled() {
+ return this.retryEnabled;
+ }
+
+ /**
+ * Set the retryEnabled property: Allow for retries should this WebTest fail.
+ *
+ * @param retryEnabled the retryEnabled value to set.
+ * @return the WebTestProperties object itself.
+ */
+ public WebTestProperties withRetryEnabled(Boolean retryEnabled) {
+ this.retryEnabled = retryEnabled;
+ return this;
+ }
+
+ /**
+ * Get the locations property: A list of where to physically run the tests from to give global coverage for
+ * accessibility of your application.
+ *
+ * @return the locations value.
+ */
+ public List locations() {
+ return this.locations;
+ }
+
+ /**
+ * Set the locations property: A list of where to physically run the tests from to give global coverage for
+ * accessibility of your application.
+ *
+ * @param locations the locations value to set.
+ * @return the WebTestProperties object itself.
+ */
+ public WebTestProperties withLocations(List locations) {
+ this.locations = locations;
+ return this;
+ }
+
+ /**
+ * Get the configuration property: An XML configuration specification for a WebTest.
+ *
+ * @return the configuration value.
+ */
+ public WebTestPropertiesConfiguration configuration() {
+ return this.configuration;
+ }
+
+ /**
+ * Set the configuration property: An XML configuration specification for a WebTest.
+ *
+ * @param configuration the configuration value to set.
+ * @return the WebTestProperties object itself.
+ */
+ public WebTestProperties withConfiguration(WebTestPropertiesConfiguration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: 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.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (syntheticMonitorId() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property syntheticMonitorId in model WebTestProperties"));
+ }
+ if (webTestName() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property webTestName in model WebTestProperties"));
+ }
+ if (webTestKind() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property webTestKind in model WebTestProperties"));
+ }
+ if (locations() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property locations in model WebTestProperties"));
+ } else {
+ locations().forEach(e -> e.validate());
+ }
+ if (configuration() != null) {
+ configuration().validate();
+ }
+ }
+}
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 f9540794682f4..b7e91bae490ea 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
@@ -5,132 +5,68 @@
package com.azure.resourcemanager.applicationinsights.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.applicationinsights.models.Kind;
-import com.azure.resourcemanager.applicationinsights.models.ManagedIdentityAutoGenerated;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookResource;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
/** An Application Insights workbook definition. */
-@JsonFlatten
@Fluent
-public class WorkbookInner extends Resource {
+public final class WorkbookInner extends WorkbookResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookInner.class);
/*
- * The kind of workbook. Choices are user and shared.
+ * Metadata describing a workbook for an Azure resource.
*/
- @JsonProperty(value = "kind")
- private Kind kind;
+ @JsonProperty(value = "properties")
+ private WorkbookProperties innerProperties;
- /*
- * The user-defined name (display name) of the workbook.
- */
- @JsonProperty(value = "properties.displayName")
- private String displayName;
-
- /*
- * Configuration of this particular workbook. Configuration data is a
- * string containing valid JSON
- */
- @JsonProperty(value = "properties.serializedData")
- private String serializedData;
-
- /*
- * Workbook version
- */
- @JsonProperty(value = "properties.version")
- private String version;
-
- /*
- * Date and time in UTC of the last modification that was made to this
- * workbook definition.
- */
- @JsonProperty(value = "properties.timeModified", access = JsonProperty.Access.WRITE_ONLY)
- private String timeModified;
-
- /*
- * Workbook category, as defined by the user at creation time.
- */
- @JsonProperty(value = "properties.category")
- private String category;
-
- /*
- * A list of 0 or more tags that are associated with this workbook
- * definition
- */
- @JsonProperty(value = "properties.tags")
- private List tagsPropertiesTags;
-
- /*
- * Unique user id of the specific user that owns this workbook.
- */
- @JsonProperty(value = "properties.userId", access = JsonProperty.Access.WRITE_ONLY)
- private String userId;
-
- /*
- * ResourceId for a source resource.
- */
- @JsonProperty(value = "properties.sourceId")
- private String sourceId;
-
- /*
- * BYOS Storage Account URI
- */
- @JsonProperty(value = "properties.storageUri")
- private String storageUri;
-
- /*
- * Identity used for BYOS
- */
- @JsonProperty(value = "identity")
- private ManagedIdentityAutoGenerated identity;
-
- /*
- * Resource etag
+ /**
+ * Get the innerProperties property: Metadata describing a workbook for an Azure resource.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "etag")
- private Map etag;
+ private WorkbookProperties innerProperties() {
+ return this.innerProperties;
+ }
- /*
- * Azure resource Id
- */
- @JsonProperty(value = "id")
- private String id;
+ /** {@inheritDoc} */
+ @Override
+ public WorkbookInner withIdentity(WorkbookResourceIdentity identity) {
+ super.withIdentity(identity);
+ return this;
+ }
- /*
- * Azure resource name
- */
- @JsonProperty(value = "name")
- private String name;
+ /** {@inheritDoc} */
+ @Override
+ public WorkbookInner withKind(Kind kind) {
+ super.withKind(kind);
+ return this;
+ }
- /*
- * Azure resource type
- */
- @JsonProperty(value = "type")
- private String type;
+ /** {@inheritDoc} */
+ @Override
+ public WorkbookInner withEtag(String etag) {
+ super.withEtag(etag);
+ return this;
+ }
- /**
- * Get the kind property: The kind of workbook. Choices are user and shared.
- *
- * @return the kind value.
- */
- public Kind kind() {
- return this.kind;
+ /** {@inheritDoc} */
+ @Override
+ public WorkbookInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
}
- /**
- * Set the kind property: The kind of workbook. Choices are user and shared.
- *
- * @param kind the kind value to set.
- * @return the WorkbookInner object itself.
- */
- public WorkbookInner withKind(Kind kind) {
- this.kind = kind;
+ /** {@inheritDoc} */
+ @Override
+ public WorkbookInner withTags(Map tags) {
+ super.withTags(tags);
return this;
}
@@ -140,7 +76,7 @@ public WorkbookInner withKind(Kind kind) {
* @return the displayName value.
*/
public String displayName() {
- return this.displayName;
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
}
/**
@@ -150,7 +86,10 @@ public String displayName() {
* @return the WorkbookInner object itself.
*/
public WorkbookInner withDisplayName(String displayName) {
- this.displayName = displayName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookProperties();
+ }
+ this.innerProperties().withDisplayName(displayName);
return this;
}
@@ -161,7 +100,7 @@ public WorkbookInner withDisplayName(String displayName) {
* @return the serializedData value.
*/
public String serializedData() {
- return this.serializedData;
+ return this.innerProperties() == null ? null : this.innerProperties().serializedData();
}
/**
@@ -172,27 +111,35 @@ public String serializedData() {
* @return the WorkbookInner object itself.
*/
public WorkbookInner withSerializedData(String serializedData) {
- this.serializedData = serializedData;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookProperties();
+ }
+ this.innerProperties().withSerializedData(serializedData);
return this;
}
/**
- * Get the version property: Workbook version.
+ * Get the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook in
+ * serializedData.
*
* @return the version value.
*/
public String version() {
- return this.version;
+ return this.innerProperties() == null ? null : this.innerProperties().version();
}
/**
- * Set the version property: Workbook version.
+ * Set the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook in
+ * serializedData.
*
* @param version the version value to set.
* @return the WorkbookInner object itself.
*/
public WorkbookInner withVersion(String version) {
- this.version = version;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookProperties();
+ }
+ this.innerProperties().withVersion(version);
return this;
}
@@ -202,8 +149,8 @@ public WorkbookInner withVersion(String version) {
*
* @return the timeModified value.
*/
- public String timeModified() {
- return this.timeModified;
+ public OffsetDateTime timeModified() {
+ return this.innerProperties() == null ? null : this.innerProperties().timeModified();
}
/**
@@ -212,7 +159,7 @@ public String timeModified() {
* @return the category value.
*/
public String category() {
- return this.category;
+ return this.innerProperties() == null ? null : this.innerProperties().category();
}
/**
@@ -222,27 +169,33 @@ public String category() {
* @return the WorkbookInner object itself.
*/
public WorkbookInner withCategory(String category) {
- this.category = category;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookProperties();
+ }
+ this.innerProperties().withCategory(category);
return this;
}
/**
- * Get the tagsPropertiesTags property: A list of 0 or more tags that are associated with this workbook definition.
+ * Get the tags property: Being deprecated, please use the other tags field.
*
- * @return the tagsPropertiesTags value.
+ * @return the tags value.
*/
public List tagsPropertiesTags() {
- return this.tagsPropertiesTags;
+ return this.innerProperties() == null ? null : this.innerProperties().tags();
}
/**
- * Set the tagsPropertiesTags property: A list of 0 or more tags that are associated with this workbook definition.
+ * Set the tags property: Being deprecated, please use the other tags field.
*
- * @param tagsPropertiesTags the tagsPropertiesTags value to set.
+ * @param tags the tags value to set.
* @return the WorkbookInner object itself.
*/
- public WorkbookInner withTagsPropertiesTags(List tagsPropertiesTags) {
- this.tagsPropertiesTags = tagsPropertiesTags;
+ public WorkbookInner withTagsPropertiesTags(List tags) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookProperties();
+ }
+ this.innerProperties().withTags(tags);
return this;
}
@@ -252,7 +205,7 @@ public WorkbookInner withTagsPropertiesTags(List tagsPropertiesTags) {
* @return the userId value.
*/
public String userId() {
- return this.userId;
+ return this.innerProperties() == null ? null : this.innerProperties().userId();
}
/**
@@ -261,7 +214,7 @@ public String userId() {
* @return the sourceId value.
*/
public String sourceId() {
- return this.sourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().sourceId();
}
/**
@@ -271,142 +224,66 @@ public String sourceId() {
* @return the WorkbookInner object itself.
*/
public WorkbookInner withSourceId(String sourceId) {
- this.sourceId = sourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookProperties();
+ }
+ this.innerProperties().withSourceId(sourceId);
return this;
}
/**
- * Get the storageUri property: BYOS Storage Account URI.
+ * Get the storageUri property: The resourceId to the storage account when bring your own storage is used.
*
* @return the storageUri value.
*/
public String storageUri() {
- return this.storageUri;
+ return this.innerProperties() == null ? null : this.innerProperties().storageUri();
}
/**
- * Set the storageUri property: BYOS Storage Account URI.
+ * Set the storageUri property: The resourceId to the storage account when bring your own storage is used.
*
* @param storageUri the storageUri value to set.
* @return the WorkbookInner object itself.
*/
public WorkbookInner withStorageUri(String storageUri) {
- this.storageUri = storageUri;
- return this;
- }
-
- /**
- * Get the identity property: Identity used for BYOS.
- *
- * @return the identity value.
- */
- public ManagedIdentityAutoGenerated identity() {
- return this.identity;
- }
-
- /**
- * Set the identity property: Identity used for BYOS.
- *
- * @param identity the identity value to set.
- * @return the WorkbookInner object itself.
- */
- public WorkbookInner withIdentity(ManagedIdentityAutoGenerated identity) {
- this.identity = identity;
- return this;
- }
-
- /**
- * Get the etag property: Resource etag.
- *
- * @return the etag value.
- */
- public Map etag() {
- return this.etag;
- }
-
- /**
- * Set the etag property: Resource etag.
- *
- * @param etag the etag value to set.
- * @return the WorkbookInner object itself.
- */
- public WorkbookInner withEtag(Map etag) {
- this.etag = etag;
- return this;
- }
-
- /**
- * Get the id property: Azure resource Id.
- *
- * @return the id value.
- */
- public String id() {
- return this.id;
- }
-
- /**
- * Set the id property: Azure resource Id.
- *
- * @param id the id value to set.
- * @return the WorkbookInner object itself.
- */
- public WorkbookInner withId(String id) {
- this.id = id;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookProperties();
+ }
+ this.innerProperties().withStorageUri(storageUri);
return this;
}
/**
- * Get the name property: Azure resource name.
+ * Get the description property: The description of the workbook.
*
- * @return the name value.
+ * @return the description value.
*/
- public String name() {
- return this.name;
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
}
/**
- * Set the name property: Azure resource name.
+ * Set the description property: The description of the workbook.
*
- * @param name the name value to set.
+ * @param description the description value to set.
* @return the WorkbookInner object itself.
*/
- public WorkbookInner withName(String name) {
- this.name = name;
+ public WorkbookInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookProperties();
+ }
+ this.innerProperties().withDescription(description);
return this;
}
/**
- * Get the type property: Azure resource type.
- *
- * @return the type value.
- */
- public String type() {
- return this.type;
- }
-
- /**
- * Set the type property: Azure resource type.
+ * Get the revision property: The unique revision id for this workbook definition.
*
- * @param type the type value to set.
- * @return the WorkbookInner object itself.
+ * @return the revision value.
*/
- public WorkbookInner withType(String type) {
- this.type = type;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public WorkbookInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public WorkbookInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ public String revision() {
+ return this.innerProperties() == null ? null : this.innerProperties().revision();
}
/**
@@ -414,9 +291,11 @@ public WorkbookInner withTags(Map tags) {
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
+ @Override
public void validate() {
- if (identity() != null) {
- identity().validate();
+ super.validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
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
new file mode 100644
index 0000000000000..85aa81e35ba8f
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookProperties.java
@@ -0,0 +1,304 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** Properties that contain a workbook. */
+@Fluent
+public final class WorkbookProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookProperties.class);
+
+ /*
+ * The user-defined name (display name) of the workbook.
+ */
+ @JsonProperty(value = "displayName", required = true)
+ private String displayName;
+
+ /*
+ * 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
+ */
+ @JsonProperty(value = "version")
+ private String version;
+
+ /*
+ * 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;
+
+ /*
+ * Workbook category, as defined by the user at creation time.
+ */
+ @JsonProperty(value = "category", required = true)
+ private String category;
+
+ /*
+ * Being deprecated, please use the other tags field
+ */
+ @JsonProperty(value = "tags")
+ private List tags;
+
+ /*
+ * Unique user id of the specific user that owns this workbook.
+ */
+ @JsonProperty(value = "userId", access = JsonProperty.Access.WRITE_ONLY)
+ private String userId;
+
+ /*
+ * ResourceId for a source resource.
+ */
+ @JsonProperty(value = "sourceId")
+ private String sourceId;
+
+ /*
+ * The resourceId to the storage account when bring your own storage is
+ * used
+ */
+ @JsonProperty(value = "storageUri")
+ private String storageUri;
+
+ /*
+ * The description of the workbook.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * The unique revision id for this workbook definition
+ */
+ @JsonProperty(value = "revision", access = JsonProperty.Access.WRITE_ONLY)
+ private String revision;
+
+ /**
+ * Get the displayName property: The user-defined name (display name) of the workbook.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The user-defined name (display name) of the workbook.
+ *
+ * @param displayName the displayName value to set.
+ * @return the WorkbookProperties object itself.
+ */
+ public WorkbookProperties withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the serializedData property: Configuration of this particular workbook. Configuration data is a string
+ * containing valid JSON.
+ *
+ * @return the serializedData value.
+ */
+ public String serializedData() {
+ return this.serializedData;
+ }
+
+ /**
+ * Set the serializedData property: Configuration of this particular workbook. Configuration data is a string
+ * containing valid JSON.
+ *
+ * @param serializedData the serializedData value to set.
+ * @return the WorkbookProperties object itself.
+ */
+ public WorkbookProperties withSerializedData(String serializedData) {
+ this.serializedData = serializedData;
+ return this;
+ }
+
+ /**
+ * Get the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook in
+ * serializedData.
+ *
+ * @return the version value.
+ */
+ public String version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook in
+ * serializedData.
+ *
+ * @param version the version value to set.
+ * @return the WorkbookProperties object itself.
+ */
+ public WorkbookProperties withVersion(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get the timeModified property: Date and time in UTC of the last modification that was made to this workbook
+ * definition.
+ *
+ * @return the timeModified value.
+ */
+ public OffsetDateTime timeModified() {
+ return this.timeModified;
+ }
+
+ /**
+ * Get the category property: Workbook category, as defined by the user at creation time.
+ *
+ * @return the category value.
+ */
+ public String category() {
+ return this.category;
+ }
+
+ /**
+ * Set the category property: Workbook category, as defined by the user at creation time.
+ *
+ * @param category the category value to set.
+ * @return the WorkbookProperties object itself.
+ */
+ public WorkbookProperties withCategory(String category) {
+ this.category = category;
+ return this;
+ }
+
+ /**
+ * Get the tags property: Being deprecated, please use the other tags field.
+ *
+ * @return the tags value.
+ */
+ public List tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Being deprecated, please use the other tags field.
+ *
+ * @param tags the tags value to set.
+ * @return the WorkbookProperties object itself.
+ */
+ public WorkbookProperties withTags(List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the userId property: Unique user id of the specific user that owns this workbook.
+ *
+ * @return the userId value.
+ */
+ public String userId() {
+ return this.userId;
+ }
+
+ /**
+ * Get the sourceId property: ResourceId for a source resource.
+ *
+ * @return the sourceId value.
+ */
+ public String sourceId() {
+ return this.sourceId;
+ }
+
+ /**
+ * Set the sourceId property: ResourceId for a source resource.
+ *
+ * @param sourceId the sourceId value to set.
+ * @return the WorkbookProperties object itself.
+ */
+ public WorkbookProperties withSourceId(String sourceId) {
+ this.sourceId = sourceId;
+ return this;
+ }
+
+ /**
+ * Get the storageUri property: The resourceId to the storage account when bring your own storage is used.
+ *
+ * @return the storageUri value.
+ */
+ public String storageUri() {
+ return this.storageUri;
+ }
+
+ /**
+ * Set the storageUri property: The resourceId to the storage account when bring your own storage is used.
+ *
+ * @param storageUri the storageUri value to set.
+ * @return the WorkbookProperties object itself.
+ */
+ public WorkbookProperties withStorageUri(String storageUri) {
+ this.storageUri = storageUri;
+ return this;
+ }
+
+ /**
+ * Get the description property: The description of the workbook.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description of the workbook.
+ *
+ * @param description the description value to set.
+ * @return the WorkbookProperties object itself.
+ */
+ public WorkbookProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the revision property: The unique revision id for this workbook definition.
+ *
+ * @return the revision value.
+ */
+ public String revision() {
+ return this.revision;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (displayName() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property displayName in model WorkbookProperties"));
+ }
+ if (serializedData() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property serializedData in model WorkbookProperties"));
+ }
+ if (category() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property category in model WorkbookProperties"));
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..6ca2ca99a0f3d
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java
@@ -0,0 +1,185 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties that contain a workbook for PATCH operation. */
+@Fluent
+public final class WorkbookPropertiesUpdateParameters {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookPropertiesUpdateParameters.class);
+
+ /*
+ * The user-defined name (display name) of the workbook.
+ */
+ @JsonProperty(value = "displayName")
+ private String displayName;
+
+ /*
+ * Configuration of this particular workbook. Configuration data is a
+ * string containing valid JSON
+ */
+ @JsonProperty(value = "serializedData")
+ private String serializedData;
+
+ /*
+ * Workbook category, as defined by the user at creation time.
+ */
+ @JsonProperty(value = "category")
+ private String category;
+
+ /*
+ * A list of 0 or more tags that are associated with this workbook
+ * definition
+ */
+ @JsonProperty(value = "tags")
+ private List tags;
+
+ /*
+ * The description of the workbook.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * The unique revision id for this workbook definition
+ */
+ @JsonProperty(value = "revision")
+ private String revision;
+
+ /**
+ * Get the displayName property: The user-defined name (display name) of the workbook.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The user-defined name (display name) of the workbook.
+ *
+ * @param displayName the displayName value to set.
+ * @return the WorkbookPropertiesUpdateParameters object itself.
+ */
+ public WorkbookPropertiesUpdateParameters withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the serializedData property: Configuration of this particular workbook. Configuration data is a string
+ * containing valid JSON.
+ *
+ * @return the serializedData value.
+ */
+ public String serializedData() {
+ return this.serializedData;
+ }
+
+ /**
+ * Set the serializedData property: Configuration of this particular workbook. Configuration data is a string
+ * containing valid JSON.
+ *
+ * @param serializedData the serializedData value to set.
+ * @return the WorkbookPropertiesUpdateParameters object itself.
+ */
+ public WorkbookPropertiesUpdateParameters withSerializedData(String serializedData) {
+ this.serializedData = serializedData;
+ return this;
+ }
+
+ /**
+ * Get the category property: Workbook category, as defined by the user at creation time.
+ *
+ * @return the category value.
+ */
+ public String category() {
+ return this.category;
+ }
+
+ /**
+ * Set the category property: Workbook category, as defined by the user at creation time.
+ *
+ * @param category the category value to set.
+ * @return the WorkbookPropertiesUpdateParameters object itself.
+ */
+ public WorkbookPropertiesUpdateParameters withCategory(String category) {
+ this.category = category;
+ return this;
+ }
+
+ /**
+ * Get the tags property: A list of 0 or more tags that are associated with this workbook definition.
+ *
+ * @return the tags value.
+ */
+ public List tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: A list of 0 or more tags that are associated with this workbook definition.
+ *
+ * @param tags the tags value to set.
+ * @return the WorkbookPropertiesUpdateParameters object itself.
+ */
+ public WorkbookPropertiesUpdateParameters withTags(List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the description property: The description of the workbook.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description of the workbook.
+ *
+ * @param description the description value to set.
+ * @return the WorkbookPropertiesUpdateParameters object itself.
+ */
+ public WorkbookPropertiesUpdateParameters withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the revision property: The unique revision id for this workbook definition.
+ *
+ * @return the revision value.
+ */
+ public String revision() {
+ return this.revision;
+ }
+
+ /**
+ * Set the revision property: The unique revision id for this workbook definition.
+ *
+ * @param revision the revision value to set.
+ * @return the WorkbookPropertiesUpdateParameters object itself.
+ */
+ public WorkbookPropertiesUpdateParameters withRevision(String revision) {
+ this.revision = revision;
+ 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/fluent/models/WorkbookTemplateInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java
new file mode 100644
index 0000000000000..7fd549d73adb2
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java
@@ -0,0 +1,182 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateResource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** An Application Insights workbook template definition. */
+@Fluent
+public final class WorkbookTemplateInner extends WorkbookTemplateResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookTemplateInner.class);
+
+ /*
+ * Metadata describing a workbook template for an Azure resource.
+ */
+ @JsonProperty(value = "properties")
+ private WorkbookTemplateProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: Metadata describing a workbook template for an Azure resource.
+ *
+ * @return the innerProperties value.
+ */
+ private WorkbookTemplateProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public WorkbookTemplateInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public WorkbookTemplateInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the priority property: Priority of the template. Determines which template to open when a workbook gallery is
+ * opened in viewer mode.
+ *
+ * @return the priority value.
+ */
+ public Integer priority() {
+ return this.innerProperties() == null ? null : this.innerProperties().priority();
+ }
+
+ /**
+ * Set the priority property: Priority of the template. Determines which template to open when a workbook gallery is
+ * opened in viewer mode.
+ *
+ * @param priority the priority value to set.
+ * @return the WorkbookTemplateInner object itself.
+ */
+ public WorkbookTemplateInner withPriority(Integer priority) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookTemplateProperties();
+ }
+ this.innerProperties().withPriority(priority);
+ return this;
+ }
+
+ /**
+ * Get the author property: Information about the author of the workbook template.
+ *
+ * @return the author value.
+ */
+ public String author() {
+ return this.innerProperties() == null ? null : this.innerProperties().author();
+ }
+
+ /**
+ * Set the author property: Information about the author of the workbook template.
+ *
+ * @param author the author value to set.
+ * @return the WorkbookTemplateInner object itself.
+ */
+ public WorkbookTemplateInner withAuthor(String author) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookTemplateProperties();
+ }
+ this.innerProperties().withAuthor(author);
+ return this;
+ }
+
+ /**
+ * Get the templateData property: Valid JSON object containing workbook template payload.
+ *
+ * @return the templateData value.
+ */
+ public Object templateData() {
+ return this.innerProperties() == null ? null : this.innerProperties().templateData();
+ }
+
+ /**
+ * Set the templateData property: Valid JSON object containing workbook template payload.
+ *
+ * @param templateData the templateData value to set.
+ * @return the WorkbookTemplateInner object itself.
+ */
+ public WorkbookTemplateInner withTemplateData(Object templateData) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookTemplateProperties();
+ }
+ this.innerProperties().withTemplateData(templateData);
+ return this;
+ }
+
+ /**
+ * Get the galleries property: Workbook galleries supported by the template.
+ *
+ * @return the galleries value.
+ */
+ public List galleries() {
+ return this.innerProperties() == null ? null : this.innerProperties().galleries();
+ }
+
+ /**
+ * Set the galleries property: Workbook galleries supported by the template.
+ *
+ * @param galleries the galleries value to set.
+ * @return the WorkbookTemplateInner object itself.
+ */
+ public WorkbookTemplateInner withGalleries(List galleries) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookTemplateProperties();
+ }
+ this.innerProperties().withGalleries(galleries);
+ return this;
+ }
+
+ /**
+ * Get the localized property: Key value pair of localized gallery. Each key is the locale code of languages
+ * supported by the Azure portal.
+ *
+ * @return the localized value.
+ */
+ public Map> localized() {
+ return this.innerProperties() == null ? null : this.innerProperties().localized();
+ }
+
+ /**
+ * Set the localized property: Key value pair of localized gallery. Each key is the locale code of languages
+ * supported by the Azure portal.
+ *
+ * @param localized the localized value to set.
+ * @return the WorkbookTemplateInner object itself.
+ */
+ public WorkbookTemplateInner withLocalized(Map> localized) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkbookTemplateProperties();
+ }
+ this.innerProperties().withLocalized(localized);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..8d5ca5a998661
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateProperties.java
@@ -0,0 +1,190 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** Properties that contain a workbook template. */
+@Fluent
+public final class WorkbookTemplateProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookTemplateProperties.class);
+
+ /*
+ * Priority of the template. Determines which template to open when a
+ * workbook gallery is opened in viewer mode.
+ */
+ @JsonProperty(value = "priority")
+ private Integer priority;
+
+ /*
+ * Information about the author of the workbook template.
+ */
+ @JsonProperty(value = "author")
+ private String author;
+
+ /*
+ * Valid JSON object containing workbook template payload.
+ */
+ @JsonProperty(value = "templateData", required = true)
+ private Object templateData;
+
+ /*
+ * Workbook galleries supported by the template.
+ */
+ @JsonProperty(value = "galleries", required = true)
+ private List galleries;
+
+ /*
+ * 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;
+
+ /**
+ * Get the priority property: Priority of the template. Determines which template to open when a workbook gallery is
+ * opened in viewer mode.
+ *
+ * @return the priority value.
+ */
+ public Integer priority() {
+ return this.priority;
+ }
+
+ /**
+ * Set the priority property: Priority of the template. Determines which template to open when a workbook gallery is
+ * opened in viewer mode.
+ *
+ * @param priority the priority value to set.
+ * @return the WorkbookTemplateProperties object itself.
+ */
+ public WorkbookTemplateProperties withPriority(Integer priority) {
+ this.priority = priority;
+ return this;
+ }
+
+ /**
+ * Get the author property: Information about the author of the workbook template.
+ *
+ * @return the author value.
+ */
+ public String author() {
+ return this.author;
+ }
+
+ /**
+ * Set the author property: Information about the author of the workbook template.
+ *
+ * @param author the author value to set.
+ * @return the WorkbookTemplateProperties object itself.
+ */
+ public WorkbookTemplateProperties withAuthor(String author) {
+ this.author = author;
+ return this;
+ }
+
+ /**
+ * Get the templateData property: Valid JSON object containing workbook template payload.
+ *
+ * @return the templateData value.
+ */
+ public Object templateData() {
+ return this.templateData;
+ }
+
+ /**
+ * Set the templateData property: Valid JSON object containing workbook template payload.
+ *
+ * @param templateData the templateData value to set.
+ * @return the WorkbookTemplateProperties object itself.
+ */
+ public WorkbookTemplateProperties withTemplateData(Object templateData) {
+ this.templateData = templateData;
+ return this;
+ }
+
+ /**
+ * Get the galleries property: Workbook galleries supported by the template.
+ *
+ * @return the galleries value.
+ */
+ public List galleries() {
+ return this.galleries;
+ }
+
+ /**
+ * Set the galleries property: Workbook galleries supported by the template.
+ *
+ * @param galleries the galleries value to set.
+ * @return the WorkbookTemplateProperties object itself.
+ */
+ public WorkbookTemplateProperties withGalleries(List galleries) {
+ this.galleries = galleries;
+ return this;
+ }
+
+ /**
+ * Get the localized property: Key value pair of localized gallery. Each key is the locale code of languages
+ * supported by the Azure portal.
+ *
+ * @return the localized value.
+ */
+ public Map> localized() {
+ return this.localized;
+ }
+
+ /**
+ * Set the localized property: Key value pair of localized gallery. Each key is the locale code of languages
+ * supported by the Azure portal.
+ *
+ * @param localized the localized value to set.
+ * @return the WorkbookTemplateProperties object itself.
+ */
+ public WorkbookTemplateProperties withLocalized(Map> localized) {
+ this.localized = localized;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (templateData() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property templateData in model WorkbookTemplateProperties"));
+ }
+ if (galleries() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property galleries in model WorkbookTemplateProperties"));
+ } else {
+ galleries().forEach(e -> e.validate());
+ }
+ if (localized() != null) {
+ localized()
+ .values()
+ .forEach(
+ e -> {
+ if (e != null) {
+ e.forEach(e1 -> e1.validate());
+ }
+ });
+ }
+ }
+}
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 1003169755bba..ecbf4137f8388 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
@@ -4,14 +4,18 @@
package com.azure.resourcemanager.applicationinsights.implementation;
+import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentInner;
import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponent;
import com.azure.resourcemanager.applicationinsights.models.ApplicationType;
+import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBody;
+import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeResponse;
import com.azure.resourcemanager.applicationinsights.models.FlowType;
import com.azure.resourcemanager.applicationinsights.models.IngestionMode;
import com.azure.resourcemanager.applicationinsights.models.PrivateLinkScopedResource;
+import com.azure.resourcemanager.applicationinsights.models.PublicNetworkAccessType;
import com.azure.resourcemanager.applicationinsights.models.RequestSource;
import com.azure.resourcemanager.applicationinsights.models.TagsResource;
import java.time.OffsetDateTime;
@@ -129,6 +133,14 @@ public List privateLinkScopedResources() {
}
}
+ public PublicNetworkAccessType publicNetworkAccessForIngestion() {
+ return this.innerModel().publicNetworkAccessForIngestion();
+ }
+
+ public PublicNetworkAccessType publicNetworkAccessForQuery() {
+ return this.innerModel().publicNetworkAccessForQuery();
+ }
+
public IngestionMode ingestionMode() {
return this.innerModel().ingestionMode();
}
@@ -241,6 +253,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 ApplicationInsightsComponentImpl withRegion(Region location) {
this.innerModel().withLocation(location.toString());
return this;
@@ -306,6 +326,18 @@ public ApplicationInsightsComponentImpl withImmediatePurgeDataOn30Days(Boolean i
return this;
}
+ public ApplicationInsightsComponentImpl withPublicNetworkAccessForIngestion(
+ PublicNetworkAccessType publicNetworkAccessForIngestion) {
+ this.innerModel().withPublicNetworkAccessForIngestion(publicNetworkAccessForIngestion);
+ return this;
+ }
+
+ public ApplicationInsightsComponentImpl withPublicNetworkAccessForQuery(
+ PublicNetworkAccessType publicNetworkAccessForQuery) {
+ this.innerModel().withPublicNetworkAccessForQuery(publicNetworkAccessForQuery);
+ return this;
+ }
+
public ApplicationInsightsComponentImpl withIngestionMode(IngestionMode ingestionMode) {
this.innerModel().withIngestionMode(ingestionMode);
return this;
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 1f8a927f1fd14..bd27f5bac7ae2 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
@@ -28,16 +28,19 @@
import com.azure.resourcemanager.applicationinsights.fluent.ComponentAvailableFeaturesClient;
import com.azure.resourcemanager.applicationinsights.fluent.ComponentCurrentBillingFeaturesClient;
import com.azure.resourcemanager.applicationinsights.fluent.ComponentFeatureCapabilitiesClient;
+import com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient;
import com.azure.resourcemanager.applicationinsights.fluent.ComponentQuotaStatusClient;
import com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient;
import com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient;
import com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient;
+import com.azure.resourcemanager.applicationinsights.fluent.LiveTokensClient;
import com.azure.resourcemanager.applicationinsights.fluent.MyWorkbooksClient;
import com.azure.resourcemanager.applicationinsights.fluent.OperationsClient;
import com.azure.resourcemanager.applicationinsights.fluent.ProactiveDetectionConfigurationsClient;
import com.azure.resourcemanager.applicationinsights.fluent.WebTestLocationsClient;
import com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient;
import com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient;
+import com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient;
import com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient;
import java.io.IOException;
import java.lang.reflect.Type;
@@ -114,16 +117,16 @@ public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
- /** The AnalyticsItemsClient object to access its operations. */
- private final AnalyticsItemsClient analyticsItems;
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
/**
- * Gets the AnalyticsItemsClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the AnalyticsItemsClient object.
+ * @return the OperationsClient object.
*/
- public AnalyticsItemsClient getAnalyticsItems() {
- return this.analyticsItems;
+ public OperationsClient getOperations() {
+ return this.operations;
}
/** The AnnotationsClient object to access its operations. */
@@ -222,18 +225,6 @@ public ProactiveDetectionConfigurationsClient getProactiveDetectionConfiguration
return this.proactiveDetectionConfigurations;
}
- /** The ComponentsClient object to access its operations. */
- private final ComponentsClient components;
-
- /**
- * Gets the ComponentsClient object to access its operations.
- *
- * @return the ComponentsClient object.
- */
- public ComponentsClient getComponents() {
- return this.components;
- }
-
/** The WorkItemConfigurationsClient object to access its operations. */
private final WorkItemConfigurationsClient workItemConfigurations;
@@ -282,6 +273,30 @@ public WebTestsClient getWebTests() {
return this.webTests;
}
+ /** The AnalyticsItemsClient object to access its operations. */
+ private final AnalyticsItemsClient analyticsItems;
+
+ /**
+ * Gets the AnalyticsItemsClient object to access its operations.
+ *
+ * @return the AnalyticsItemsClient object.
+ */
+ public AnalyticsItemsClient getAnalyticsItems() {
+ return this.analyticsItems;
+ }
+
+ /** The WorkbookTemplatesClient object to access its operations. */
+ private final WorkbookTemplatesClient workbookTemplates;
+
+ /**
+ * Gets the WorkbookTemplatesClient object to access its operations.
+ *
+ * @return the WorkbookTemplatesClient object.
+ */
+ public WorkbookTemplatesClient getWorkbookTemplates() {
+ return this.workbookTemplates;
+ }
+
/** The MyWorkbooksClient object to access its operations. */
private final MyWorkbooksClient myWorkbooks;
@@ -306,16 +321,40 @@ public WorkbooksClient getWorkbooks() {
return this.workbooks;
}
- /** 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 ComponentLinkedStorageAccountsOperationsClient object to access its operations. */
+ private final ComponentLinkedStorageAccountsOperationsClient componentLinkedStorageAccountsOperations;
+
+ /**
+ * Gets the ComponentLinkedStorageAccountsOperationsClient object to access its operations.
+ *
+ * @return the ComponentLinkedStorageAccountsOperationsClient object.
+ */
+ public ComponentLinkedStorageAccountsOperationsClient getComponentLinkedStorageAccountsOperations() {
+ 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;
}
/**
@@ -340,7 +379,7 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.analyticsItems = new AnalyticsItemsClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
this.annotations = new AnnotationsClientImpl(this);
this.apiKeys = new ApiKeysClientImpl(this);
this.exportConfigurations = new ExportConfigurationsClientImpl(this);
@@ -349,14 +388,17 @@ public OperationsClient getOperations() {
this.componentFeatureCapabilities = new ComponentFeatureCapabilitiesClientImpl(this);
this.componentAvailableFeatures = new ComponentAvailableFeaturesClientImpl(this);
this.proactiveDetectionConfigurations = new ProactiveDetectionConfigurationsClientImpl(this);
- this.components = new ComponentsClientImpl(this);
this.workItemConfigurations = new WorkItemConfigurationsClientImpl(this);
this.favorites = new FavoritesClientImpl(this);
this.webTestLocations = new WebTestLocationsClientImpl(this);
this.webTests = new WebTestsClientImpl(this);
+ this.analyticsItems = new AnalyticsItemsClientImpl(this);
+ this.workbookTemplates = new WorkbookTemplatesClientImpl(this);
this.myWorkbooks = new MyWorkbooksClientImpl(this);
this.workbooks = new WorkbooksClientImpl(this);
- this.operations = new OperationsClientImpl(this);
+ this.components = new ComponentsClientImpl(this);
+ this.componentLinkedStorageAccountsOperations = new ComponentLinkedStorageAccountsOperationsClientImpl(this);
+ this.liveTokens = new LiveTokensClientImpl(this);
}
/**
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java
new file mode 100644
index 0000000000000..4c99cad4b0570
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java
@@ -0,0 +1,158 @@
+// 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.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner;
+import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts;
+import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsPatch;
+import com.azure.resourcemanager.applicationinsights.models.StorageType;
+
+public final class ComponentLinkedStorageAccountsImpl
+ implements ComponentLinkedStorageAccounts,
+ ComponentLinkedStorageAccounts.Definition,
+ ComponentLinkedStorageAccounts.Update {
+ private ComponentLinkedStorageAccountsInner innerObject;
+
+ private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String linkedStorageAccount() {
+ return this.innerModel().linkedStorageAccount();
+ }
+
+ public ComponentLinkedStorageAccountsInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String resourceName;
+
+ private StorageType storageType;
+
+ private ComponentLinkedStorageAccountsPatch updateLinkedStorageAccountsProperties;
+
+ public ComponentLinkedStorageAccountsImpl withExistingComponent(String resourceGroupName, String resourceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ public ComponentLinkedStorageAccounts create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getComponentLinkedStorageAccountsOperations()
+ .createAndUpdateWithResponse(
+ resourceGroupName, resourceName, storageType, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ComponentLinkedStorageAccounts create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getComponentLinkedStorageAccountsOperations()
+ .createAndUpdateWithResponse(resourceGroupName, resourceName, storageType, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ComponentLinkedStorageAccountsImpl(
+ StorageType name, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) {
+ this.innerObject = new ComponentLinkedStorageAccountsInner();
+ this.serviceManager = serviceManager;
+ this.storageType = name;
+ }
+
+ public ComponentLinkedStorageAccountsImpl update() {
+ this.updateLinkedStorageAccountsProperties = new ComponentLinkedStorageAccountsPatch();
+ return this;
+ }
+
+ public ComponentLinkedStorageAccounts apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getComponentLinkedStorageAccountsOperations()
+ .updateWithResponse(
+ resourceGroupName, resourceName, storageType, updateLinkedStorageAccountsProperties, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ComponentLinkedStorageAccounts apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getComponentLinkedStorageAccountsOperations()
+ .updateWithResponse(
+ resourceGroupName, resourceName, storageType, updateLinkedStorageAccountsProperties, context)
+ .getValue();
+ return this;
+ }
+
+ ComponentLinkedStorageAccountsImpl(
+ ComponentLinkedStorageAccountsInner innerObject,
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "components");
+ this.storageType =
+ StorageType.fromString(Utils.getValueFromIdByName(innerObject.id(), "linkedStorageAccounts"));
+ }
+
+ public ComponentLinkedStorageAccounts refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getComponentLinkedStorageAccountsOperations()
+ .getWithResponse(resourceGroupName, resourceName, storageType, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ComponentLinkedStorageAccounts refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getComponentLinkedStorageAccountsOperations()
+ .getWithResponse(resourceGroupName, resourceName, storageType, context)
+ .getValue();
+ return this;
+ }
+
+ public ComponentLinkedStorageAccountsImpl withLinkedStorageAccount(String linkedStorageAccount) {
+ if (isInCreateMode()) {
+ this.innerModel().withLinkedStorageAccount(linkedStorageAccount);
+ return this;
+ } else {
+ this.updateLinkedStorageAccountsProperties.withLinkedStorageAccount(linkedStorageAccount);
+ 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/ComponentLinkedStorageAccountsOperationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java
new file mode 100644
index 0000000000000..ed2b771b7d223
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java
@@ -0,0 +1,888 @@
+// 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.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient;
+import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner;
+import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsPatch;
+import com.azure.resourcemanager.applicationinsights.models.StorageType;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * ComponentLinkedStorageAccountsOperationsClient.
+ */
+public final class ComponentLinkedStorageAccountsOperationsClientImpl
+ implements ComponentLinkedStorageAccountsOperationsClient {
+ private final ClientLogger logger = new ClientLogger(ComponentLinkedStorageAccountsOperationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ComponentLinkedStorageAccountsOperationsService service;
+
+ /** The service client containing this operation class. */
+ private final ApplicationInsightsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ComponentLinkedStorageAccountsOperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ComponentLinkedStorageAccountsOperationsClientImpl(ApplicationInsightsManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ ComponentLinkedStorageAccountsOperationsService.class,
+ client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for
+ * ApplicationInsightsManagementClientComponentLinkedStorageAccountsOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ApplicationInsightsM")
+ private interface ComponentLinkedStorageAccountsOperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components"
+ + "/{resourceName}/linkedStorageAccounts/{storageType}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("storageType") StorageType storageType,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components"
+ + "/{resourceName}/linkedStorageAccounts/{storageType}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createAndUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("storageType") StorageType storageType,
+ @BodyParam("application/json") ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components"
+ + "/{resourceName}/linkedStorageAccounts/{storageType}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("storageType") StorageType storageType,
+ @BodyParam("application/json") ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components"
+ + "/{resourceName}/linkedStorageAccounts/{storageType}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("storageType") StorageType storageType,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Returns the current linked storage settings 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 storageType The type of the Application Insights component data source for the linked storage account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String resourceName, StorageType storageType) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (storageType == null) {
+ return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null."));
+ }
+ final String apiVersion = "2020-03-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceName,
+ storageType,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns the current linked storage settings 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String resourceName, StorageType storageType, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (storageType == null) {
+ return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null."));
+ }
+ final String apiVersion = "2020-03-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceName,
+ storageType,
+ accept,
+ context);
+ }
+
+ /**
+ * Returns the current linked storage settings 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 storageType The type of the Application Insights component data source for the linked storage account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String resourceName, StorageType storageType) {
+ return getWithResponseAsync(resourceGroupName, resourceName, storageType)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Returns the current linked storage settings 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 storageType The type of the Application Insights component data source for the linked storage account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ComponentLinkedStorageAccountsInner get(
+ String resourceGroupName, String resourceName, StorageType storageType) {
+ return getAsync(resourceGroupName, resourceName, storageType).block();
+ }
+
+ /**
+ * Returns the current linked storage settings 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String resourceName, StorageType storageType, Context context) {
+ return getWithResponseAsync(resourceGroupName, resourceName, storageType, context).block();
+ }
+
+ /**
+ * Replace current linked storage account 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 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createAndUpdateWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (storageType == null) {
+ return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null."));
+ }
+ if (linkedStorageAccountsProperties == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter linkedStorageAccountsProperties is required and cannot be null."));
+ } else {
+ linkedStorageAccountsProperties.validate();
+ }
+ final String apiVersion = "2020-03-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createAndUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceName,
+ storageType,
+ linkedStorageAccountsProperties,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Replace current linked storage account 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createAndUpdateWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (storageType == null) {
+ return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null."));
+ }
+ if (linkedStorageAccountsProperties == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter linkedStorageAccountsProperties is required and cannot be null."));
+ } else {
+ linkedStorageAccountsProperties.validate();
+ }
+ final String apiVersion = "2020-03-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createAndUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceName,
+ storageType,
+ linkedStorageAccountsProperties,
+ accept,
+ context);
+ }
+
+ /**
+ * Replace current linked storage account 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 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAndUpdateAsync(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties) {
+ return createAndUpdateWithResponseAsync(
+ resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Replace current linked storage account 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 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ComponentLinkedStorageAccountsInner createAndUpdate(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties) {
+ return createAndUpdateAsync(resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties)
+ .block();
+ }
+
+ /**
+ * Replace current linked storage account 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createAndUpdateWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties,
+ Context context) {
+ return createAndUpdateWithResponseAsync(
+ resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, context)
+ .block();
+ }
+
+ /**
+ * Update linked storage accounts 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 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (storageType == null) {
+ return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null."));
+ }
+ if (linkedStorageAccountsProperties == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter linkedStorageAccountsProperties is required and cannot be null."));
+ } else {
+ linkedStorageAccountsProperties.validate();
+ }
+ final String apiVersion = "2020-03-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceName,
+ storageType,
+ linkedStorageAccountsProperties,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update linked storage accounts 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (storageType == null) {
+ return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null."));
+ }
+ if (linkedStorageAccountsProperties == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter linkedStorageAccountsProperties is required and cannot be null."));
+ } else {
+ linkedStorageAccountsProperties.validate();
+ }
+ final String apiVersion = "2020-03-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceName,
+ storageType,
+ linkedStorageAccountsProperties,
+ accept,
+ context);
+ }
+
+ /**
+ * Update linked storage accounts 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 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties) {
+ return updateWithResponseAsync(resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Update linked storage accounts 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 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ComponentLinkedStorageAccountsInner update(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties) {
+ return updateAsync(resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties).block();
+ }
+
+ /**
+ * Update linked storage accounts 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ StorageType storageType,
+ ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties,
+ Context context) {
+ return updateWithResponseAsync(
+ resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, context)
+ .block();
+ }
+
+ /**
+ * Delete linked storage accounts 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 storageType The type of the Application Insights component data source for the linked storage account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String resourceName, StorageType storageType) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (storageType == null) {
+ return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null."));
+ }
+ final String apiVersion = "2020-03-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceName,
+ storageType,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete linked storage accounts 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 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String resourceName, StorageType storageType, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (storageType == null) {
+ return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null."));
+ }
+ final String apiVersion = "2020-03-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceName,
+ storageType,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete linked storage accounts 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 storageType The type of the Application Insights component data source for the linked storage account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String resourceName, StorageType storageType) {
+ return deleteWithResponseAsync(resourceGroupName, resourceName, storageType)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Delete linked storage accounts 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 storageType The type of the Application Insights component data source for the linked storage account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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)
+ public void delete(String resourceGroupName, String resourceName, StorageType storageType) {
+ deleteAsync(resourceGroupName, resourceName, storageType).block();
+ }
+
+ /**
+ * Delete linked storage accounts 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 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(
+ String resourceGroupName, String resourceName, StorageType storageType, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, resourceName, storageType, context).block();
+ }
+}
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
new file mode 100644
index 0000000000000..b851202e9d9e8
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java
@@ -0,0 +1,194 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient;
+import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner;
+import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts;
+import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsOperations;
+import com.azure.resourcemanager.applicationinsights.models.StorageType;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class ComponentLinkedStorageAccountsOperationsImpl implements ComponentLinkedStorageAccountsOperations {
+ @JsonIgnore
+ private final ClientLogger logger = new ClientLogger(ComponentLinkedStorageAccountsOperationsImpl.class);
+
+ private final ComponentLinkedStorageAccountsOperationsClient innerClient;
+
+ private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager;
+
+ public ComponentLinkedStorageAccountsOperationsImpl(
+ ComponentLinkedStorageAccountsOperationsClient innerClient,
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) {
+ this.innerClient = innerClient;
+ 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 =
+ this.serviceClient().getWithResponse(resourceGroupName, resourceName, storageType, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ComponentLinkedStorageAccountsImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String resourceName, StorageType storageType) {
+ this.serviceClient().delete(resourceGroupName, resourceName, storageType);
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String resourceName, StorageType storageType, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, storageType, context);
+ }
+
+ public ComponentLinkedStorageAccounts getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "components");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ 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) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.",
+ id)));
+ }
+ return this.getWithResponse(resourceGroupName, resourceName, storageType, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "components");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ 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) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.",
+ id)));
+ }
+ return this.getWithResponse(resourceGroupName, resourceName, storageType, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "components");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ 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) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.",
+ id)));
+ }
+ this.deleteWithResponse(resourceGroupName, resourceName, storageType, Context.NONE).getValue();
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "components");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ 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) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.",
+ id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, resourceName, storageType, context);
+ }
+
+ private ComponentLinkedStorageAccountsOperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() {
+ return this.serviceManager;
+ }
+
+ public ComponentLinkedStorageAccountsImpl define(StorageType name) {
+ return new ComponentLinkedStorageAccountsImpl(name, this.manager());
+ }
+}
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 baea1133817b1..ae70131c5f229 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
@@ -126,7 +126,7 @@ Mono> getByResourceGroup(
@Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components"
+ "/{resourceName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({200, 201})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> createOrUpdate(
@HostParam("$host") String endpoint,
@@ -142,7 +142,7 @@ Mono> createOrUpdate(
@Patch(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components"
+ "/{resourceName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({200, 201})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> updateTags(
@HostParam("$host") String endpoint,
@@ -228,7 +228,7 @@ private Mono> listSinglePageAsy
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -270,7 +270,7 @@ private Mono> listSinglePageAsy
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -367,7 +367,7 @@ private Mono> listByResourceGro
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -421,7 +421,7 @@ private Mono> listByResourceGro
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -538,7 +538,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
return FluxUtil
.withContext(
context ->
@@ -586,7 +586,7 @@ private Mono> deleteWithResponseAsync(
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
context = this.client.mergeContext(context);
return service
.delete(
@@ -675,7 +675,7 @@ private Mono> getByResourceGroupWith
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -725,7 +725,7 @@ private Mono> getByResourceGroupWith
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -835,7 +835,7 @@ private Mono> createOrUpdateWithResp
} else {
insightProperties.validate();
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -897,7 +897,7 @@ private Mono> createOrUpdateWithResp
} else {
insightProperties.validate();
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1016,7 +1016,7 @@ private Mono> updateTagsWithResponse
} else {
componentTags.validate();
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1073,7 +1073,7 @@ private Mono> updateTagsWithResponse
} else {
componentTags.validate();
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1191,7 +1191,7 @@ private Mono> purgeWithResponseAsync(
} else {
body.validate();
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1253,7 +1253,7 @@ private Mono> purgeWithResponseAsync(
} else {
body.validate();
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1378,7 +1378,7 @@ private Mono> getPurgeStatusWithResp
if (purgeId == null) {
return Mono.error(new IllegalArgumentException("Parameter purgeId is required and cannot be null."));
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1433,7 +1433,7 @@ private Mono> getPurgeStatusWithResp
if (purgeId == null) {
return Mono.error(new IllegalArgumentException("Parameter purgeId is required and cannot be null."));
}
- final String apiVersion = "2015-05-01";
+ final String apiVersion = "2018-05-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokenResponseImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokenResponseImpl.java
new file mode 100644
index 0000000000000..b012287eb24d5
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokenResponseImpl.java
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.applicationinsights.implementation;
+
+import com.azure.resourcemanager.applicationinsights.fluent.models.LiveTokenResponseInner;
+import com.azure.resourcemanager.applicationinsights.models.LiveTokenResponse;
+
+public final class LiveTokenResponseImpl implements LiveTokenResponse {
+ private LiveTokenResponseInner innerObject;
+
+ private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager;
+
+ LiveTokenResponseImpl(
+ LiveTokenResponseInner innerObject,
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String liveToken() {
+ return this.innerModel().liveToken();
+ }
+
+ public LiveTokenResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() {
+ return this.serviceManager;
+ }
+}
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
new file mode 100644
index 0000000000000..82786da8d2647
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensClientImpl.java
@@ -0,0 +1,173 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.applicationinsights.fluent.LiveTokensClient;
+import com.azure.resourcemanager.applicationinsights.fluent.models.LiveTokenResponseInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in LiveTokensClient. */
+public final class LiveTokensClientImpl implements LiveTokensClient {
+ private final ClientLogger logger = new ClientLogger(LiveTokensClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final LiveTokensService service;
+
+ /** The service client containing this operation class. */
+ private final ApplicationInsightsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of LiveTokensClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ LiveTokensClientImpl(ApplicationInsightsManagementClientImpl client) {
+ this.service =
+ RestProxy.create(LiveTokensService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ApplicationInsightsManagementClientLiveTokens to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ApplicationInsightsM")
+ private interface LiveTokensService {
+ @Headers({"Content-Type: application/json"})
+ @Post("/{resourceUri}/providers/microsoft.insights/generatelivetoken")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * **Gets an access token for live metrics stream data.**.
+ *
+ * @param resourceUri The identifier of the 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 response to a live token query.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceUri) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String apiVersion = "2020-06-02-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), resourceUri, apiVersion, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * **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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceUri, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String apiVersion = "2020-06-02-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), resourceUri, apiVersion, accept, context);
+ }
+
+ /**
+ * **Gets an access token for live metrics stream data.**.
+ *
+ * @param resourceUri The identifier of the 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 response to a live token query.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceUri) {
+ return getWithResponseAsync(resourceUri)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * **Gets an access token for live metrics stream data.**.
+ *
+ * @param resourceUri The identifier of the 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 response to a live token query.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LiveTokenResponseInner get(String resourceUri) {
+ return getAsync(resourceUri).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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceUri, Context context) {
+ return getWithResponseAsync(resourceUri, context).block();
+ }
+}
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
new file mode 100644
index 0000000000000..83344b427302e
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensImpl.java
@@ -0,0 +1,60 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.applicationinsights.fluent.LiveTokensClient;
+import com.azure.resourcemanager.applicationinsights.fluent.models.LiveTokenResponseInner;
+import com.azure.resourcemanager.applicationinsights.models.LiveTokenResponse;
+import com.azure.resourcemanager.applicationinsights.models.LiveTokens;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class LiveTokensImpl implements LiveTokens {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveTokensImpl.class);
+
+ private final LiveTokensClient innerClient;
+
+ private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager;
+
+ public LiveTokensImpl(
+ LiveTokensClient innerClient,
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) {
+ this.innerClient = innerClient;
+ 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) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new LiveTokenResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private LiveTokensClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java
index 3f25483ea1550..2ea5ac2dfba52 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java
@@ -5,11 +5,12 @@
package com.azure.resourcemanager.applicationinsights.implementation;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner;
import com.azure.resourcemanager.applicationinsights.models.Kind;
-import com.azure.resourcemanager.applicationinsights.models.ManagedIdentity;
import com.azure.resourcemanager.applicationinsights.models.MyWorkbook;
+import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentity;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -32,7 +33,7 @@ public Map tags() {
}
}
- public ManagedIdentity identity() {
+ public MyWorkbookManagedIdentity identity() {
return this.innerModel().identity();
}
@@ -61,6 +62,10 @@ public Kind kind() {
return this.innerModel().kind();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public String displayName() {
return this.innerModel().displayName();
}
@@ -229,7 +234,7 @@ public MyWorkbookImpl withTags(Map tags) {
return this;
}
- public MyWorkbookImpl withIdentity(ManagedIdentity identity) {
+ public MyWorkbookImpl withIdentity(MyWorkbookManagedIdentity identity) {
this.innerModel().withIdentity(identity);
return this;
}
@@ -290,12 +295,16 @@ public MyWorkbookImpl withStorageUri(String storageUri) {
}
public MyWorkbookImpl withSourceIdParameter(String sourceId) {
- this.createSourceId = sourceId;
- return this;
+ if (isInCreateMode()) {
+ this.createSourceId = sourceId;
+ return this;
+ } else {
+ this.updateSourceId = sourceId;
+ return this;
+ }
}
- public MyWorkbookImpl sourceIdParameter(String sourceId) {
- this.updateSourceId = sourceId;
- 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/MyWorkbooksClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java
index f17f27b69c992..91acb00250de3 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
@@ -220,7 +220,7 @@ private Mono> listByResourceGroupSinglePageAsync(
if (category == null) {
return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null."));
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
String tagsConverted =
JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV);
@@ -293,7 +293,7 @@ private Mono> listByResourceGroupSinglePageAsync(
if (category == null) {
return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null."));
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
String tagsConverted =
JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV);
@@ -469,7 +469,7 @@ private Mono> listSinglePageAsync(
if (category == null) {
return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null."));
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
String tagsConverted =
JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV);
@@ -529,7 +529,7 @@ private Mono> listSinglePageAsync(
if (category == null) {
return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null."));
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
String tagsConverted =
JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV);
@@ -680,7 +680,7 @@ private Mono> getByResourceGroupWithResponseAsync(
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -730,7 +730,7 @@ private Mono> getByResourceGroupWithResponseAsync(
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -830,7 +830,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -880,7 +880,7 @@ private Mono> deleteWithResponseAsync(
if (resourceName == null) {
return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -979,7 +979,7 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
workbookProperties.validate();
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1043,7 +1043,7 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
workbookProperties.validate();
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1193,7 +1193,7 @@ private Mono> updateWithResponseAsync(
} else {
workbookProperties.validate();
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1257,7 +1257,7 @@ private Mono> updateWithResponseAsync(
} else {
workbookProperties.validate();
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2021-03-08";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationLiveImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationLiveImpl.java
new file mode 100644
index 0000000000000..c256d0b1052c8
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationLiveImpl.java
@@ -0,0 +1,46 @@
+// 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.implementation;
+
+import com.azure.resourcemanager.applicationinsights.fluent.models.OperationLiveInner;
+import com.azure.resourcemanager.applicationinsights.models.OperationInfo;
+import com.azure.resourcemanager.applicationinsights.models.OperationLive;
+
+public final class OperationLiveImpl implements OperationLive {
+ private OperationLiveInner innerObject;
+
+ private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager;
+
+ OperationLiveImpl(
+ OperationLiveInner innerObject,
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public OperationInfo display() {
+ return this.innerModel().display();
+ }
+
+ public String origin() {
+ return this.innerModel().origin();
+ }
+
+ public Object properties() {
+ return this.innerModel().properties();
+ }
+
+ public OperationLiveInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() {
+ return this.serviceManager;
+ }
+}
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 7bd03e87bf856..2132f7df8fa6a 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
@@ -28,7 +28,9 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.applicationinsights.fluent.OperationsClient;
import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner;
+import com.azure.resourcemanager.applicationinsights.fluent.models.OperationLiveInner;
import com.azure.resourcemanager.applicationinsights.models.OperationListResult;
+import com.azure.resourcemanager.applicationinsights.models.OperationsListResult;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in OperationsClient. */
@@ -69,6 +71,16 @@ Mono> list(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/microsoft.insights/operations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -85,7 +97,7 @@ Mono> listNext(
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list Azure Workbooks operations.
+ * @return result of the request to list CDN operations.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -95,7 +107,7 @@ private Mono> listSinglePageAsync() {
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2015-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context))
@@ -118,7 +130,7 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list Azure Workbooks operations.
+ * @return result of the request to list CDN operations.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -128,7 +140,7 @@ private Mono> listSinglePageAsync(Context context)
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- final String apiVersion = "2020-10-20";
+ final String apiVersion = "2015-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -149,7 +161,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 Azure Workbooks operations.
+ * @return result of the request to list CDN operations.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -163,7 +175,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 Azure Workbooks operations.
+ * @return result of the request to list CDN operations.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -176,7 +188,7 @@ private PagedFlux listAsync(Context context) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list Azure Workbooks operations.
+ * @return result of the request to list CDN operations.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -190,13 +202,130 @@ 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 Azure Workbooks operations.
+ * @return result of the request to list CDN operations.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
return new PagedIterable<>(listAsync(context));
}
+ /**
+ * List the available operations supported by the resource provider.
+ *
+ * @throws 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 List Operations operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String apiVersion = "2020-06-02-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the available operations supported by the resource provider.
+ *
+ * @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 List Operations operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String apiVersion = "2020-06-02-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), apiVersion, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List the available operations supported by the resource provider.
+ *
+ * @throws 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 List Operations operation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the available operations supported by the resource provider.
+ *
+ * @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 List Operations operation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the available operations supported by the resource provider.
+ *
+ * @throws 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 List Operations operation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List the available operations supported by the resource provider.
+ *
+ * @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 List Operations operation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
/**
* Get the next page of items.
*
@@ -204,7 +333,7 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list Azure Workbooks operations.
+ * @return result of the request to list CDN operations.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -240,7 +369,7 @@ private Mono> listNextSinglePageAsync(String nextL
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 Azure Workbooks operations.
+ * @return result of the request to list CDN operations.
*/
@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/OperationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsImpl.java
index 38dc6c14deda5..81404e329c70f 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsImpl.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsImpl.java
@@ -9,7 +9,9 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.applicationinsights.fluent.OperationsClient;
import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner;
+import com.azure.resourcemanager.applicationinsights.fluent.models.OperationLiveInner;
import com.azure.resourcemanager.applicationinsights.models.Operation;
+import com.azure.resourcemanager.applicationinsights.models.OperationLive;
import com.azure.resourcemanager.applicationinsights.models.Operations;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -37,6 +39,16 @@ public PagedIterable list(Context context) {
return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new OperationLiveImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new OperationLiveImpl(inner1, this.manager()));
+ }
+
private OperationsClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java
index 4a85cd1206191..b6c1574b77fb6 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java
@@ -8,10 +8,11 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner;
import com.azure.resourcemanager.applicationinsights.models.Kind;
-import com.azure.resourcemanager.applicationinsights.models.ManagedIdentityAutoGenerated;
import com.azure.resourcemanager.applicationinsights.models.SharedTypeKind;
import com.azure.resourcemanager.applicationinsights.models.Workbook;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity;
import com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateParameters;
+import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -21,6 +22,18 @@ public final class WorkbookImpl implements Workbook, Workbook.Definition, Workbo
private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager;
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
public String location() {
return this.innerModel().location();
}
@@ -34,10 +47,18 @@ public Map tags() {
}
}
+ public WorkbookResourceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
public Kind kind() {
return this.innerModel().kind();
}
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
public String displayName() {
return this.innerModel().displayName();
}
@@ -50,7 +71,7 @@ public String version() {
return this.innerModel().version();
}
- public String timeModified() {
+ public OffsetDateTime timeModified() {
return this.innerModel().timeModified();
}
@@ -79,29 +100,12 @@ public String storageUri() {
return this.innerModel().storageUri();
}
- public ManagedIdentityAutoGenerated identity() {
- return this.innerModel().identity();
- }
-
- public Map etag() {
- Map inner = this.innerModel().etag();
- if (inner != null) {
- return Collections.unmodifiableMap(inner);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public String id() {
- return this.innerModel().id();
- }
-
- public String name() {
- return this.innerModel().name();
+ public String description() {
+ return this.innerModel().description();
}
- public String type() {
- return this.innerModel().type();
+ public String revision() {
+ return this.innerModel().revision();
}
public Region region() {
@@ -240,11 +244,21 @@ public WorkbookImpl withTags(Map tags) {
}
}
+ public WorkbookImpl withIdentity(WorkbookResourceIdentity identity) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ }
+
public WorkbookImpl withKind(Kind kind) {
this.innerModel().withKind(kind);
return this;
}
+ public WorkbookImpl withEtag(String etag) {
+ this.innerModel().withEtag(etag);
+ return this;
+ }
+
public WorkbookImpl withDisplayName(String displayName) {
if (isInCreateMode()) {
this.innerModel().withDisplayName(displayName);
@@ -291,8 +305,13 @@ public WorkbookImpl withTagsPropertiesTags(List tagsPropertiesTags) {
}
public WorkbookImpl withSourceId(String sourceId) {
- this.innerModel().withSourceId(sourceId);
- return this;
+ if (isInCreateMode()) {
+ this.innerModel().withSourceId(sourceId);
+ return this;
+ } else {
+ this.updateSourceId = sourceId;
+ return this;
+ }
}
public WorkbookImpl withStorageUri(String storageUri) {
@@ -300,24 +319,14 @@ public WorkbookImpl withStorageUri(String storageUri) {
return this;
}
- public WorkbookImpl withIdentity(ManagedIdentityAutoGenerated identity) {
- this.innerModel().withIdentity(identity);
- return this;
- }
-
- public WorkbookImpl withEtag(Map etag) {
- this.innerModel().withEtag(etag);
- return this;
- }
-
- public WorkbookImpl withName(String name) {
- this.innerModel().withName(name);
- return this;
- }
-
- public WorkbookImpl withType(String type) {
- this.innerModel().withType(type);
- return this;
+ public WorkbookImpl withDescription(String description) {
+ if (isInCreateMode()) {
+ this.innerModel().withDescription(description);
+ return this;
+ } else {
+ this.updateWorkbookUpdateParameters.withDescription(description);
+ return this;
+ }
}
public WorkbookImpl withSourceIdParameter(String sourceId) {
@@ -330,8 +339,8 @@ public WorkbookImpl withKind(SharedTypeKind kind) {
return this;
}
- public WorkbookImpl sourceId(String sourceId) {
- this.updateSourceId = sourceId;
+ public WorkbookImpl withRevision(String revision) {
+ this.updateWorkbookUpdateParameters.withRevision(revision);
return this;
}
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java
new file mode 100644
index 0000000000000..ec78274f15373
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java
@@ -0,0 +1,261 @@
+// 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.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateUpdateParameters;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class WorkbookTemplateImpl
+ implements WorkbookTemplate, WorkbookTemplate.Definition, WorkbookTemplate.Update {
+ private WorkbookTemplateInner innerObject;
+
+ private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public Integer priority() {
+ return this.innerModel().priority();
+ }
+
+ public String author() {
+ return this.innerModel().author();
+ }
+
+ public Object templateData() {
+ return this.innerModel().templateData();
+ }
+
+ public List galleries() {
+ List inner = this.innerModel().galleries();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Map> localized() {
+ Map> inner = this.innerModel().localized();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public WorkbookTemplateInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String resourceName;
+
+ private WorkbookTemplateUpdateParameters updateWorkbookTemplateUpdateParameters;
+
+ public WorkbookTemplateImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public WorkbookTemplate create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWorkbookTemplates()
+ .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public WorkbookTemplate create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWorkbookTemplates()
+ .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ WorkbookTemplateImpl(
+ String name, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) {
+ this.innerObject = new WorkbookTemplateInner();
+ this.serviceManager = serviceManager;
+ this.resourceName = name;
+ }
+
+ public WorkbookTemplateImpl update() {
+ this.updateWorkbookTemplateUpdateParameters = new WorkbookTemplateUpdateParameters();
+ return this;
+ }
+
+ public WorkbookTemplate apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWorkbookTemplates()
+ .updateWithResponse(
+ resourceGroupName, resourceName, updateWorkbookTemplateUpdateParameters, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public WorkbookTemplate apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWorkbookTemplates()
+ .updateWithResponse(resourceGroupName, resourceName, updateWorkbookTemplateUpdateParameters, context)
+ .getValue();
+ return this;
+ }
+
+ WorkbookTemplateImpl(
+ WorkbookTemplateInner innerObject,
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "workbooktemplates");
+ }
+
+ public WorkbookTemplate refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWorkbookTemplates()
+ .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public WorkbookTemplate refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWorkbookTemplates()
+ .getByResourceGroupWithResponse(resourceGroupName, resourceName, context)
+ .getValue();
+ return this;
+ }
+
+ public WorkbookTemplateImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public WorkbookTemplateImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public WorkbookTemplateImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateWorkbookTemplateUpdateParameters.withTags(tags);
+ return this;
+ }
+ }
+
+ public WorkbookTemplateImpl withPriority(Integer priority) {
+ if (isInCreateMode()) {
+ this.innerModel().withPriority(priority);
+ return this;
+ } else {
+ this.updateWorkbookTemplateUpdateParameters.withPriority(priority);
+ return this;
+ }
+ }
+
+ public WorkbookTemplateImpl withAuthor(String author) {
+ if (isInCreateMode()) {
+ this.innerModel().withAuthor(author);
+ return this;
+ } else {
+ this.updateWorkbookTemplateUpdateParameters.withAuthor(author);
+ return this;
+ }
+ }
+
+ public WorkbookTemplateImpl withTemplateData(Object templateData) {
+ if (isInCreateMode()) {
+ this.innerModel().withTemplateData(templateData);
+ return this;
+ } else {
+ this.updateWorkbookTemplateUpdateParameters.withTemplateData(templateData);
+ return this;
+ }
+ }
+
+ public WorkbookTemplateImpl withGalleries(List galleries) {
+ if (isInCreateMode()) {
+ this.innerModel().withGalleries(galleries);
+ return this;
+ } else {
+ this.updateWorkbookTemplateUpdateParameters.withGalleries(galleries);
+ return this;
+ }
+ }
+
+ public WorkbookTemplateImpl withLocalized(Map> localized) {
+ if (isInCreateMode()) {
+ this.innerModel().withLocalized(localized);
+ return this;
+ } else {
+ this.updateWorkbookTemplateUpdateParameters.withLocalized(localized);
+ 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/WorkbookTemplatesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java
new file mode 100644
index 0000000000000..4d9db7cbd8d23
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java
@@ -0,0 +1,968 @@
+// 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.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient;
+import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateUpdateParameters;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplatesListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in WorkbookTemplatesClient. */
+public final class WorkbookTemplatesClientImpl implements WorkbookTemplatesClient {
+ private final ClientLogger logger = new ClientLogger(WorkbookTemplatesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final WorkbookTemplatesService service;
+
+ /** The service client containing this operation class. */
+ private final ApplicationInsightsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of WorkbookTemplatesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ WorkbookTemplatesClientImpl(ApplicationInsightsManagementClientImpl client) {
+ this.service =
+ RestProxy.create(WorkbookTemplatesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ApplicationInsightsManagementClientWorkbookTemplates to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ApplicationInsightsM")
+ private interface WorkbookTemplatesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights"
+ + "/workbooktemplates")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights"
+ + "/workbooktemplates/{resourceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights"
+ + "/workbooktemplates/{resourceName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights"
+ + "/workbooktemplates/{resourceName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") WorkbookTemplateInner workbookTemplateProperties,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights"
+ + "/workbooktemplates/{resourceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get all Workbook templates defined within a 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 Workbook templates defined within a specified resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-11-20";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ apiVersion,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get all Workbook templates defined within a 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 Workbook templates defined within a specified resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-11-20";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ apiVersion,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * Get all Workbook templates defined within a 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 Workbook templates defined within a specified resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName));
+ }
+
+ /**
+ * Get all Workbook templates defined within a 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 Workbook templates defined within a specified resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Get all Workbook templates defined within a 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 Workbook templates defined within a specified resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Get all Workbook templates defined within a 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 Workbook templates defined within a specified resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, 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 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)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String resourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-11-20";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ apiVersion,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 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)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String resourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-11-20";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ apiVersion,
+ accept,
+ 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 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)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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 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)
+ public WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String resourceName) {
+ return getByResourceGroupAsync(resourceGroupName, resourceName).block();
+ }
+
+ /**
+ * 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 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)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String resourceName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block();
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-11-20";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ apiVersion,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String resourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String apiVersion = "2020-11-20";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ apiVersion,
+ accept,
+ 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String resourceName) {
+ return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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)
+ public void delete(String resourceGroupName, String resourceName) {
+ deleteAsync(resourceGroupName, resourceName).block();
+ }
+
+ /**
+ * 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, resourceName, context).block();
+ }
+
+ /**
+ * 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 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)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (workbookTemplateProperties == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter workbookTemplateProperties is required and cannot be null."));
+ } else {
+ workbookTemplateProperties.validate();
+ }
+ final String apiVersion = "2020-11-20";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ apiVersion,
+ workbookTemplateProperties,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ WorkbookTemplateInner workbookTemplateProperties,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (workbookTemplateProperties == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter workbookTemplateProperties is required and cannot be null."));
+ } else {
+ workbookTemplateProperties.validate();
+ }
+ final String apiVersion = "2020-11-20";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ apiVersion,
+ workbookTemplateProperties,
+ accept,
+ context);
+ }
+
+ /**
+ * 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 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)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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 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)
+ public WorkbookTemplateInner createOrUpdate(
+ String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) {
+ return createOrUpdateAsync(resourceGroupName, resourceName, workbookTemplateProperties).block();
+ }
+
+ /**
+ * 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.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ WorkbookTemplateInner workbookTemplateProperties,
+ Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties, context)
+ .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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (workbookTemplateUpdateParameters != null) {
+ workbookTemplateUpdateParameters.validate();
+ }
+ final String apiVersion = "2020-11-20";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ apiVersion,
+ workbookTemplateUpdateParameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (workbookTemplateUpdateParameters != null) {
+ workbookTemplateUpdateParameters.validate();
+ }
+ final String apiVersion = "2020-11-20";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ apiVersion,
+ workbookTemplateUpdateParameters,
+ accept,
+ 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.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName,
+ String resourceName,
+ WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters) {
+ return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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 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)
+ private Mono updateAsync(String resourceGroupName, String resourceName) {
+ final WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters = null;
+ return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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 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)
+ 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters,
+ Context context) {
+ return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters, context)
+ .block();
+ }
+}
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
new file mode 100644
index 0000000000000..6b44e27c64a9f
--- /dev/null
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java
@@ -0,0 +1,170 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient;
+import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate;
+import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplates;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class WorkbookTemplatesImpl implements WorkbookTemplates {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookTemplatesImpl.class);
+
+ private final WorkbookTemplatesClient innerClient;
+
+ private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager;
+
+ public WorkbookTemplatesImpl(
+ WorkbookTemplatesClient innerClient,
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new WorkbookTemplateImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ 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 =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new WorkbookTemplateImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String resourceName) {
+ this.serviceClient().delete(resourceGroupName, resourceName);
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context);
+ }
+
+ public WorkbookTemplate getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, resourceName, Context.NONE).getValue();
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, resourceName, context);
+ }
+
+ private WorkbookTemplatesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() {
+ return this.serviceManager;
+ }
+
+ public WorkbookTemplateImpl define(String name) {
+ return new WorkbookTemplateImpl(name, this.manager());
+ }
+}
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 b6e479c8d9f19..46c2398b2cfc4 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
@@ -163,6 +163,37 @@ Mono