diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md
index d896746fb3e3..c0e5c006d182 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md
@@ -1,14 +1,236 @@
# Release History
-## 1.2.0-beta.2 (Unreleased)
+## 1.2.0-beta.2 (2026-05-09)
-### Features Added
+- Azure Resource Manager ApplicationInsights client library for Java. This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Azure Application Insights client for saved items. Package api-version AnalyticsItems: 2015-05-01, ComponentAPIs: 2015-05-01, ComponentLinkedStorageAccountApi: 2020-03-01-preview, Components: 2020-02-02, DeletedWorkbookApi: 2024-02-01-preview, Favorites: 2015-05-01, LiveTokenApi: 2021-10-14, WebTestLocation: 2015-05-01, WebTestsApi: 2022-06-15, WorkBookOperations: 2021-03-08, WorkbooksApi: 2023-06-01, WorkbookTemplatesApi: 2020-11-20. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.WorkbooksListResult` was removed
+
+#### `models.ApplicationInsightsWebTestLocationsListResult` was removed
+
+#### `models.WorkbookResource` was removed
+
+#### `models.ApplicationInsightsComponentListResult` was removed
+
+#### `models.AnnotationsListResult` was removed
+
+#### `models.DeletedWorkbooksListResult` was removed
+
+#### `models.OperationListResult` was removed
+
+#### `models.WebTestListResult` was removed
+
+#### `models.ApplicationInsightsComponentApiKeyListResult` was removed
+
+#### `models.WorkItemConfigurationsListResult` was removed
+
+#### `models.WorkbookTemplatesListResult` was removed
+
+#### `models.WorkbookTemplateResource` was removed
+
+#### `models.WorkbookUpdateParameters` was modified
+
+* `validate()` was removed
+
+#### `models.WorkbookTemplateLocalizedGallery` was modified
+
+* `validate()` was removed
+
+#### `models.DeletedWorkbookResource` was modified
+
+* `withTags(java.util.Map)` was removed
+* `withLocation(java.lang.String)` was removed
+* `validate()` was removed
+* `models.DeletedWorkbookResource withKind(models.WorkbookSharedTypeKind)` -> `models.DeletedWorkbookResource withKind(models.WorkbookSharedTypeKind)`
+* `models.DeletedWorkbookResource withEtag(java.lang.String)` -> `models.DeletedWorkbookResource withEtag(java.lang.String)`
+
+#### `models.ApplicationInsightsComponentFeature` was modified
+
+* `ApplicationInsightsComponentFeature()` was changed to private access
+* `validate()` was removed
-### Other Changes
+#### `models.WebTestPropertiesConfiguration` was modified
+
+* `validate()` was removed
+
+#### `models.WorkbookTemplateUpdateParameters` was modified
+
+* `validate()` was removed
+
+#### `models.ApplicationInsightsComponentAnalyticsItemProperties` was modified
+
+* `validate()` was removed
+
+#### `models.AnnotationError` was modified
+
+* `AnnotationError()` was changed to private access
+* `validate()` was removed
+
+#### `models.InnerError` was modified
+
+* `InnerError()` was changed to private access
+* `withTime(java.time.OffsetDateTime)` was removed
+* `withDiagnosticcontext(java.lang.String)` was removed
+* `validate()` was removed
+
+#### `models.WorkbookInnerErrorTrace` was modified
+
+* `WorkbookInnerErrorTrace()` was changed to private access
+* `validate()` was removed
+
+#### `models.WorkbookErrorDefinition` was modified
+
+* `WorkbookErrorDefinition()` was changed to private access
+* `validate()` was removed
+
+#### `models.OperationDisplay` was modified
+
+* `OperationDisplay()` was changed to private access
+* `withProvider(java.lang.String)` was removed
+* `withResource(java.lang.String)` was removed
+* `validate()` was removed
+* `withOperation(java.lang.String)` was removed
+
+#### `models.ApplicationInsightsComponentDataVolumeCap` was modified
+
+* `validate()` was removed
+
+#### `models.WorkbookResourceIdentity` was modified
+
+* `validate()` was removed
+* `java.util.UUID tenantId()` -> `java.lang.String tenantId()`
+* `java.util.UUID principalId()` -> `java.lang.String principalId()`
+
+#### `models.ApplicationInsightsComponentExportRequest` was modified
+
+* `validate()` was removed
+
+#### `models.WebTestPropertiesRequest` was modified
+
+* `validate()` was removed
+
+#### `models.UserAssignedIdentity` was modified
+
+* `validate()` was removed
+* `java.util.UUID principalId()` -> `java.lang.String principalId()`
+* `java.util.UUID clientId()` -> `java.lang.String clientId()`
+
+#### `models.WebTestPropertiesValidationRules` was modified
+
+* `validate()` was removed
+
+#### `models.HeaderField` was modified
+
+* `validate()` was removed
+
+#### `models.WebtestsResource` was modified
+
+* `validate()` was removed
+* `withLocation(java.lang.String)` was removed
+* `withTags(java.util.Map)` was removed
+
+#### `models.ComponentsResource` was modified
+
+* `validate()` was removed
+* `withTags(java.util.Map)` was removed
+* `withLocation(java.lang.String)` was removed
+
+#### `models.WebTestGeolocation` was modified
+
+* `validate()` was removed
+
+#### `models.ComponentLinkedStorageAccountsPatch` was modified
+
+* `validate()` was removed
+
+#### `models.WorkItemCreateConfiguration` was modified
+
+* `validate()` was removed
+
+#### `models.ManagedServiceIdentity` was modified
+
+* `java.util.UUID principalId()` -> `java.lang.String principalId()`
+* `validate()` was removed
+* `java.util.UUID tenantId()` -> `java.lang.String tenantId()`
+
+#### `models.ApplicationInsightsComponentFeatureCapability` was modified
+
+* `ApplicationInsightsComponentFeatureCapability()` was changed to private access
+* `validate()` was removed
+
+#### `models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions` was modified
+
+* `validate()` was removed
+
+#### `models.WebTestPropertiesValidationRulesContentValidation` was modified
+
+* `validate()` was removed
+
+#### `models.WorkItemConfigurationError` was modified
+
+* `WorkItemConfigurationError()` was changed to private access
+* `validate()` was removed
+
+#### `models.ComponentPurgeBody` was modified
+
+* `validate()` was removed
+
+#### `models.DeletedWorkbookInnerErrorTrace` was modified
+
+* `DeletedWorkbookInnerErrorTrace()` was changed to private access
+* `validate()` was removed
+
+#### `models.WorkbookTemplateGallery` was modified
+
+* `validate()` was removed
+
+#### `models.ComponentPurgeBodyFilters` was modified
+
+* `validate()` was removed
+
+#### `models.ApiKeyRequest` was modified
+
+* `validate()` was removed
+
+#### `models.DeletedWorkbookErrorDefinition` was modified
+
+* `DeletedWorkbookErrorDefinition()` was changed to private access
+* `validate()` was removed
+
+#### `models.PrivateLinkScopedResource` was modified
+
+* `PrivateLinkScopedResource()` was changed to private access
+* `withScopeId(java.lang.String)` was removed
+* `withResourceId(java.lang.String)` was removed
+* `validate()` was removed
+
+#### `models.TagsResource` was modified
+
+* `validate()` was removed
+
+### Features Added
+
+* `models.TrackedResource` was added
+
+#### `models.ComponentLinkedStorageAccounts` was modified
+
+* `systemData()` was added
+
+#### `models.WebtestsResource` was modified
+
+* `tags()` was added
+* `location()` was added
+
+#### `models.ComponentsResource` was modified
+
+* `tags()` was added
+* `location()` was added
+
+#### `models.WorkbookTemplate` was modified
+
+* `systemData()` was added
## 1.2.0-beta.1 (2025-02-18)
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md
index cf8babd1affd..a0fa39c0b024 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-2024-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Azure Application Insights client for saved items. Package api-version AnalyticsItems: 2015-05-01, ComponentAPIs: 2015-05-01, ComponentLinkedStorageAccountApi: 2020-03-01-preview, Components: 2020-02-02, DeletedWorkbookApi: 2024-02-01-preview, Favorites: 2015-05-01, LiveTokenApi: 2021-10-14, WebTestLocation: 2015-05-01, WebTestsApi: 2022-06-15, WorkBookOperations: 2021-03-08, WorkbooksApi: 2023-06-01, WorkbookTemplatesApi: 2020-11-20. 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
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md
index 1d02c647db82..824afac274bb 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md
@@ -35,13 +35,6 @@
- [Get](#componentfeaturecapabilities_get)
-## ComponentLinkedStorageAccountsOperation
-
-- [CreateAndUpdate](#componentlinkedstorageaccountsoperation_createandupdate)
-- [Delete](#componentlinkedstorageaccountsoperation_delete)
-- [Get](#componentlinkedstorageaccountsoperation_get)
-- [Update](#componentlinkedstorageaccountsoperation_update)
-
## ComponentQuotaStatus
- [Get](#componentquotastatus_get)
@@ -57,10 +50,6 @@
- [Purge](#components_purge)
- [UpdateTags](#components_updatetags)
-## DeletedWorkbooks
-
-- [List](#deletedworkbooks_list)
-
## ExportConfigurations
- [Create](#exportconfigurations_create)
@@ -77,10 +66,6 @@
- [List](#favorites_list)
- [Update](#favorites_update)
-## LiveToken
-
-- [Get](#livetoken_get)
-
## ProactiveDetectionConfigurations
- [Get](#proactivedetectionconfigurations_get)
@@ -91,16 +76,6 @@
- [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)
@@ -109,25 +84,6 @@
- [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
@@ -138,9 +94,7 @@ import com.azure.resourcemanager.applicationinsights.models.ItemScopePath;
*/
public final class AnalyticsItemsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * AnalyticsItemDelete.json
+ * x-ms-original-file: 2015-05-01/AnalyticsItemDelete.json
*/
/**
* Sample code: AnalyticsItemDelete.
@@ -166,9 +120,7 @@ import com.azure.resourcemanager.applicationinsights.models.ItemScopePath;
*/
public final class AnalyticsItemsGetSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemGet
- * .json
+ * x-ms-original-file: 2015-05-01/AnalyticsItemGet.json
*/
/**
* Sample code: AnalyticsItemGet.
@@ -194,9 +146,7 @@ import com.azure.resourcemanager.applicationinsights.models.ItemScopePath;
*/
public final class AnalyticsItemsListSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * AnalyticsItemList.json
+ * x-ms-original-file: 2015-05-01/AnalyticsItemList.json
*/
/**
* Sample code: AnalyticsItemList.
@@ -225,9 +175,7 @@ import com.azure.resourcemanager.applicationinsights.models.ItemType;
*/
public final class AnalyticsItemsPutSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemPut
- * .json
+ * x-ms-original-file: 2015-05-01/AnalyticsItemPut.json
*/
/**
* Sample code: AnalyticsItemPut.
@@ -259,9 +207,7 @@ import java.time.OffsetDateTime;
*/
public final class AnnotationsCreateSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * AnnotationsCreate.json
+ * x-ms-original-file: 2015-05-01/AnnotationsCreate.json
*/
/**
* Sample code: AnnotationsCreate.
@@ -290,9 +236,7 @@ public final class AnnotationsCreateSamples {
*/
public final class AnnotationsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * AnnotationsDelete.json
+ * x-ms-original-file: 2015-05-01/AnnotationsDelete.json
*/
/**
* Sample code: AnnotationsDelete.
@@ -316,9 +260,7 @@ public final class AnnotationsDeleteSamples {
*/
public final class AnnotationsGetSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsGet.
- * json
+ * x-ms-original-file: 2015-05-01/AnnotationsGet.json
*/
/**
* Sample code: AnnotationsGet.
@@ -342,9 +284,7 @@ public final class AnnotationsGetSamples {
*/
public final class AnnotationsListSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsList.
- * json
+ * x-ms-original-file: 2015-05-01/AnnotationsList.json
*/
/**
* Sample code: AnnotationsList.
@@ -371,9 +311,7 @@ import java.util.Arrays;
*/
public final class ApiKeysCreateSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysCreate.
- * json
+ * x-ms-original-file: 2015-05-01/APIKeysCreate.json
*/
/**
* Sample code: APIKeyCreate.
@@ -401,9 +339,7 @@ public final class ApiKeysCreateSamples {
*/
public final class ApiKeysDeleteSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysDelete.
- * json
+ * x-ms-original-file: 2015-05-01/APIKeysDelete.json
*/
/**
* Sample code: APIKeyDelete.
@@ -426,8 +362,7 @@ public final class ApiKeysDeleteSamples {
*/
public final class ApiKeysGetSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysGet.json
+ * x-ms-original-file: 2015-05-01/APIKeysGet.json
*/
/**
* Sample code: APIKeysGet.
@@ -450,8 +385,7 @@ public final class ApiKeysGetSamples {
*/
public final class ApiKeysListSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysList.json
+ * x-ms-original-file: 2015-05-01/APIKeysList.json
*/
/**
* Sample code: APIKeysList.
@@ -472,9 +406,7 @@ public final class ApiKeysListSamples {
*/
public final class ComponentAvailableFeaturesGetSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * AvailableBillingFeaturesGet.json
+ * x-ms-original-file: 2015-05-01/AvailableBillingFeaturesGet.json
*/
/**
* Sample code: ComponentCurrentBillingFeaturesGet.
@@ -497,9 +429,7 @@ public final class ComponentAvailableFeaturesGetSamples {
*/
public final class ComponentCurrentBillingFeaturesGetSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * CurrentBillingFeaturesGet.json
+ * x-ms-original-file: 2015-05-01/CurrentBillingFeaturesGet.json
*/
/**
* Sample code: ComponentCurrentBillingFeaturesGet.
@@ -526,9 +456,7 @@ import java.util.Arrays;
*/
public final class ComponentCurrentBillingFeaturesUpdateSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * CurrentBillingFeaturesUpdate.json
+ * x-ms-original-file: 2015-05-01/CurrentBillingFeaturesUpdate.json
*/
/**
* Sample code: ComponentCurrentBillingFeaturesUpdate.
@@ -556,9 +484,7 @@ public final class ComponentCurrentBillingFeaturesUpdateSamples {
*/
public final class ComponentFeatureCapabilitiesGetSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * FeatureCapabilitiesGet.json
+ * x-ms-original-file: 2015-05-01/FeatureCapabilitiesGet.json
*/
/**
* Sample code: ComponentCurrentBillingFeaturesGet.
@@ -573,127 +499,6 @@ public final class ComponentFeatureCapabilitiesGetSamples {
}
```
-### 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.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,
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### ComponentLinkedStorageAccountsOperation_Get
-
-```java
-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,
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### ComponentLinkedStorageAccountsOperation_Update
-
-```java
-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,
- com.azure.core.util.Context.NONE)
- .getValue();
- resource.update()
- .withLinkedStorageAccount(
- "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname")
- .apply();
- }
-}
-```
-
### ComponentQuotaStatus_Get
```java
@@ -702,9 +507,7 @@ public final class ComponentLinkedStorageAccountsOperationUpdateSamples {
*/
public final class ComponentQuotaStatusGetSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/QuotaStatusGet.
- * json
+ * x-ms-original-file: 2015-05-01/QuotaStatusGet.json
*/
/**
* Sample code: ComponentCurrentBillingFeaturesGet.
@@ -733,9 +536,7 @@ import java.util.Map;
*/
public final class ComponentsCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsCreate
- * .json
+ * x-ms-original-file: 2020-02-02/ComponentsCreate.json
*/
/**
* Sample code: ComponentCreate.
@@ -758,9 +559,7 @@ public final class ComponentsCreateOrUpdateSamples {
}
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsUpdate
- * .json
+ * x-ms-original-file: 2020-02-02/ComponentsUpdate.json
*/
/**
* Sample code: ComponentUpdate.
@@ -800,9 +599,7 @@ public final class ComponentsCreateOrUpdateSamples {
*/
public final class ComponentsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsDelete
- * .json
+ * x-ms-original-file: 2020-02-02/ComponentsDelete.json
*/
/**
* Sample code: ComponentsDelete.
@@ -825,9 +622,7 @@ public final class ComponentsDeleteSamples {
*/
public final class ComponentsGetByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsGet.
- * json
+ * x-ms-original-file: 2020-02-02/ComponentsGet.json
*/
/**
* Sample code: ComponentGet.
@@ -849,9 +644,7 @@ public final class ComponentsGetByResourceGroupSamples {
*/
public final class ComponentsGetPurgeStatusSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/
- * ComponentsPurgeStatus.json
+ * x-ms-original-file: 2020-02-02/ComponentsPurgeStatus.json
*/
/**
* Sample code: ComponentPurge.
@@ -875,9 +668,7 @@ public final class ComponentsGetPurgeStatusSamples {
*/
public final class ComponentsListSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsList.
- * json
+ * x-ms-original-file: 2020-02-02/ComponentsList.json
*/
/**
* Sample code: ComponentsList.json.
@@ -899,9 +690,7 @@ public final class ComponentsListSamples {
*/
public final class ComponentsListByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/
- * ComponentsListByResourceGroup.json
+ * x-ms-original-file: 2020-02-02/ComponentsListByResourceGroup.json
*/
/**
* Sample code: ComponentListByResourceGroup.
@@ -927,9 +716,7 @@ import java.util.Arrays;
*/
public final class ComponentsPurgeSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurge.
- * json
+ * x-ms-original-file: 2020-02-02/ComponentsPurge.json
*/
/**
* Sample code: ComponentPurge.
@@ -961,9 +748,7 @@ import java.util.Map;
*/
public final class ComponentsUpdateTagsSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/
- * ComponentsUpdateTagsOnly.json
+ * x-ms-original-file: 2020-02-02/ComponentsUpdateTagsOnly.json
*/
/**
* Sample code: ComponentUpdateTagsOnly.
@@ -995,31 +780,6 @@ public final class ComponentsUpdateTagsSamples {
}
```
-### DeletedWorkbooks_List
-
-```java
-
-/**
- * Samples for DeletedWorkbooks List.
- */
-public final class DeletedWorkbooksListSamples {
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2024-02-01-preview/examples/
- * DeletedWorkbooksList.json
- */
- /**
- * Sample code: WorkbooksListSub.
- *
- * @param manager Entry point to ApplicationInsightsManager.
- */
- public static void
- workbooksListSub(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
- manager.deletedWorkbooks().list(null, null, com.azure.core.util.Context.NONE);
- }
-}
-```
-
### ExportConfigurations_Create
```java
@@ -1030,9 +790,7 @@ import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsC
*/
public final class ExportConfigurationsCreateSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * ExportConfigurationsPost.json
+ * x-ms-original-file: 2015-05-01/ExportConfigurationsPost.json
*/
/**
* Sample code: ExportConfigurationPost.
@@ -1068,9 +826,7 @@ public final class ExportConfigurationsCreateSamples {
*/
public final class ExportConfigurationsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * ExportConfigurationDelete.json
+ * x-ms-original-file: 2015-05-01/ExportConfigurationDelete.json
*/
/**
* Sample code: ExportConfigurationDelete.
@@ -1094,9 +850,7 @@ public final class ExportConfigurationsDeleteSamples {
*/
public final class ExportConfigurationsGetSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * ExportConfigurationGet.json
+ * x-ms-original-file: 2015-05-01/ExportConfigurationGet.json
*/
/**
* Sample code: ExportConfigurationGet.
@@ -1120,9 +874,7 @@ public final class ExportConfigurationsGetSamples {
*/
public final class ExportConfigurationsListSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * ExportConfigurationsList.json
+ * x-ms-original-file: 2015-05-01/ExportConfigurationsList.json
*/
/**
* Sample code: ExportConfigurationsList.
@@ -1147,9 +899,7 @@ import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsC
*/
public final class ExportConfigurationsUpdateSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * ExportConfigurationUpdate.json
+ * x-ms-original-file: 2015-05-01/ExportConfigurationUpdate.json
*/
/**
* Sample code: ExportConfigurationUpdate.
@@ -1189,8 +939,7 @@ import java.util.Arrays;
*/
public final class FavoritesAddSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteAdd.json
+ * x-ms-original-file: 2015-05-01/FavoriteAdd.json
*/
/**
* Sample code: FavoriteAdd.
@@ -1220,9 +969,7 @@ public final class FavoritesAddSamples {
*/
public final class FavoritesDeleteSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteDelete.
- * json
+ * x-ms-original-file: 2015-05-01/FavoriteDelete.json
*/
/**
* Sample code: FavoriteList.
@@ -1245,8 +992,7 @@ public final class FavoritesDeleteSamples {
*/
public final class FavoritesGetSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteGet.json
+ * x-ms-original-file: 2015-05-01/FavoriteGet.json
*/
/**
* Sample code: FavoriteGet.
@@ -1270,9 +1016,7 @@ public final class FavoritesGetSamples {
*/
public final class FavoritesListSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoritesList.
- * json
+ * x-ms-original-file: 2015-05-01/FavoritesList.json
*/
/**
* Sample code: FavoritesList.
@@ -1299,9 +1043,7 @@ import java.util.Arrays;
*/
public final class FavoritesUpdateSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteUpdate.
- * json
+ * x-ms-original-file: 2015-05-01/FavoriteUpdate.json
*/
/**
* Sample code: FavoriteList.
@@ -1323,33 +1065,6 @@ public final class FavoritesUpdateSamples {
}
```
-### LiveToken_Get
-
-```java
-/**
- * Samples for LiveToken Get.
- */
-public final class LiveTokenGetSamples {
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/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",
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
### ProactiveDetectionConfigurations_Get
```java
@@ -1358,9 +1073,7 @@ public final class LiveTokenGetSamples {
*/
public final class ProactiveDetectionConfigurationsGetSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * ProactiveDetectionConfigurationGet.json
+ * x-ms-original-file: 2015-05-01/ProactiveDetectionConfigurationGet.json
*/
/**
* Sample code: ProactiveDetectionConfigurationGet.
@@ -1383,9 +1096,7 @@ public final class ProactiveDetectionConfigurationsGetSamples {
*/
public final class ProactiveDetectionConfigurationsListSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * ProactiveDetectionConfigurationsList.json
+ * x-ms-original-file: 2015-05-01/ProactiveDetectionConfigurationsList.json
*/
/**
* Sample code: ProactiveDetectionConfigurationsList.
@@ -1412,9 +1123,7 @@ import java.util.Arrays;
*/
public final class ProactiveDetectionConfigurationsUpdateSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * ProactiveDetectionConfigurationUpdate.json
+ * x-ms-original-file: 2015-05-01/ProactiveDetectionConfigurationUpdate.json
*/
/**
* Sample code: ProactiveDetectionConfigurationUpdate.
@@ -1453,9 +1162,7 @@ public final class ProactiveDetectionConfigurationsUpdateSamples {
*/
public final class WebTestLocationsListSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/
- * WebTestLocationsList.json
+ * x-ms-original-file: 2015-05-01/WebTestLocationsList.json
*/
/**
* Sample code: WebTestLocationsList.
@@ -1469,268 +1176,173 @@ public final class WebTestLocationsListSamples {
}
```
-### WebTests_CreateOrUpdate
+### WorkItemConfigurations_Create
```java
-import com.azure.resourcemanager.applicationinsights.models.HeaderField;
-import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation;
-import com.azure.resourcemanager.applicationinsights.models.WebTestKind;
-import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration;
-import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesRequest;
-import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRules;
-import java.util.Arrays;
+import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration;
+import java.util.HashMap;
+import java.util.Map;
/**
- * Samples for WebTests CreateOrUpdate.
+ * Samples for WorkItemConfigurations Create.
*/
-public final class WebTestsCreateOrUpdateSamples {
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/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();
- }
-
+public final class WorkItemConfigurationsCreateSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/
- * WebTestCreateStandard.json
+ * x-ms-original-file: 2015-05-01/WorkItemConfigCreate.json
*/
/**
- * Sample code: webTestCreateStandard.
+ * Sample code: WorkItemConfigurationsCreate.
*
* @param manager Entry point to ApplicationInsightsManager.
*/
public static void
- webTestCreateStandard(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
- manager.webTests()
- .define("my-webtest-my-component")
- .withRegion("South Central US")
- .withExistingResourceGroup("my-resource-group")
- .withSyntheticMonitorId("my-webtest-my-component")
- .withWebTestName("my-webtest-my-component")
- .withDescription("Ping web test alert for mytestwebapp")
- .withEnabled(true)
- .withFrequency(900)
- .withTimeout(120)
- .withWebTestKind(WebTestKind.STANDARD)
- .withRetryEnabled(true)
- .withLocations(Arrays.asList(new WebTestGeolocation().withLocation("us-fl-mia-edge")))
- .withRequest(new WebTestPropertiesRequest().withRequestUrl("https://bing.com")
- .withHeaders(Arrays.asList(
- new HeaderField().withHeaderFieldName("fakeTokenPlaceholder").withHeaderFieldValue("de-DE"),
- new HeaderField().withHeaderFieldName("fakeTokenPlaceholder").withHeaderFieldValue("de-DE")))
- .withHttpVerb("POST")
- .withRequestBody("SGVsbG8gd29ybGQ="))
- .withValidationRules(
- new WebTestPropertiesValidationRules().withSslCheck(true).withSslCertRemainingLifetimeCheck(100))
- .create();
- }
-
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestUpdate.
- * json
- */
- /**
- * Sample code: webTestUpdate.
- *
- * @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();
+ 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(mapOf("name", "Title", "value", "Validate Only Title")),
+ com.azure.core.util.Context.NONE);
}
-}
-```
-
-### WebTests_Delete
-```java
-/**
- * Samples for WebTests Delete.
- */
-public final class WebTestsDeleteSamples {
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestDelete.
- * json
- */
- /**
- * Sample code: webTestDelete.
- *
- * @param manager Entry point to ApplicationInsightsManager.
- */
- public static void webTestDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
- manager.webTests()
- .deleteByResourceGroupWithResponse("my-resource-group", "my-webtest-01-mywebservice",
- com.azure.core.util.Context.NONE);
+ // Use "Map.of" if available
+ @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;
}
}
```
-### WebTests_GetByResourceGroup
+### WorkItemConfigurations_Delete
```java
/**
- * Samples for WebTests GetByResourceGroup.
+ * Samples for WorkItemConfigurations Delete.
*/
-public final class WebTestsGetByResourceGroupSamples {
+public final class WorkItemConfigurationsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestGet.json
+ * x-ms-original-file: 2015-05-01/WorkItemConfigDelete.json
*/
/**
- * Sample code: webTestGet.
+ * Sample code: WorkItemConfigurationDelete.
*
* @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",
+ public static void
+ workItemConfigurationDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workItemConfigurations()
+ .deleteWithResponse("my-resource-group", "my-component", "Visual Studio Team Services",
com.azure.core.util.Context.NONE);
}
}
```
-### WebTests_List
+### WorkItemConfigurations_GetDefault
```java
/**
- * Samples for WebTests List.
+ * Samples for WorkItemConfigurations GetDefault.
*/
-public final class WebTestsListSamples {
+public final class WorkItemConfigurationsGetDefaultSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestList.json
+ * x-ms-original-file: 2015-05-01/WorkItemConfigDefaultGet.json
*/
/**
- * Sample code: webTestList.
+ * Sample code: WorkItemConfigurationsGetDefault.
*
* @param manager Entry point to ApplicationInsightsManager.
*/
- public static void webTestList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
- manager.webTests().list(com.azure.core.util.Context.NONE);
+ public static void workItemConfigurationsGetDefault(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workItemConfigurations()
+ .getDefaultWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE);
}
}
```
-### WebTests_ListByComponent
+### WorkItemConfigurations_GetItem
```java
/**
- * Samples for WebTests ListByComponent.
+ * Samples for WorkItemConfigurations GetItem.
*/
-public final class WebTestsListByComponentSamples {
+public final class WorkItemConfigurationsGetItemSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/
- * WebTestListByComponent.json
+ * x-ms-original-file: 2015-05-01/WorkItemConfigGet.json
*/
/**
- * Sample code: webTestListByComponent.
+ * Sample code: WorkItemConfigurationsGetDefault.
*
* @param manager Entry point to ApplicationInsightsManager.
*/
- public static void
- webTestListByComponent(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
- manager.webTests().listByComponent("my-component", "my-resource-group", com.azure.core.util.Context.NONE);
+ public static void workItemConfigurationsGetDefault(
+ com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workItemConfigurations()
+ .getItemWithResponse("my-resource-group", "my-component", "Visual Studio Team Services",
+ com.azure.core.util.Context.NONE);
}
}
```
-### WebTests_ListByResourceGroup
+### WorkItemConfigurations_List
```java
/**
- * Samples for WebTests ListByResourceGroup.
+ * Samples for WorkItemConfigurations List.
*/
-public final class WebTestsListByResourceGroupSamples {
+public final class WorkItemConfigurationsListSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/
- * WebTestListByResourceGroup.json
+ * x-ms-original-file: 2015-05-01/WorkItemConfigsGet.json
*/
/**
- * Sample code: webTestListByResourceGroup.
+ * Sample code: WorkItemConfigurationsList.
*
* @param manager Entry point to ApplicationInsightsManager.
*/
public static void
- webTestListByResourceGroup(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
- manager.webTests().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE);
+ workItemConfigurationsList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
+ manager.workItemConfigurations().list("my-resource-group", "my-component", com.azure.core.util.Context.NONE);
}
}
```
-### WebTests_UpdateTags
+### WorkItemConfigurations_UpdateItem
```java
-import com.azure.resourcemanager.applicationinsights.models.WebTest;
+import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration;
import java.util.HashMap;
import java.util.Map;
/**
- * Samples for WebTests UpdateTags.
+ * Samples for WorkItemConfigurations UpdateItem.
*/
-public final class WebTestsUpdateTagsSamples {
+public final class WorkItemConfigurationsUpdateItemSamples {
/*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/
- * WebTestUpdateTagsOnly.json
+ * x-ms-original-file: 2015-05-01/WorkItemConfigUpdate.json
*/
/**
- * Sample code: webTestUpdateTags.
+ * Sample code: WorkItemConfigurationsCreate.
*
* @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",
- com.azure.core.util.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"))
- .apply();
+ 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(mapOf("name", "Title", "value", "Validate Only Title")),
+ com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@@ -1747,711 +1359,3 @@ public final class WebTestsUpdateTagsSamples {
}
```
-### WorkItemConfigurations_Create
-
-```java
-import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration;
-import java.util.HashMap;
-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(mapOf()), com.azure.core.util.Context.NONE);
- }
-
- // Use "Map.of" if available
- @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_Delete
-
-```java
-/**
- * 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",
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### WorkItemConfigurations_GetDefault
-
-```java
-/**
- * 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", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### WorkItemConfigurations_GetItem
-
-```java
-/**
- * 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",
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### WorkItemConfigurations_List
-
-```java
-/**
- * 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", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### WorkItemConfigurations_UpdateItem
-
-```java
-import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration;
-import java.util.HashMap;
-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(mapOf()),
- com.azure.core.util.Context.NONE);
- }
-
- // Use "Map.of" if available
- @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;
- }
-}
-```
-
-### 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\\nWelcome to your new workbook. This area will display text formatted as markdown.\\n\\n\\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.\"}},{\"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
-/**
- * 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()
- .deleteByResourceGroupWithResponse("my-resource-group", "my-template-resource",
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### WorkbookTemplates_GetByResourceGroup
-
-```java
-/**
- * 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", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### WorkbookTemplates_ListByResourceGroup
-
-```java
-/**
- * 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", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### WorkbookTemplates_Update
-
-```java
-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",
- com.azure.core.util.Context.NONE)
- .getValue();
- resource.update().apply();
- }
-}
-```
-
-### Workbooks_CreateOrUpdate
-
-```java
-import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity;
-import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity;
-import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind;
-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/2023-06-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")
- .withIdentity(new WorkbookResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid",
- new UserAssignedIdentity())))
- .withKind(WorkbookSharedTypeKind.SHARED)
- .withDisplayName("Sample workbook")
- .withSerializedData(
- "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text - 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group\"]}")
- .withVersion("Notebook/1.0")
- .withCategory("workbook")
- .withStorageUri(
- "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer")
- .withDescription("Sample workbook")
- .withSourceIdParameter(
- "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")
- .create();
- }
-
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-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-5e0d-4064-8ebb-1a4ed0313eb2")
- .withRegion("westus")
- .withExistingResourceGroup("my-resource-group")
- .withTags(mapOf("TagSample01", "sample01", "TagSample02", "sample02"))
- .withKind(WorkbookSharedTypeKind.SHARED)
- .withDisplayName("Sample workbook")
- .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")
- .withDescription("Sample workbook")
- .withSourceIdParameter(
- "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")
- .create();
- }
-
- // Use "Map.of" if available
- @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
-/**
- * Samples for Workbooks Delete.
- */
-public final class WorkbooksDeleteSamples {
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-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()
- .deleteByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### Workbooks_GetByResourceGroup
-
-```java
-/**
- * Samples for Workbooks GetByResourceGroup.
- */
-public final class WorkbooksGetByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-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", null,
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-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", null,
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-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", null,
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### Workbooks_List
-
-```java
-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/2023-06-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, com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-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, com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### Workbooks_ListByResourceGroup
-
-```java
-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/2023-06-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()
- .listByResourceGroup("my-resource-group", CategoryType.WORKBOOK, null,
- "/subscriptions/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp",
- null, com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-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/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp",
- null, com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### Workbooks_RevisionGet
-
-```java
-/**
- * Samples for Workbooks RevisionGet.
- */
-public final class WorkbooksRevisionGetSamples {
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-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", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### Workbooks_RevisionsList
-
-```java
-/**
- * Samples for Workbooks RevisionsList.
- */
-public final class WorkbooksRevisionsListSamples {
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-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",
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### Workbooks_Update
-
-```java
-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/2023-06-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", null,
- com.azure.core.util.Context.NONE)
- .getValue();
- resource.update()
- .withSourceId(
- "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp")
- .apply();
- }
-
- /*
- * x-ms-original-file:
- * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-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", null,
- com.azure.core.util.Context.NONE)
- .getValue();
- resource.update()
- .withSourceId("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")
- .apply();
- }
-}
-```
-
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml
index fd29e906deac..6f7eb5e9da54 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml
@@ -1,9 +1,9 @@
-
+
4.0.0
com.azure
@@ -18,7 +18,7 @@
jar
Microsoft Azure SDK for ApplicationInsights Management
- This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Composite Swagger for Application Insights Management Client. Package tag package-2024-08-01.
+ This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Application Insights client for saved items. Package api-version AnalyticsItems: 2015-05-01, ComponentAPIs: 2015-05-01, ComponentLinkedStorageAccountApi: 2020-03-01-preview, Components: 2020-02-02, DeletedWorkbookApi: 2024-02-01-preview, Favorites: 2015-05-01, LiveTokenApi: 2021-10-14, WebTestLocation: 2015-05-01, WebTestsApi: 2022-06-15, WorkBookOperations: 2021-03-08, WorkbooksApi: 2023-06-01, WorkbookTemplatesApi: 2020-11-20.
https://github.com/Azure/azure-sdk-for-java
@@ -46,7 +46,6 @@
0
0
true
- false
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 ef037815398b..9df5cc1fa591 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights;
@@ -76,10 +76,18 @@
/**
* Entry point to ApplicationInsightsManager.
- * Composite Swagger for Application Insights Management Client.
+ * Azure Application Insights client for saved items.
*/
public final class ApplicationInsightsManager {
- private Components components;
+ private WebTests webTests;
+
+ private Operations operations;
+
+ private Workbooks workbooks;
+
+ private WorkbookTemplates workbookTemplates;
+
+ private AnalyticsItems analyticsItems;
private Annotations annotations;
@@ -99,25 +107,17 @@ public final class ApplicationInsightsManager {
private WorkItemConfigurations workItemConfigurations;
- private Favorites favorites;
-
- private WebTestLocations webTestLocations;
-
- private WebTests webTests;
-
- private AnalyticsItems analyticsItems;
+ private ComponentLinkedStorageAccountsOperations componentLinkedStorageAccountsOperations;
- private Operations operations;
+ private Components components;
- private WorkbookTemplates workbookTemplates;
+ private DeletedWorkbooks deletedWorkbooks;
- private Workbooks workbooks;
+ private Favorites favorites;
private LiveTokens liveTokens;
- private ComponentLinkedStorageAccountsOperations componentLinkedStorageAccountsOperations;
-
- private DeletedWorkbooks deletedWorkbooks;
+ private WebTestLocations webTestLocations;
private final ApplicationInsightsManagementClient clientObject;
@@ -335,15 +335,63 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure
}
/**
- * Gets the resource collection API of Components. It manages ApplicationInsightsComponent.
+ * Gets the resource collection API of WebTests. It manages WebTest.
*
- * @return Resource collection API of Components.
+ * @return Resource collection API of WebTests.
*/
- public Components components() {
- if (this.components == null) {
- this.components = new ComponentsImpl(clientObject.getComponents(), this);
+ public WebTests webTests() {
+ if (this.webTests == null) {
+ this.webTests = new WebTestsImpl(clientObject.getWebTests(), this);
}
- return components;
+ return webTests;
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of Workbooks. It manages Workbook.
+ *
+ * @return Resource collection API of Workbooks.
+ */
+ public Workbooks workbooks() {
+ if (this.workbooks == null) {
+ this.workbooks = new WorkbooksImpl(clientObject.getWorkbooks(), this);
+ }
+ return workbooks;
+ }
+
+ /**
+ * Gets the resource collection API of WorkbookTemplates. It manages WorkbookTemplate.
+ *
+ * @return Resource collection API of WorkbookTemplates.
+ */
+ public WorkbookTemplates workbookTemplates() {
+ if (this.workbookTemplates == null) {
+ this.workbookTemplates = new WorkbookTemplatesImpl(clientObject.getWorkbookTemplates(), this);
+ }
+ return workbookTemplates;
+ }
+
+ /**
+ * Gets the resource collection API of AnalyticsItems.
+ *
+ * @return Resource collection API of AnalyticsItems.
+ */
+ public AnalyticsItems analyticsItems() {
+ if (this.analyticsItems == null) {
+ this.analyticsItems = new AnalyticsItemsImpl(clientObject.getAnalyticsItems(), this);
+ }
+ return analyticsItems;
}
/**
@@ -460,87 +508,53 @@ public WorkItemConfigurations workItemConfigurations() {
}
/**
- * Gets the resource collection API of Favorites.
- *
- * @return Resource collection API of Favorites.
- */
- public Favorites favorites() {
- if (this.favorites == null) {
- this.favorites = new FavoritesImpl(clientObject.getFavorites(), this);
- }
- return favorites;
- }
-
- /**
- * Gets the resource collection API of WebTestLocations.
- *
- * @return Resource collection API of WebTestLocations.
- */
- public WebTestLocations webTestLocations() {
- if (this.webTestLocations == null) {
- this.webTestLocations = new WebTestLocationsImpl(clientObject.getWebTestLocations(), this);
- }
- return webTestLocations;
- }
-
- /**
- * Gets the resource collection API of WebTests. It manages WebTest.
- *
- * @return Resource collection API of WebTests.
- */
- public WebTests webTests() {
- if (this.webTests == null) {
- this.webTests = new WebTestsImpl(clientObject.getWebTests(), this);
- }
- return webTests;
- }
-
- /**
- * Gets the resource collection API of AnalyticsItems.
+ * Gets the resource collection API of ComponentLinkedStorageAccountsOperations. It manages
+ * ComponentLinkedStorageAccounts.
*
- * @return Resource collection API of AnalyticsItems.
+ * @return Resource collection API of ComponentLinkedStorageAccountsOperations.
*/
- public AnalyticsItems analyticsItems() {
- if (this.analyticsItems == null) {
- this.analyticsItems = new AnalyticsItemsImpl(clientObject.getAnalyticsItems(), this);
+ public ComponentLinkedStorageAccountsOperations componentLinkedStorageAccountsOperations() {
+ if (this.componentLinkedStorageAccountsOperations == null) {
+ this.componentLinkedStorageAccountsOperations = new ComponentLinkedStorageAccountsOperationsImpl(
+ clientObject.getComponentLinkedStorageAccountsOperations(), this);
}
- return analyticsItems;
+ return componentLinkedStorageAccountsOperations;
}
/**
- * Gets the resource collection API of Operations.
+ * Gets the resource collection API of Components. It manages ApplicationInsightsComponent.
*
- * @return Resource collection API of Operations.
+ * @return Resource collection API of Components.
*/
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ public Components components() {
+ if (this.components == null) {
+ this.components = new ComponentsImpl(clientObject.getComponents(), this);
}
- return operations;
+ return components;
}
/**
- * Gets the resource collection API of WorkbookTemplates. It manages WorkbookTemplate.
+ * Gets the resource collection API of DeletedWorkbooks.
*
- * @return Resource collection API of WorkbookTemplates.
+ * @return Resource collection API of DeletedWorkbooks.
*/
- public WorkbookTemplates workbookTemplates() {
- if (this.workbookTemplates == null) {
- this.workbookTemplates = new WorkbookTemplatesImpl(clientObject.getWorkbookTemplates(), this);
+ public DeletedWorkbooks deletedWorkbooks() {
+ if (this.deletedWorkbooks == null) {
+ this.deletedWorkbooks = new DeletedWorkbooksImpl(clientObject.getDeletedWorkbooks(), this);
}
- return workbookTemplates;
+ return deletedWorkbooks;
}
/**
- * Gets the resource collection API of Workbooks. It manages Workbook.
+ * Gets the resource collection API of Favorites.
*
- * @return Resource collection API of Workbooks.
+ * @return Resource collection API of Favorites.
*/
- public Workbooks workbooks() {
- if (this.workbooks == null) {
- this.workbooks = new WorkbooksImpl(clientObject.getWorkbooks(), this);
+ public Favorites favorites() {
+ if (this.favorites == null) {
+ this.favorites = new FavoritesImpl(clientObject.getFavorites(), this);
}
- return workbooks;
+ return favorites;
}
/**
@@ -556,29 +570,15 @@ public LiveTokens liveTokens() {
}
/**
- * Gets the resource collection API of ComponentLinkedStorageAccountsOperations. It manages
- * ComponentLinkedStorageAccounts.
- *
- * @return Resource collection API of ComponentLinkedStorageAccountsOperations.
- */
- public ComponentLinkedStorageAccountsOperations componentLinkedStorageAccountsOperations() {
- if (this.componentLinkedStorageAccountsOperations == null) {
- this.componentLinkedStorageAccountsOperations = new ComponentLinkedStorageAccountsOperationsImpl(
- clientObject.getComponentLinkedStorageAccountsOperations(), this);
- }
- return componentLinkedStorageAccountsOperations;
- }
-
- /**
- * Gets the resource collection API of DeletedWorkbooks.
+ * Gets the resource collection API of WebTestLocations.
*
- * @return Resource collection API of DeletedWorkbooks.
+ * @return Resource collection API of WebTestLocations.
*/
- public DeletedWorkbooks deletedWorkbooks() {
- if (this.deletedWorkbooks == null) {
- this.deletedWorkbooks = new DeletedWorkbooksImpl(clientObject.getDeletedWorkbooks(), this);
+ public WebTestLocations webTestLocations() {
+ if (this.webTestLocations == null) {
+ this.webTestLocations = new WebTestLocationsImpl(clientObject.getWebTestLocations(), this);
}
- return deletedWorkbooks;
+ return webTestLocations;
}
/**
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java
index 825085857662..e091d7dd4bff 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java
index ebfe9d95cb70..130792faf9e7 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -64,7 +64,7 @@ PagedIterable list(String resourceGroupName, String resourceNam
* @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is
* rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return array of Annotation along with {@link Response}.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response> createWithResponse(String resourceGroupName, String resourceName,
@@ -81,7 +81,7 @@ Response> createWithResponse(String resourceGroupName, Str
* @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is
* rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return array of Annotation.
+ * @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
List create(String resourceGroupName, String resourceName, AnnotationInner annotationProperties);
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java
index e09359123455..cd83c9af622f 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -49,7 +49,7 @@ PagedIterable list(String resourceGroup
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights
+ * @param apiKeyProperties Properties that need to be specified to create an API Key of an Application Insights
* component.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -66,7 +66,7 @@ Response createWithResponse(String reso
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights
+ * @param apiKeyProperties Properties that need to be specified to create an API Key of an Application Insights
* component.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
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 e97e7ecefe1a..eaa81a009a35 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -12,18 +12,18 @@
*/
public interface ApplicationInsightsManagementClient {
/**
- * Gets The ID of the target subscription.
+ * Gets Service host.
*
- * @return the subscriptionId value.
+ * @return the endpoint value.
*/
- String getSubscriptionId();
+ String getEndpoint();
/**
- * Gets server parameter.
+ * Gets The ID of the target subscription. The value must be an UUID.
*
- * @return the endpoint value.
+ * @return the subscriptionId value.
*/
- String getEndpoint();
+ String getSubscriptionId();
/**
* Gets The HTTP pipeline to send requests through.
@@ -40,11 +40,39 @@ public interface ApplicationInsightsManagementClient {
Duration getDefaultPollInterval();
/**
- * Gets the ComponentsClient object to access its operations.
+ * Gets the WebTestsClient object to access its operations.
*
- * @return the ComponentsClient object.
+ * @return the WebTestsClient object.
*/
- ComponentsClient getComponents();
+ WebTestsClient getWebTests();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the WorkbooksClient object to access its operations.
+ *
+ * @return the WorkbooksClient object.
+ */
+ WorkbooksClient getWorkbooks();
+
+ /**
+ * Gets the WorkbookTemplatesClient object to access its operations.
+ *
+ * @return the WorkbookTemplatesClient object.
+ */
+ WorkbookTemplatesClient getWorkbookTemplates();
+
+ /**
+ * Gets the AnalyticsItemsClient object to access its operations.
+ *
+ * @return the AnalyticsItemsClient object.
+ */
+ AnalyticsItemsClient getAnalyticsItems();
/**
* Gets the AnnotationsClient object to access its operations.
@@ -110,53 +138,32 @@ public interface ApplicationInsightsManagementClient {
WorkItemConfigurationsClient getWorkItemConfigurations();
/**
- * Gets the FavoritesClient object to access its operations.
- *
- * @return the FavoritesClient object.
- */
- FavoritesClient getFavorites();
-
- /**
- * Gets the WebTestLocationsClient object to access its operations.
- *
- * @return the WebTestLocationsClient object.
- */
- WebTestLocationsClient getWebTestLocations();
-
- /**
- * Gets the WebTestsClient object to access its operations.
- *
- * @return the WebTestsClient object.
- */
- WebTestsClient getWebTests();
-
- /**
- * Gets the AnalyticsItemsClient object to access its operations.
+ * Gets the ComponentLinkedStorageAccountsOperationsClient object to access its operations.
*
- * @return the AnalyticsItemsClient object.
+ * @return the ComponentLinkedStorageAccountsOperationsClient object.
*/
- AnalyticsItemsClient getAnalyticsItems();
+ ComponentLinkedStorageAccountsOperationsClient getComponentLinkedStorageAccountsOperations();
/**
- * 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 WorkbookTemplatesClient object to access its operations.
+ * Gets the DeletedWorkbooksClient object to access its operations.
*
- * @return the WorkbookTemplatesClient object.
+ * @return the DeletedWorkbooksClient object.
*/
- WorkbookTemplatesClient getWorkbookTemplates();
+ DeletedWorkbooksClient getDeletedWorkbooks();
/**
- * Gets the WorkbooksClient object to access its operations.
+ * Gets the FavoritesClient object to access its operations.
*
- * @return the WorkbooksClient object.
+ * @return the FavoritesClient object.
*/
- WorkbooksClient getWorkbooks();
+ FavoritesClient getFavorites();
/**
* Gets the LiveTokensClient object to access its operations.
@@ -166,16 +173,9 @@ public interface ApplicationInsightsManagementClient {
LiveTokensClient getLiveTokens();
/**
- * Gets the ComponentLinkedStorageAccountsOperationsClient object to access its operations.
- *
- * @return the ComponentLinkedStorageAccountsOperationsClient object.
- */
- ComponentLinkedStorageAccountsOperationsClient getComponentLinkedStorageAccountsOperations();
-
- /**
- * Gets the DeletedWorkbooksClient object to access its operations.
+ * Gets the WebTestLocationsClient object to access its operations.
*
- * @return the DeletedWorkbooksClient object.
+ * @return the WebTestLocationsClient object.
*/
- DeletedWorkbooksClient getDeletedWorkbooks();
+ WebTestLocationsClient getWebTestLocations();
}
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java
index d2cf30f1a213..5e8699cbc16e 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java
index d592e4386ccf..d14ce1ca8d0a 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -47,8 +47,7 @@ Response getWithResponse(Strin
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param billingFeaturesProperties Properties that need to be specified to update billing features for an
- * Application Insights component.
+ * @param billingFeaturesProperties The request body.
* @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.
@@ -65,8 +64,7 @@ Response updateWithResponse(St
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param billingFeaturesProperties Properties that need to be specified to update billing features for an
- * Application Insights component.
+ * @param billingFeaturesProperties The request body.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java
index fd05199db414..33090ff9e93b 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java
index 063a8694a6ff..2303404632a3 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java
index 92dd95883e97..be5db4035b8a 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java
index f36feb1f6324..015ee492dc7e 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -20,84 +20,99 @@
*/
public interface ComponentsClient {
/**
- * Gets a list of all Application Insights components within a subscription.
+ * Returns an Application Insights component.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The name of the Application Insights component resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of all Application Insights components within a subscription as paginated response with
- * {@link PagedIterable}.
+ * @return an Application Insights component definition along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName,
+ String resourceName, Context context);
/**
- * Gets a list of all Application Insights components within a subscription.
+ * Returns an Application Insights component.
*
- * @param context The context to associate with this operation.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The name of the Application Insights component resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of all Application Insights components within a subscription as paginated response with
- * {@link PagedIterable}.
+ * @return an Application Insights component definition.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ApplicationInsightsComponentInner getByResourceGroup(String resourceGroupName, String resourceName);
/**
- * Gets a list of Application Insights components within a resource group.
+ * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for
+ * InstrumentationKey nor AppId in the Put operation.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The name of the Application Insights component resource.
+ * @param insightProperties Properties that need to be specified to create an Application Insights component.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Application Insights components within a resource group as paginated response with
- * {@link PagedIterable}.
+ * @return an Application Insights component definition along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName,
+ String resourceName, ApplicationInsightsComponentInner insightProperties, Context context);
/**
- * Gets a list of Application Insights components within a resource group.
+ * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for
+ * InstrumentationKey nor AppId in the Put operation.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param context The context to associate with this operation.
+ * @param resourceName The name of the Application Insights component resource.
+ * @param insightProperties Properties that need to be specified to create an Application Insights component.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Application Insights components within a resource group as paginated response with
- * {@link PagedIterable}.
+ * @return an Application Insights component definition.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ApplicationInsightsComponentInner createOrUpdate(String resourceGroupName, String resourceName,
+ ApplicationInsightsComponentInner insightProperties);
/**
- * Deletes an Application Insights component.
+ * Updates an existing component's tags. To update other fields use the CreateOrUpdate method.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
+ * @param componentTags Updated tag information to set into the component instance.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
+ * @return an Application Insights component definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String resourceGroupName, String resourceName, Context context);
+ Response updateTagsWithResponse(String resourceGroupName, String resourceName,
+ TagsResource componentTags, Context context);
/**
- * Deletes an Application Insights component.
+ * Updates an existing component's tags. To update other fields use the CreateOrUpdate method.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
+ * @param componentTags Updated tag information to set into the component instance.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Application Insights component definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String resourceName);
+ ApplicationInsightsComponentInner updateTags(String resourceGroupName, String resourceName,
+ TagsResource componentTags);
/**
- * Returns an Application Insights component.
+ * Deletes an Application Insights component.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
@@ -105,88 +120,73 @@ public interface ComponentsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an Application Insights component definition along with {@link Response}.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName,
- String resourceName, Context context);
+ Response deleteWithResponse(String resourceGroupName, String resourceName, Context context);
/**
- * Returns an Application Insights component.
+ * Deletes an Application Insights component.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an Application Insights component definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ApplicationInsightsComponentInner getByResourceGroup(String resourceGroupName, String resourceName);
+ void delete(String resourceGroupName, String resourceName);
/**
- * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for
- * InstrumentationKey nor AppId in the Put operation.
+ * Gets a list of Application Insights components within a resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param insightProperties Properties that need to be specified to create an Application Insights component.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an Application Insights component definition along with {@link Response}.
+ * @return a list of Application Insights components within a resource group as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(String resourceGroupName,
- String resourceName, ApplicationInsightsComponentInner insightProperties, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for
- * InstrumentationKey nor AppId in the Put operation.
+ * Gets a list of Application Insights components within a resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param insightProperties Properties that need to be specified to create an Application Insights component.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an Application Insights component definition.
+ * @return a list of Application Insights components within a resource group as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- ApplicationInsightsComponentInner createOrUpdate(String resourceGroupName, String resourceName,
- ApplicationInsightsComponentInner insightProperties);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
/**
- * Updates an existing component's tags. To update other fields use the CreateOrUpdate method.
+ * Gets a list of all Application Insights components within a subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param componentTags Updated tag information to set into the component instance.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an Application Insights component definition along with {@link Response}.
+ * @return a list of all Application Insights components within a subscription as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response updateTagsWithResponse(String resourceGroupName, String resourceName,
- TagsResource componentTags, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
/**
- * Updates an existing component's tags. To update other fields use the CreateOrUpdate method.
+ * Gets a list of all Application Insights components within a subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param componentTags Updated tag information to set into the component instance.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an Application Insights component definition.
+ * @return a list of all Application Insights components within a subscription as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- ApplicationInsightsComponentInner updateTags(String resourceGroupName, String resourceName,
- TagsResource componentTags);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
/**
* Purges data in an Application Insights component by a set of user-defined filters.
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/DeletedWorkbooksClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/DeletedWorkbooksClient.java
index c94029912c53..bacdbd0787d6 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/DeletedWorkbooksClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/DeletedWorkbooksClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java
index 8335edcf75f1..28582061d173 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -50,13 +50,12 @@ Response> listWithRes
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a
- * Application Insights component.
+ * @param exportProperties The request body.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Continuous Export configurations along with {@link Response}.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response> createWithResponse(String resourceGroupName,
@@ -67,12 +66,11 @@ Response> createWithR
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a
- * Application Insights component.
+ * @param exportProperties The request body.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Continuous Export configurations.
+ * @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
List create(String resourceGroupName, String resourceName,
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java
index cfe8da64c876..24e30f3256a6 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/LiveTokensClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/LiveTokensClient.java
index c2f5eb2daf84..d869b45dffac 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/LiveTokensClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/LiveTokensClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -17,7 +17,7 @@ public interface LiveTokensClient {
/**
* **Gets an access token for live metrics stream data.**.
*
- * @param resourceUri The identifier of the resource.
+ * @param resourceUri The fully qualified Azure Resource manager 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.
@@ -30,7 +30,7 @@ public interface LiveTokensClient {
/**
* **Gets an access token for live metrics stream data.**.
*
- * @param resourceUri The identifier of the resource.
+ * @param resourceUri The fully qualified Azure Resource manager 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.
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 c0b01fe6b2f2..578960009260 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -15,24 +15,26 @@
*/
public interface OperationsClient {
/**
- * Lists all of the available insights REST API operations.
+ * List the operations for the 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 request to list Azure Workbooks operations as paginated response with
+ * @return result of the request to list Azure Workbooks operations.
+ * It contains a list of operations and a URL link to get the next set of results as paginated response with
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
- * Lists all of the available insights REST API operations.
+ * List the operations for the 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 request to list Azure Workbooks operations as paginated response with
+ * @return result of the request to list Azure Workbooks operations.
+ * It contains a list of operations and a URL link to get the next set of results as paginated response with
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java
index 08a862ff67a1..eaed58055b1a 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestLocationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestLocationsClient.java
index 4b194daf692c..ef27b88b1c82 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestLocationsClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestLocationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java
index f3c71a7c6e86..b7e0c5e82e40 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -16,33 +16,6 @@
* An instance of this class provides access to all the operations defined in WebTestsClient.
*/
public interface WebTestsClient {
- /**
- * Get all Application Insights web tests defined for the specified resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all Application Insights web tests defined for the specified resource group as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
-
- /**
- * Get all Application Insights web tests defined for the specified resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all Application Insights web tests defined for the specified resource group as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
-
/**
* Get a specific Application Insights web test definition.
*
@@ -159,6 +132,33 @@ Response updateTagsWithResponse(String resourceGroupName, String w
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String webTestName);
+ /**
+ * Get all Application Insights web tests defined for the specified resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all Application Insights web tests defined for the specified resource group as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Get all Application Insights web tests defined for the specified resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all Application Insights web tests defined for the specified resource group as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
/**
* Get all Application Insights web test definitions for the specified subscription.
*
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java
index 084335cf413b..6cc9577e2efc 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -52,8 +52,7 @@ public interface WorkItemConfigurationsClient {
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration
- * of a Application Insights component.
+ * @param workItemConfigurationProperties Work item configuration creation payload.
* @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.
@@ -69,8 +68,7 @@ Response createWithResponse(String resourceGroupName
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration
- * of a Application Insights component.
+ * @param workItemConfigurationProperties Work item configuration creation payload.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java
index 00c0aca35f5c..20199b202816 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -17,143 +17,143 @@
*/
public interface WorkbookTemplatesClient {
/**
- * Get all Workbook templates defined within a specified resource group.
+ * 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 all Workbook templates defined within a specified resource group as paginated response with
- * {@link PagedIterable}.
+ * @return a single workbook template by its resourceName along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName,
+ Context context);
/**
- * Get all Workbook templates defined within a specified resource group.
+ * Get a single workbook template by its resourceName.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param context The context to associate with this operation.
+ * @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 all Workbook templates defined within a specified resource group as paginated response with
- * {@link PagedIterable}.
+ * @return a single workbook template by its resourceName.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String resourceName);
/**
- * Get a single workbook template by its resourceName.
+ * 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 a single workbook template by its resourceName along with {@link Response}.
+ * @return an Application Insights workbook template definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName,
- Context context);
+ Response createOrUpdateWithResponse(String resourceGroupName, String resourceName,
+ WorkbookTemplateInner workbookTemplateProperties, Context context);
/**
- * Get a single workbook template by its resourceName.
+ * 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 a single workbook template by its resourceName.
+ * @return an Application Insights workbook template definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String resourceName);
+ WorkbookTemplateInner createOrUpdate(String resourceGroupName, String resourceName,
+ WorkbookTemplateInner workbookTemplateProperties);
/**
- * Delete a workbook template.
+ * 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 the {@link Response}.
+ * @return an Application Insights workbook template definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String resourceGroupName, String resourceName, Context context);
+ Response updateWithResponse(String resourceGroupName, String resourceName,
+ WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, Context context);
/**
- * Delete a workbook template.
+ * 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)
- void delete(String resourceGroupName, String resourceName);
+ WorkbookTemplateInner update(String resourceGroupName, String resourceName);
/**
- * Create a new workbook template.
+ * Delete a workbook template.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param workbookTemplateProperties Properties that need to be specified to create a new workbook.
* @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 along with {@link Response}.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(String resourceGroupName, String resourceName,
- WorkbookTemplateInner workbookTemplateProperties, Context context);
+ Response deleteWithResponse(String resourceGroupName, String resourceName, Context context);
/**
- * Create a new workbook template.
+ * Delete a workbook template.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param workbookTemplateProperties Properties that need to be specified to create a new workbook.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an Application Insights workbook template definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- WorkbookTemplateInner createOrUpdate(String resourceGroupName, String resourceName,
- WorkbookTemplateInner workbookTemplateProperties);
+ void delete(String resourceGroupName, String resourceName);
/**
- * Updates a workbook template that has already been added.
+ * Get all Workbook templates defined within a specified resource group.
*
* @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 along with {@link Response}.
+ * @return all Workbook templates defined within a specified resource group as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(String resourceGroupName, String resourceName,
- WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Updates a workbook template that has already been added.
+ * Get all Workbook templates defined within a specified resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an Application Insights workbook template definition.
+ * @return all Workbook templates defined within a specified resource group as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- WorkbookTemplateInner update(String resourceGroupName, String resourceName);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, 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 e9c78c0be394..b5df6c3f08a5 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent;
@@ -19,24 +19,10 @@
*/
public interface WorkbooksClient {
/**
- * Get all Workbooks defined within a specified subscription and category.
- *
- * @param category Category of workbook to return.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
- * request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all Workbooks defined within a specified subscription and category as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(CategoryType category);
-
- /**
- * Get all Workbooks defined within a specified subscription and category.
+ * Get a single workbook by its resourceName.
*
- * @param category Category of workbook to return.
- * @param tags Tags presents on each workbook returned.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The name of the workbook resource. The value must be an UUID.
* @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If
* false, only return summary content for workbooks.
* @param context The context to associate with this operation.
@@ -44,98 +30,79 @@ public interface WorkbooksClient {
* @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
* request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all Workbooks defined within a specified subscription and category as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(CategoryType category, List tags, Boolean canFetchContent,
- Context context);
-
- /**
- * Get all Workbooks defined within a specified resource group and category.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param category Category of workbook to return.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
- * request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all Workbooks defined within a specified resource group and category as paginated response with
- * {@link PagedIterable}.
+ * @return a single workbook by its resourceName along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName,
+ Boolean canFetchContent, Context context);
/**
- * Get all Workbooks defined within a specified resource group and category.
+ * Get a single workbook by its resourceName.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param category Category of workbook to return.
- * @param tags Tags presents on each workbook returned.
- * @param sourceId Azure Resource Id that will fetch all linked workbooks.
- * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If
- * false, only return summary content for workbooks.
- * @param context The context to associate with this operation.
+ * @param resourceName The name of the workbook resource. The value must be an UUID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
* request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all Workbooks defined within a specified resource group and category as paginated response with
- * {@link PagedIterable}.
+ * @return a single workbook by its resourceName.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category, List tags,
- String sourceId, Boolean canFetchContent, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkbookInner getByResourceGroup(String resourceGroupName, String resourceName);
/**
- * Get a single workbook by its resourceName.
+ * Create a new workbook.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the workbook resource. The value must be an UUID.
- * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If
- * false, only return summary content for workbooks.
+ * @param workbookProperties Properties that need to be specified to create a new workbook.
+ * @param sourceId Azure Resource Id that will fetch all linked workbooks.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
* request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a single workbook by its resourceName along with {@link Response}.
+ * @return a workbook definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName,
- Boolean canFetchContent, Context context);
+ Response createOrUpdateWithResponse(String resourceGroupName, String resourceName,
+ WorkbookInner workbookProperties, String sourceId, Context context);
/**
- * Get a single workbook by its resourceName.
+ * Create a new workbook.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the workbook resource. The value must be an UUID.
+ * @param workbookProperties Properties that need to be specified to create a new workbook.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
* request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a single workbook by its resourceName.
+ * @return a workbook definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- WorkbookInner getByResourceGroup(String resourceGroupName, String resourceName);
+ WorkbookInner createOrUpdate(String resourceGroupName, String resourceName, WorkbookInner workbookProperties);
/**
- * Delete a workbook.
+ * Updates a workbook that has already been added.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the workbook resource. The value must be an UUID.
+ * @param sourceId Azure Resource Id that will fetch all linked workbooks.
+ * @param workbookUpdateParameters Properties that need to be specified to create a new workbook.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
* request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
+ * @return a workbook definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String resourceGroupName, String resourceName, Context context);
+ Response updateWithResponse(String resourceGroupName, String resourceName, String sourceId,
+ WorkbookUpdateParameters workbookUpdateParameters, Context context);
/**
- * Delete a workbook.
+ * Updates a workbook that has already been added.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the workbook resource. The value must be an UUID.
@@ -143,74 +110,71 @@ Response getByResourceGroupWithResponse(String resourceGroupName,
* @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
* request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a workbook definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String resourceName);
+ WorkbookInner update(String resourceGroupName, String resourceName);
/**
- * Create a new workbook.
+ * Delete a workbook.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the workbook resource. The value must be an UUID.
- * @param workbookProperties Properties that need to be specified to create a new workbook.
- * @param sourceId Azure Resource Id that will fetch all linked workbooks.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
* request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a workbook definition along with {@link Response}.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(String resourceGroupName, String resourceName,
- WorkbookInner workbookProperties, String sourceId, Context context);
+ Response deleteWithResponse(String resourceGroupName, String resourceName, Context context);
/**
- * Create a new workbook.
+ * Delete a workbook.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the workbook resource. The value must be an UUID.
- * @param workbookProperties Properties that need to be specified to create a new workbook.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
* request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a workbook definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- WorkbookInner createOrUpdate(String resourceGroupName, String resourceName, WorkbookInner workbookProperties);
+ void delete(String resourceGroupName, String resourceName);
/**
- * Updates a workbook that has already been added.
+ * Get all Workbooks defined within a specified subscription and category.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the workbook resource. The value must be an UUID.
- * @param sourceId Azure Resource Id that will fetch all linked workbooks.
- * @param workbookUpdateParameters Properties that need to be specified to create a new workbook.
- * @param context The context to associate with this operation.
+ * @param category Category of workbook to return.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
* request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a workbook definition along with {@link Response}.
+ * @return all Workbooks defined within a specified subscription and category as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(String resourceGroupName, String resourceName, String sourceId,
- WorkbookUpdateParameters workbookUpdateParameters, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(CategoryType category);
/**
- * Updates a workbook that has already been added.
+ * Get all Workbooks defined within a specified subscription and category.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the workbook resource. The value must be an UUID.
+ * @param category Category of workbook to return.
+ * @param tags Tags presents on each workbook returned.
+ * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If
+ * false, only return summary content for workbooks.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
* request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a workbook definition.
+ * @return all Workbooks defined within a specified subscription and category as paginated response with
+ * {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- WorkbookInner update(String resourceGroupName, String resourceName);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(CategoryType category, List tags, Boolean canFetchContent,
+ Context context);
/**
* Get the revisions for the workbook defined by its resourceName.
@@ -274,4 +238,40 @@ Response revisionGetWithResponse(String resourceGroupName, String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
WorkbookInner revisionGet(String resourceGroupName, String resourceName, String revisionId);
+
+ /**
+ * Get all Workbooks defined within a specified resource group and category.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param category Category of workbook to return.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
+ * request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all Workbooks defined within a specified resource group and category as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category);
+
+ /**
+ * Get all Workbooks defined within a specified resource group and category.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param category Category of workbook to return.
+ * @param tags Tags presents on each workbook returned.
+ * @param sourceId Azure Resource Id that will fetch all linked workbooks.
+ * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If
+ * false, only return summary content for workbooks.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the
+ * request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all Workbooks defined within a specified resource group and category as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category, List tags,
+ String sourceId, Boolean canFetchContent, Context context);
}
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java
index 4e7954a8b908..e82eca1dbf16 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -175,14 +175,6 @@ public AnnotationInner withRelatedAnnotation(String relatedAnnotation) {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java
index 0013a2ccba97..f4983bfbad62 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -225,17 +225,6 @@ public ApplicationInsightsComponentAnalyticsItemProperties properties() {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (properties() != null) {
- properties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java
index 887b4904bef4..f9840a39454b 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -15,7 +15,7 @@
/**
* Properties that define an API key of an Application Insights Component.
*/
-@Fluent
+@Immutable
public final class ApplicationInsightsComponentApiKeyInner
implements JsonSerializable {
/*
@@ -52,7 +52,7 @@ public final class ApplicationInsightsComponentApiKeyInner
/**
* Creates an instance of ApplicationInsightsComponentApiKeyInner class.
*/
- public ApplicationInsightsComponentApiKeyInner() {
+ private ApplicationInsightsComponentApiKeyInner() {
}
/**
@@ -83,17 +83,6 @@ public String createdDate() {
return this.createdDate;
}
- /**
- * Set the createdDate property: The create date of this API key.
- *
- * @param createdDate the createdDate value to set.
- * @return the ApplicationInsightsComponentApiKeyInner object itself.
- */
- public ApplicationInsightsComponentApiKeyInner withCreatedDate(String createdDate) {
- this.createdDate = createdDate;
- return this;
- }
-
/**
* Get the name property: The name of the API key.
*
@@ -103,17 +92,6 @@ public String name() {
return this.name;
}
- /**
- * Set the name property: The name of the API key.
- *
- * @param name the name value to set.
- * @return the ApplicationInsightsComponentApiKeyInner object itself.
- */
- public ApplicationInsightsComponentApiKeyInner withName(String name) {
- this.name = name;
- return this;
- }
-
/**
* Get the linkedReadProperties property: The read access rights of this API Key.
*
@@ -123,17 +101,6 @@ public List linkedReadProperties() {
return this.linkedReadProperties;
}
- /**
- * Set the linkedReadProperties property: The read access rights of this API Key.
- *
- * @param linkedReadProperties the linkedReadProperties value to set.
- * @return the ApplicationInsightsComponentApiKeyInner object itself.
- */
- public ApplicationInsightsComponentApiKeyInner withLinkedReadProperties(List linkedReadProperties) {
- this.linkedReadProperties = linkedReadProperties;
- return this;
- }
-
/**
* Get the linkedWriteProperties property: The write access rights of this API Key.
*
@@ -143,25 +110,6 @@ public List linkedWriteProperties() {
return this.linkedWriteProperties;
}
- /**
- * Set the linkedWriteProperties property: The write access rights of this API Key.
- *
- * @param linkedWriteProperties the linkedWriteProperties value to set.
- * @return the ApplicationInsightsComponentApiKeyInner object itself.
- */
- public ApplicationInsightsComponentApiKeyInner withLinkedWriteProperties(List linkedWriteProperties) {
- this.linkedWriteProperties = linkedWriteProperties;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java
index baa5bca71f44..233e800608fb 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -27,7 +27,7 @@ public final class ApplicationInsightsComponentAvailableFeaturesInner
/**
* Creates an instance of ApplicationInsightsComponentAvailableFeaturesInner class.
*/
- public ApplicationInsightsComponentAvailableFeaturesInner() {
+ private ApplicationInsightsComponentAvailableFeaturesInner() {
}
/**
@@ -39,17 +39,6 @@ public List result() {
return this.result;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (result() != null) {
- result().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java
index 99ca3639fb2a..bc365f6c945d 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -80,17 +80,6 @@ public List currentBillingFeatures() {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (dataVolumeCap() != null) {
- dataVolumeCap().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java
index d247fc3dd1a2..897edb3d2b39 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -14,7 +14,7 @@
/**
* Properties that define a Continuous Export configuration.
*/
-@Fluent
+@Immutable
public final class ApplicationInsightsComponentExportConfigurationInner
implements JsonSerializable {
/*
@@ -121,7 +121,7 @@ public final class ApplicationInsightsComponentExportConfigurationInner
/**
* Creates an instance of ApplicationInsightsComponentExportConfigurationInner class.
*/
- public ApplicationInsightsComponentExportConfigurationInner() {
+ private ApplicationInsightsComponentExportConfigurationInner() {
}
/**
@@ -154,19 +154,6 @@ public String recordTypes() {
return this.recordTypes;
}
- /**
- * Set the recordTypes property: This comma separated list of document types that will be exported. The possible
- * values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd',
- * 'PerformanceCounters', 'Availability', 'Messages'.
- *
- * @param recordTypes the recordTypes value to set.
- * @return the ApplicationInsightsComponentExportConfigurationInner object itself.
- */
- public ApplicationInsightsComponentExportConfigurationInner withRecordTypes(String recordTypes) {
- this.recordTypes = recordTypes;
- return this;
- }
-
/**
* Get the applicationName property: The name of the Application Insights component.
*
@@ -258,18 +245,6 @@ public String notificationQueueEnabled() {
return this.notificationQueueEnabled;
}
- /**
- * Set the notificationQueueEnabled property: Deprecated.
- *
- * @param notificationQueueEnabled the notificationQueueEnabled value to set.
- * @return the ApplicationInsightsComponentExportConfigurationInner object itself.
- */
- public ApplicationInsightsComponentExportConfigurationInner
- withNotificationQueueEnabled(String notificationQueueEnabled) {
- this.notificationQueueEnabled = notificationQueueEnabled;
- return this;
- }
-
/**
* Get the exportStatus property: This indicates current Continuous Export configuration status. The possible values
* are 'Preparing', 'Success', 'Failure'.
@@ -327,14 +302,6 @@ public String containerName() {
return this.containerName;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java
index b76c4f83ac6a..d5324cc2d0d7 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -279,14 +279,6 @@ public String userId() {
return this.userId;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java
index 6c01b2f430cb..1b423b1f645c 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -100,7 +100,7 @@ public final class ApplicationInsightsComponentFeatureCapabilitiesInner
/**
* Creates an instance of ApplicationInsightsComponentFeatureCapabilitiesInner class.
*/
- public ApplicationInsightsComponentFeatureCapabilitiesInner() {
+ private ApplicationInsightsComponentFeatureCapabilitiesInner() {
}
/**
@@ -247,14 +247,6 @@ public Float throttleRate() {
return this.throttleRate;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
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 7202148ffca6..8ca331939937 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
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -43,17 +42,17 @@ public final class ApplicationInsightsComponentInner extends ComponentsResource
private ApplicationInsightsComponentProperties innerProperties;
/*
- * The type of the resource.
+ * Azure resource type
*/
private String type;
/*
- * The name of the resource.
+ * Azure resource name
*/
private String name;
/*
- * Fully qualified resource Id for the resource.
+ * Azure resource Id
*/
private String id;
@@ -115,7 +114,7 @@ private ApplicationInsightsComponentProperties innerProperties() {
}
/**
- * Get the type property: The type of the resource.
+ * Get the type property: Azure resource type.
*
* @return the type value.
*/
@@ -125,7 +124,7 @@ public String type() {
}
/**
- * Get the name property: The name of the resource.
+ * Get the name property: Azure resource name.
*
* @return the name value.
*/
@@ -135,7 +134,7 @@ public String name() {
}
/**
- * Get the id property: Fully qualified resource Id for the resource.
+ * Get the id property: Azure resource Id.
*
* @return the id value.
*/
@@ -608,25 +607,6 @@ public Boolean forceCustomerStorageForProfiler() {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (kind() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property kind in model ApplicationInsightsComponentInner"));
- }
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(ApplicationInsightsComponentInner.class);
-
/**
* {@inheritDoc}
*/
@@ -658,14 +638,14 @@ public static ApplicationInsightsComponentInner fromJson(JsonReader jsonReader)
String fieldName = reader.getFieldName();
reader.nextToken();
- if ("id".equals(fieldName)) {
+ if ("location".equals(fieldName)) {
+ deserializedApplicationInsightsComponentInner.withLocation(reader.getString());
+ } else if ("id".equals(fieldName)) {
deserializedApplicationInsightsComponentInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedApplicationInsightsComponentInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedApplicationInsightsComponentInner.type = reader.getString();
- } else if ("location".equals(fieldName)) {
- deserializedApplicationInsightsComponentInner.withLocation(reader.getString());
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedApplicationInsightsComponentInner.withTags(tags);
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java
index 529c4eadb4ec..c0d28407ace1 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -183,17 +183,6 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationInner withRule
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (ruleDefinitions() != null) {
- ruleDefinitions().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java
index c8c141565b3e..78a209bf0ed1 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.CoreUtils;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -571,24 +570,6 @@ public Boolean forceCustomerStorageForProfiler() {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (applicationType() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property applicationType in model ApplicationInsightsComponentProperties"));
- }
- if (privateLinkScopedResources() != null) {
- privateLinkScopedResources().forEach(e -> e.validate());
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(ApplicationInsightsComponentProperties.class);
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java
index ad65a2280188..488c7cbc24c2 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -35,7 +35,7 @@ public final class ApplicationInsightsComponentQuotaStatusInner
/**
* Creates an instance of ApplicationInsightsComponentQuotaStatusInner class.
*/
- public ApplicationInsightsComponentQuotaStatusInner() {
+ private ApplicationInsightsComponentQuotaStatusInner() {
}
/**
@@ -66,14 +66,6 @@ public String expirationTime() {
return this.expirationTime;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java
index d5b7e5451ef2..f3170a1e30a3 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -30,7 +30,7 @@ public final class ApplicationInsightsComponentWebTestLocationInner
/**
* Creates an instance of ApplicationInsightsComponentWebTestLocationInner class.
*/
- public ApplicationInsightsComponentWebTestLocationInner() {
+ private ApplicationInsightsComponentWebTestLocationInner() {
}
/**
@@ -51,14 +51,6 @@ public String tag() {
return this.tag;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java
index 21645a9765a6..ced3129ada34 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec 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.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -21,6 +22,11 @@ public final class ComponentLinkedStorageAccountsInner extends ProxyResource {
*/
private LinkedStorageAccountsProperties innerProperties;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -51,6 +57,15 @@ private LinkedStorageAccountsProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -104,17 +119,6 @@ public ComponentLinkedStorageAccountsInner withLinkedStorageAccount(String linke
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -151,6 +155,8 @@ public static ComponentLinkedStorageAccountsInner fromJson(JsonReader jsonReader
} else if ("properties".equals(fieldName)) {
deserializedComponentLinkedStorageAccountsInner.innerProperties
= LinkedStorageAccountsProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedComponentLinkedStorageAccountsInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java
index d70c84790800..d0909ca1bf1e 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec 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.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -15,7 +14,7 @@
/**
* Response containing operationId for a specific purge action.
*/
-@Fluent
+@Immutable
public final class ComponentPurgeResponseInner implements JsonSerializable {
/*
* Id to use when querying for status for a particular purge operation.
@@ -25,7 +24,7 @@ public final class ComponentPurgeResponseInner implements JsonSerializable {
/*
* Status of the operation represented by the requested Id.
@@ -26,7 +25,7 @@ public final class ComponentPurgeStatusResponseInner implements JsonSerializable
/**
* Creates an instance of ComponentPurgeStatusResponseInner class.
*/
- public ComponentPurgeStatusResponseInner() {
+ private ComponentPurgeStatusResponseInner() {
}
/**
@@ -38,32 +37,6 @@ public PurgeState status() {
return this.status;
}
- /**
- * Set the status property: Status of the operation represented by the requested Id.
- *
- * @param status the status value to set.
- * @return the ComponentPurgeStatusResponseInner object itself.
- */
- public ComponentPurgeStatusResponseInner withStatus(PurgeState status) {
- this.status = status;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (status() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property status in model ComponentPurgeStatusResponseInner"));
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(ComponentPurgeStatusResponseInner.class);
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/DeletedWorkbookInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/DeletedWorkbookInner.java
index 09eb5417b8ba..c60245701ffc 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/DeletedWorkbookInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/DeletedWorkbookInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
@@ -19,7 +19,7 @@
/**
* A workbook definition.
*/
-@Fluent
+@Immutable
public final class DeletedWorkbookInner extends DeletedWorkbookResource {
/*
* Metadata describing a workbook for an Azure resource.
@@ -31,6 +31,16 @@ public final class DeletedWorkbookInner extends DeletedWorkbookResource {
*/
private SystemData systemData;
+ /*
+ * Resource etag
+ */
+ private String etag;
+
+ /*
+ * The kind of workbook. Only valid value is shared.
+ */
+ private WorkbookSharedTypeKind kind;
+
/*
* The type of the resource.
*/
@@ -49,7 +59,7 @@ public final class DeletedWorkbookInner extends DeletedWorkbookResource {
/**
* Creates an instance of DeletedWorkbookInner class.
*/
- public DeletedWorkbookInner() {
+ private DeletedWorkbookInner() {
}
/**
@@ -71,6 +81,26 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the etag property: Resource etag.
+ *
+ * @return the etag value.
+ */
+ @Override
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the kind property: The kind of workbook. Only valid value is shared.
+ *
+ * @return the kind value.
+ */
+ @Override
+ public WorkbookSharedTypeKind kind() {
+ return this.kind;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -101,42 +131,6 @@ public String id() {
return this.id;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public DeletedWorkbookInner withKind(WorkbookSharedTypeKind kind) {
- super.withKind(kind);
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public DeletedWorkbookInner withEtag(String etag) {
- super.withEtag(etag);
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public DeletedWorkbookInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public DeletedWorkbookInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
/**
* Get the displayName property: The user-defined name (display name) of the workbook.
*
@@ -146,20 +140,6 @@ public String displayName() {
return this.innerProperties() == null ? null : this.innerProperties().displayName();
}
- /**
- * Set the displayName property: The user-defined name (display name) of the workbook.
- *
- * @param displayName the displayName value to set.
- * @return the DeletedWorkbookInner object itself.
- */
- public DeletedWorkbookInner withDisplayName(String displayName) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DeletedWorkbookProperties();
- }
- this.innerProperties().withDisplayName(displayName);
- return this;
- }
-
/**
* Get the serializedData property: Configuration of this particular workbook. Configuration data is a string
* containing valid JSON.
@@ -170,21 +150,6 @@ public String serializedData() {
return this.innerProperties() == null ? null : this.innerProperties().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 DeletedWorkbookInner object itself.
- */
- public DeletedWorkbookInner withSerializedData(String serializedData) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DeletedWorkbookProperties();
- }
- this.innerProperties().withSerializedData(serializedData);
- return this;
- }
-
/**
* Get the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook in
* serializedData.
@@ -195,21 +160,6 @@ public String version() {
return this.innerProperties() == null ? null : this.innerProperties().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 DeletedWorkbookInner object itself.
- */
- public DeletedWorkbookInner withVersion(String version) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DeletedWorkbookProperties();
- }
- this.innerProperties().withVersion(version);
- return this;
- }
-
/**
* Get the timeModified property: Date and time in UTC of the last modification that was made to this workbook
* definition.
@@ -229,20 +179,6 @@ public String category() {
return this.innerProperties() == null ? null : this.innerProperties().category();
}
- /**
- * Set the category property: Workbook category, as defined by the user at creation time.
- *
- * @param category the category value to set.
- * @return the DeletedWorkbookInner object itself.
- */
- public DeletedWorkbookInner withCategory(String category) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DeletedWorkbookProperties();
- }
- this.innerProperties().withCategory(category);
- return this;
- }
-
/**
* Get the tags property: Being deprecated, please use the other tags field.
*
@@ -252,20 +188,6 @@ public List tagsPropertiesTags() {
return this.innerProperties() == null ? null : this.innerProperties().tags();
}
- /**
- * Set the tags property: Being deprecated, please use the other tags field.
- *
- * @param tags the tags value to set.
- * @return the DeletedWorkbookInner object itself.
- */
- public DeletedWorkbookInner withTagsPropertiesTags(List tags) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DeletedWorkbookProperties();
- }
- this.innerProperties().withTags(tags);
- return this;
- }
-
/**
* Get the userId property: Unique user id of the specific user that owns this workbook.
*
@@ -284,20 +206,6 @@ public String sourceId() {
return this.innerProperties() == null ? null : this.innerProperties().sourceId();
}
- /**
- * Set the sourceId property: ResourceId for a source resource.
- *
- * @param sourceId the sourceId value to set.
- * @return the DeletedWorkbookInner object itself.
- */
- public DeletedWorkbookInner withSourceId(String sourceId) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DeletedWorkbookProperties();
- }
- this.innerProperties().withSourceId(sourceId);
- return this;
- }
-
/**
* Get the storageUri property: The resourceId to the storage account when bring your own storage is used.
*
@@ -307,20 +215,6 @@ public String storageUri() {
return this.innerProperties() == null ? null : this.innerProperties().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 DeletedWorkbookInner object itself.
- */
- public DeletedWorkbookInner withStorageUri(String storageUri) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DeletedWorkbookProperties();
- }
- this.innerProperties().withStorageUri(storageUri);
- return this;
- }
-
/**
* Get the description property: The description of the workbook.
*
@@ -330,20 +224,6 @@ public String description() {
return this.innerProperties() == null ? null : this.innerProperties().description();
}
- /**
- * Set the description property: The description of the workbook.
- *
- * @param description the description value to set.
- * @return the DeletedWorkbookInner object itself.
- */
- public DeletedWorkbookInner withDescription(String description) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DeletedWorkbookProperties();
- }
- this.innerProperties().withDescription(description);
- return this;
- }
-
/**
* Get the revision property: The unique revision id for this workbook definition.
*
@@ -353,18 +233,6 @@ public String revision() {
return this.innerProperties() == null ? null : this.innerProperties().revision();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -407,9 +275,9 @@ public static DeletedWorkbookInner fromJson(JsonReader jsonReader) throws IOExce
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedDeletedWorkbookInner.withTags(tags);
} else if ("kind".equals(fieldName)) {
- deserializedDeletedWorkbookInner.withKind(WorkbookSharedTypeKind.fromString(reader.getString()));
+ deserializedDeletedWorkbookInner.kind = WorkbookSharedTypeKind.fromString(reader.getString());
} else if ("etag".equals(fieldName)) {
- deserializedDeletedWorkbookInner.withEtag(reader.getString());
+ deserializedDeletedWorkbookInner.etag = reader.getString();
} else if ("systemData".equals(fieldName)) {
deserializedDeletedWorkbookInner.systemData = SystemData.fromJson(reader);
} else if ("properties".equals(fieldName)) {
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/DeletedWorkbookProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/DeletedWorkbookProperties.java
index fa4f0aface5b..31fa6dbb108b 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/DeletedWorkbookProperties.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/DeletedWorkbookProperties.java
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.util.CoreUtils;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -18,7 +17,7 @@
/**
* Properties that contain a workbook.
*/
-@Fluent
+@Immutable
public final class DeletedWorkbookProperties implements JsonSerializable {
/*
* The user-defined name (display name) of the workbook.
@@ -78,7 +77,7 @@ public final class DeletedWorkbookProperties implements JsonSerializable 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 DeletedWorkbookProperties object itself.
- */
- public DeletedWorkbookProperties withTags(List tags) {
- this.tags = tags;
- return this;
- }
-
/**
* Get the userId property: Unique user id of the specific user that owns this workbook.
*
@@ -213,17 +155,6 @@ public String sourceId() {
return this.sourceId;
}
- /**
- * Set the sourceId property: ResourceId for a source resource.
- *
- * @param sourceId the sourceId value to set.
- * @return the DeletedWorkbookProperties object itself.
- */
- public DeletedWorkbookProperties 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.
*
@@ -233,17 +164,6 @@ 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 DeletedWorkbookProperties object itself.
- */
- public DeletedWorkbookProperties withStorageUri(String storageUri) {
- this.storageUri = storageUri;
- return this;
- }
-
/**
* Get the description property: The description of the workbook.
*
@@ -253,17 +173,6 @@ public String description() {
return this.description;
}
- /**
- * Set the description property: The description of the workbook.
- *
- * @param description the description value to set.
- * @return the DeletedWorkbookProperties object itself.
- */
- public DeletedWorkbookProperties withDescription(String description) {
- this.description = description;
- return this;
- }
-
/**
* Get the revision property: The unique revision id for this workbook definition.
*
@@ -273,31 +182,6 @@ 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.atError()
- .log(new IllegalArgumentException(
- "Missing required property displayName in model DeletedWorkbookProperties"));
- }
- if (serializedData() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property serializedData in model DeletedWorkbookProperties"));
- }
- if (category() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property category in model DeletedWorkbookProperties"));
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(DeletedWorkbookProperties.class);
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java
index 7bed63396e80..38e2cb324460 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -47,14 +47,6 @@ public LinkedStorageAccountsProperties withLinkedStorageAccount(String linkedSto
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java
index 4b84169af398..a3bb38c8ebea 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -24,7 +24,7 @@ public final class LiveTokenResponseInner implements JsonSerializable {
/*
* Operation name: {provider}/{resource}/{operation}
@@ -30,7 +30,7 @@ public final class OperationInner implements JsonSerializable {
/**
* Creates an instance of OperationInner class.
*/
- public OperationInner() {
+ private OperationInner() {
}
/**
@@ -42,17 +42,6 @@ public String name() {
return this.name;
}
- /**
- * Set the name property: Operation name: {provider}/{resource}/{operation}.
- *
- * @param name the name value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withName(String name) {
- this.name = name;
- return this;
- }
-
/**
* Get the display property: The object that represents the operation.
*
@@ -62,28 +51,6 @@ public OperationDisplay display() {
return this.display;
}
- /**
- * Set the display property: The object that represents the operation.
- *
- * @param display the display value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withDisplay(OperationDisplay display) {
- this.display = display;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (display() != null) {
- display().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
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 72169d7ae3ae..befafbc9b672 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -34,17 +34,17 @@ public final class WebTestInner extends WebtestsResource {
private WebTestProperties innerProperties;
/*
- * The type of the resource.
+ * Azure resource type
*/
private String type;
/*
- * The name of the resource.
+ * Azure resource name
*/
private String name;
/*
- * Fully qualified resource Id for the resource.
+ * Azure resource Id
*/
private String id;
@@ -84,7 +84,7 @@ private WebTestProperties innerProperties() {
}
/**
- * Get the type property: The type of the resource.
+ * Get the type property: Azure resource type.
*
* @return the type value.
*/
@@ -94,7 +94,7 @@ public String type() {
}
/**
- * Get the name property: The name of the resource.
+ * Get the name property: Azure resource name.
*
* @return the name value.
*/
@@ -104,7 +104,7 @@ public String name() {
}
/**
- * Get the id property: Fully qualified resource Id for the resource.
+ * Get the id property: Azure resource Id.
*
* @return the id value.
*/
@@ -422,18 +422,6 @@ public WebTestInner withValidationRules(WebTestPropertiesValidationRules validat
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -463,14 +451,14 @@ public static WebTestInner fromJson(JsonReader jsonReader) throws IOException {
String fieldName = reader.getFieldName();
reader.nextToken();
- if ("id".equals(fieldName)) {
+ if ("location".equals(fieldName)) {
+ deserializedWebTestInner.withLocation(reader.getString());
+ } else if ("id".equals(fieldName)) {
deserializedWebTestInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedWebTestInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedWebTestInner.type = reader.getString();
- } else if ("location".equals(fieldName)) {
- deserializedWebTestInner.withLocation(reader.getString());
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedWebTestInner.withTags(tags);
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestProperties.java
index ae1111b5f2e1..87152e66a394 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestProperties.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestProperties.java
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -351,44 +350,6 @@ public WebTestProperties withValidationRules(WebTestPropertiesValidationRules va
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (syntheticMonitorId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property syntheticMonitorId in model WebTestProperties"));
- }
- if (webTestName() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property webTestName in model WebTestProperties"));
- }
- if (webTestKind() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property webTestKind in model WebTestProperties"));
- }
- if (locations() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property locations in model WebTestProperties"));
- } else {
- locations().forEach(e -> e.validate());
- }
- if (configuration() != null) {
- configuration().validate();
- }
- if (request() != null) {
- request().validate();
- }
- if (validationRules() != null) {
- validationRules().validate();
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(WebTestProperties.class);
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java
index 3a84029b4dd6..22d703550d23 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -14,7 +14,7 @@
/**
* Work item configuration associated with an application insights resource.
*/
-@Fluent
+@Immutable
public final class WorkItemConfigurationInner implements JsonSerializable {
/*
* Connector identifier where work item is created
@@ -44,7 +44,7 @@ public final class WorkItemConfigurationInner implements JsonSerializable writer.writeString(element));
- jsonWriter.writeJsonField("identity", identity());
- jsonWriter.writeStringField("kind", kind() == null ? null : kind().toString());
- jsonWriter.writeStringField("etag", etag());
jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ jsonWriter.writeStringField("etag", this.etag);
return jsonWriter.writeEndObject();
}
@@ -419,14 +452,14 @@ public static WorkbookInner fromJson(JsonReader jsonReader) throws IOException {
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedWorkbookInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedWorkbookInner.innerProperties = WorkbookProperties.fromJson(reader);
} else if ("identity".equals(fieldName)) {
- deserializedWorkbookInner.withIdentity(WorkbookResourceIdentity.fromJson(reader));
+ deserializedWorkbookInner.identity = WorkbookResourceIdentity.fromJson(reader);
} else if ("kind".equals(fieldName)) {
- deserializedWorkbookInner.withKind(WorkbookSharedTypeKind.fromString(reader.getString()));
+ deserializedWorkbookInner.kind = WorkbookSharedTypeKind.fromString(reader.getString());
} else if ("etag".equals(fieldName)) {
- deserializedWorkbookInner.withEtag(reader.getString());
- } else if ("properties".equals(fieldName)) {
- deserializedWorkbookInner.innerProperties = WorkbookProperties.fromJson(reader);
+ deserializedWorkbookInner.etag = reader.getString();
} else if ("systemData".equals(fieldName)) {
deserializedWorkbookInner.systemData = SystemData.fromJson(reader);
} else {
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookProperties.java
index 72b2147edd8c..1234cda4a0de 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookProperties.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookProperties.java
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.CoreUtils;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -273,29 +272,6 @@ 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.atError()
- .log(new IllegalArgumentException("Missing required property displayName in model WorkbookProperties"));
- }
- if (serializedData() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property serializedData in model WorkbookProperties"));
- }
- if (category() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property category in model WorkbookProperties"));
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(WorkbookProperties.class);
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java
index 72d9380a52bb..e1847ca32ec5 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
@@ -175,14 +175,6 @@ public WorkbookPropertiesUpdateParameters withRevision(String revision) {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java
index 31521d913d28..35e704f66501 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java
@@ -1,16 +1,17 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery;
import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery;
-import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateResource;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -19,12 +20,17 @@
* An Application Insights workbook template definition.
*/
@Fluent
-public final class WorkbookTemplateInner extends WorkbookTemplateResource {
+public final class WorkbookTemplateInner extends Resource {
/*
* Metadata describing a workbook template for an Azure resource.
*/
private WorkbookTemplateProperties innerProperties;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -55,6 +61,15 @@ private WorkbookTemplateProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -222,18 +237,6 @@ public WorkbookTemplateInner withLocalized(Map e.validate());
- }
- if (localized() != null) {
- localized().values().forEach(e -> {
- if (e != null) {
- e.forEach(e1 -> e1.validate());
- }
- });
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(WorkbookTemplateProperties.class);
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/package-info.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/package-info.java
index 0cbe207e2c0b..505bb47c86b9 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/package-info.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the inner data models for ApplicationInsightsManagementClient.
- * Composite Swagger for Application Insights Management Client.
+ * Package containing the inner data models for ApplicationInsights.
+ * Azure Application Insights client for saved items.
*/
package com.azure.resourcemanager.applicationinsights.fluent.models;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/package-info.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/package-info.java
index 201b4763aeef..ae3211165f93 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/package-info.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the service clients for ApplicationInsightsManagementClient.
- * Composite Swagger for Application Insights Management Client.
+ * Package containing the service clients for ApplicationInsights.
+ * Azure Application Insights client for saved items.
*/
package com.azure.resourcemanager.applicationinsights.fluent;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java
index 83dbd2eebf35..aac719114f0d 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.implementation;
@@ -61,53 +61,93 @@ public final class AnalyticsItemsClientImpl implements AnalyticsItemsClient {
* The interface defining all the services for ApplicationInsightsManagementClientAnalyticsItems to be used by the
* proxy service to perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "ApplicationInsightsM")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ApplicationInsightsManagementClientAnalyticsItems")
public interface AnalyticsItemsService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> list(@HostParam("$host") String endpoint,
+ Mono>> list(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
- @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("api-version") String apiVersion,
- @QueryParam("scope") ItemScope scope, @QueryParam("type") ItemTypeParameter type,
- @QueryParam("includeContent") Boolean includeContent, @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("scope") ItemScope scope,
+ @QueryParam("type") ItemTypeParameter type, @QueryParam("includeContent") Boolean includeContent,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response> listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
+ @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("scope") ItemScope scope,
+ @QueryParam("type") ItemTypeParameter type, @QueryParam("includeContent") Boolean includeContent,
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
- @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("api-version") String apiVersion,
- @QueryParam("id") String id, @QueryParam("name") String name, @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("id") String id,
+ @QueryParam("name") String name, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
+ @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("id") String id,
+ @QueryParam("name") String name, @HeaderParam("Accept") String accept, Context context);
+
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> put(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Mono> put(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
- @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("api-version") String apiVersion,
- @QueryParam("overrideItem") Boolean overrideItem,
+ @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("overrideItem") Boolean overrideItem,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
@BodyParam("application/json") ApplicationInsightsComponentAnalyticsItemInner itemProperties,
- @HeaderParam("Accept") String accept, Context context);
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response putSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
+ @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("overrideItem") Boolean overrideItem,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ApplicationInsightsComponentAnalyticsItemInner itemProperties,
+ Context context);
@Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
@Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> delete(@HostParam("$host") String endpoint,
+ Mono> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
+ @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("id") String id,
+ @QueryParam("name") String name, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
- @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("api-version") String apiVersion,
- @QueryParam("id") String id, @QueryParam("name") String name, Context context);
+ @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("id") String id,
+ @QueryParam("name") String name, Context context);
}
/**
@@ -132,80 +172,14 @@ Mono> delete(@HostParam("$host") String endpoint,
private Mono>> listWithResponseAsync(
String resourceGroupName, String resourceName, ItemScopePath scopePath, ItemScope scope, ItemTypeParameter type,
Boolean includeContent) {
- 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 (scopePath == null) {
- return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null."));
- }
final String apiVersion = "2015-05-01";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, resourceName, scopePath, apiVersion, scope, type, includeContent, accept, context))
+ .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, scopePath, scope, type, includeContent, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Gets a list of Analytics Items defined within an Application Insights component.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all
- * users with access to the Application Insights component.
- * @param scope Enum indicating if this item definition is owned by a specific user or is shared between all users
- * with access to the Application Insights component.
- * @param type Enum indicating the type of the Analytics item.
- * @param includeContent Flag indicating whether or not to return the content of each applicable item. If false,
- * only return the item information.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Analytics Items defined within an Application Insights component along with {@link Response} on
- * successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> listWithResponseAsync(
- String resourceGroupName, String resourceName, ItemScopePath scopePath, ItemScope scope, ItemTypeParameter type,
- Boolean includeContent, 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 (scopePath == null) {
- return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null."));
- }
- final String apiVersion = "2015-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, resourceName,
- scopePath, apiVersion, scope, type, includeContent, accept, context);
- }
-
/**
* Gets a list of Analytics Items defined within an Application Insights component.
*
@@ -251,8 +225,10 @@ private Mono> listAsync(Str
public Response> listWithResponse(String resourceGroupName,
String resourceName, ItemScopePath scopePath, ItemScope scope, ItemTypeParameter type, Boolean includeContent,
Context context) {
- return listWithResponseAsync(resourceGroupName, resourceName, scopePath, scope, type, includeContent, context)
- .block();
+ final String apiVersion = "2015-05-01";
+ final String accept = "application/json";
+ return service.listSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, scopePath, scope, type, includeContent, accept, context);
}
/**
@@ -295,77 +271,14 @@ public List list(String resource
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, String name) {
- 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 (scopePath == null) {
- return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null."));
- }
final String apiVersion = "2015-05-01";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, resourceName, scopePath, apiVersion, id, name, accept, context))
+ .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, scopePath, id, name, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Gets a specific Analytics Items defined within an Application Insights component.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all
- * users with access to the Application Insights component.
- * @param id The Id of a specific item defined in the Application Insights component.
- * @param name The name of a specific item defined in the Application Insights component.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a specific Analytics Items defined within an Application Insights component along with {@link Response}
- * on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(
- String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, String name,
- 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 (scopePath == null) {
- return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null."));
- }
- final String apiVersion = "2015-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, resourceName,
- scopePath, apiVersion, id, name, accept, context);
- }
-
/**
* Gets a specific Analytics Items defined within an Application Insights component.
*
@@ -406,7 +319,10 @@ private Mono getAsync(String res
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String resourceGroupName,
String resourceName, ItemScopePath scopePath, String id, String name, Context context) {
- return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name, context).block();
+ final String apiVersion = "2015-05-01";
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, scopePath, id, name, accept, context);
}
/**
@@ -450,89 +366,15 @@ public ApplicationInsightsComponentAnalyticsItemInner get(String resourceGroupNa
private Mono> putWithResponseAsync(
String resourceGroupName, String resourceName, ItemScopePath scopePath,
ApplicationInsightsComponentAnalyticsItemInner itemProperties, Boolean overrideItem) {
- 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 (scopePath == null) {
- return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null."));
- }
- if (itemProperties == null) {
- return Mono.error(new IllegalArgumentException("Parameter itemProperties is required and cannot be null."));
- } else {
- itemProperties.validate();
- }
final String apiVersion = "2015-05-01";
+ final String contentType = "application/json";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.put(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, resourceName, scopePath, apiVersion, overrideItem, itemProperties, accept, context))
+ .withContext(context -> service.put(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, scopePath, overrideItem, contentType, accept, itemProperties, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Adds or Updates a specific Analytics Item within an Application Insights component.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all
- * users with access to the Application Insights component.
- * @param itemProperties Properties that need to be specified to create a new item and add it to an Application
- * Insights component.
- * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it
- * already exists.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return properties that define an Analytics item that is associated to an Application Insights component along
- * with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> putWithResponseAsync(
- String resourceGroupName, String resourceName, ItemScopePath scopePath,
- ApplicationInsightsComponentAnalyticsItemInner itemProperties, Boolean overrideItem, 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 (scopePath == null) {
- return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null."));
- }
- if (itemProperties == null) {
- return Mono.error(new IllegalArgumentException("Parameter itemProperties is required and cannot be null."));
- } else {
- itemProperties.validate();
- }
- final String apiVersion = "2015-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, resourceName,
- scopePath, apiVersion, overrideItem, itemProperties, accept, context);
- }
-
/**
* Adds or Updates a specific Analytics Item within an Application Insights component.
*
@@ -578,8 +420,11 @@ private Mono putAsync(String res
public Response putWithResponse(String resourceGroupName,
String resourceName, ItemScopePath scopePath, ApplicationInsightsComponentAnalyticsItemInner itemProperties,
Boolean overrideItem, Context context) {
- return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem, context)
- .block();
+ final String apiVersion = "2015-05-01";
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.putSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, scopePath, overrideItem, contentType, accept, itemProperties, context);
}
/**
@@ -621,73 +466,13 @@ public ApplicationInsightsComponentAnalyticsItemInner put(String resourceGroupNa
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName,
ItemScopePath scopePath, String id, String name) {
- 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 (scopePath == null) {
- return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null."));
- }
final String apiVersion = "2015-05-01";
return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, resourceName, scopePath, apiVersion, id, name, context))
+ .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion,
+ this.client.getSubscriptionId(), resourceGroupName, resourceName, scopePath, id, name, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Deletes a specific Analytics Items defined within an Application Insights component.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all
- * users with access to the Application Insights component.
- * @param id The Id of a specific item defined in the Application Insights component.
- * @param name The name of a specific item defined in the Application Insights component.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName,
- ItemScopePath scopePath, String id, String name, 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 (scopePath == null) {
- return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null."));
- }
- final String apiVersion = "2015-05-01";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- resourceName, scopePath, apiVersion, id, name, context);
- }
-
/**
* Deletes a specific Analytics Items defined within an Application Insights component.
*
@@ -726,7 +511,9 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, It
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(String resourceGroupName, String resourceName, ItemScopePath scopePath,
String id, String name, Context context) {
- return deleteWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name, context).block();
+ final String apiVersion = "2015-05-01";
+ return service.deleteSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, scopePath, id, name, context);
}
/**
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java
index 2e6f42b7e464..a885085acc2b 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.implementation;
@@ -37,15 +37,11 @@ public Response> listWithRespons
Context context) {
Response> inner = this.serviceClient()
.listWithResponse(resourceGroupName, resourceName, scopePath, scope, type, includeContent, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- inner.getValue()
- .stream()
- .map(inner1 -> new ApplicationInsightsComponentAnalyticsItemImpl(inner1, this.manager()))
- .collect(Collectors.toList()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ inner.getValue()
+ .stream()
+ .map(inner1 -> new ApplicationInsightsComponentAnalyticsItemImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
}
public List list(String resourceGroupName, String resourceName,
@@ -65,12 +61,8 @@ public Response getWithResponse(Strin
String resourceName, ItemScopePath scopePath, String id, String name, Context context) {
Response inner
= this.serviceClient().getWithResponse(resourceGroupName, resourceName, scopePath, id, name, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new ApplicationInsightsComponentAnalyticsItemImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ApplicationInsightsComponentAnalyticsItemImpl(inner.getValue(), this.manager()));
}
public ApplicationInsightsComponentAnalyticsItem get(String resourceGroupName, String resourceName,
@@ -89,12 +81,8 @@ public Response putWithResponse(Strin
Boolean overrideItem, Context context) {
Response inner = this.serviceClient()
.putWithResponse(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new ApplicationInsightsComponentAnalyticsItemImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ApplicationInsightsComponentAnalyticsItemImpl(inner.getValue(), this.manager()));
}
public ApplicationInsightsComponentAnalyticsItem put(String resourceGroupName, String resourceName,
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationImpl.java
index f0f63d580237..0e82f629d2d9 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationImpl.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.implementation;
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java
index e5a1d0415251..f4b532180f71 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.implementation;
@@ -30,8 +30,8 @@
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.applicationinsights.fluent.AnnotationsClient;
import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner;
+import com.azure.resourcemanager.applicationinsights.implementation.models.AnnotationsListResult;
import com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException;
-import com.azure.resourcemanager.applicationinsights.models.AnnotationsListResult;
import java.util.List;
import reactor.core.publisher.Mono;
@@ -64,35 +64,62 @@ public final class AnnotationsClientImpl implements AnnotationsClient {
* The interface defining all the services for ApplicationInsightsManagementClientAnnotations to be used by the
* proxy service to perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "ApplicationInsightsM")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ApplicationInsightsManagementClientAnnotations")
public interface AnnotationsService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AnnotationErrorException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName,
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
@QueryParam("start") String start, @QueryParam("end") String end, @HeaderParam("Accept") String accept,
Context context);
@Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(AnnotationErrorException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
+ @QueryParam("start") String start, @QueryParam("end") String end, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(AnnotationErrorException.class)
+ Mono>> create(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AnnotationInner annotationProperties, Context context);
+
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AnnotationErrorException.class)
- Mono>> create(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
+ Response> createSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AnnotationInner annotationProperties, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName,
@PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName,
- @BodyParam("application/json") AnnotationInner annotationProperties, @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam("annotationId") String annotationId, Context context);
@Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
@Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> delete(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
+ Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("resourceGroupName") String resourceGroupName,
@PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName,
@PathParam("annotationId") String annotationId, Context context);
@@ -100,10 +127,33 @@ Mono> delete(@HostParam("$host") String endpoint,
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AnnotationErrorException.class)
- Mono>> get(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
+ Mono>> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName,
@PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName,
@PathParam("annotationId") String annotationId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(AnnotationErrorException.class)
+ Response> getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName,
+ @PathParam("annotationId") String annotationId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(AnnotationErrorException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(AnnotationErrorException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -122,34 +172,13 @@ Mono>> get(@HostParam("$host") String endpoint,
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String resourceGroupName, String resourceName,
String start, String end) {
- 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 (start == null) {
- return Mono.error(new IllegalArgumentException("Parameter start is required and cannot be null."));
- }
- if (end == null) {
- return Mono.error(new IllegalArgumentException("Parameter end is required and cannot be null."));
- }
final String apiVersion = "2015-05-01";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, apiVersion,
- this.client.getSubscriptionId(), resourceName, start, end, accept, context))
+ .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, start, end, accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
- res.getHeaders(), res.getValue().value(), null, null))
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -160,45 +189,17 @@ private Mono> listSinglePageAsync(String resource
* @param resourceName The name of the Application Insights component resource.
* @param start The start time to query from for annotations, cannot be older than 90 days from current date.
* @param end The end time to query for annotations.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AnnotationErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of annotations for a component for given time range along with {@link PagedResponse} on
- * successful completion of {@link Mono}.
+ * @return the list of annotations for a component for given time range as paginated response with
+ * {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceGroupName, String resourceName,
- String start, String end, 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 (start == null) {
- return Mono.error(new IllegalArgumentException("Parameter start is required and cannot be null."));
- }
- if (end == null) {
- return Mono.error(new IllegalArgumentException("Parameter end is required and cannot be null."));
- }
- final String apiVersion = "2015-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(),
- resourceName, start, end, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), null, null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String resourceName, String start,
+ String end) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, start, end),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
@@ -211,13 +212,17 @@ private Mono> listSinglePageAsync(String resource
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AnnotationErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of annotations for a component for given time range as paginated response with
- * {@link PagedFlux}.
+ * @return the list of annotations for a component for given time range along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String resourceName, String start,
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String resourceName, String start,
String end) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, start, end));
+ final String apiVersion = "2015-05-01";
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), apiVersion,
+ this.client.getSubscriptionId(), resourceGroupName, resourceName, start, end, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -231,13 +236,17 @@ private PagedFlux listAsync(String resourceGroupName, String re
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AnnotationErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of annotations for a component for given time range as paginated response with
- * {@link PagedFlux}.
+ * @return the list of annotations for a component for given time range along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String resourceName, String start,
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String resourceName, String start,
String end, Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, start, end, context));
+ final String apiVersion = "2015-05-01";
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), apiVersion,
+ this.client.getSubscriptionId(), resourceGroupName, resourceName, start, end, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -256,7 +265,8 @@ private PagedFlux listAsync(String resourceGroupName, String re
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String resourceName, String start,
String end) {
- return new PagedIterable<>(listAsync(resourceGroupName, resourceName, start, end));
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceName, start, end),
+ nextLink -> listNextSinglePage(nextLink));
}
/**
@@ -276,7 +286,8 @@ public PagedIterable list(String resourceGroupName, String reso
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String resourceName, String start, String end,
Context context) {
- return new PagedIterable<>(listAsync(resourceGroupName, resourceName, start, end, context));
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceName, start, end, context),
+ nextLink -> listNextSinglePage(nextLink, context));
}
/**
@@ -289,84 +300,21 @@ public PagedIterable list(String resourceGroupName, String reso
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AnnotationErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return array of Annotation along with {@link Response} on successful completion of {@link Mono}.
+ * @return the response body along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(String resourceGroupName, String resourceName,
AnnotationInner annotationProperties) {
- 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 (annotationProperties == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter annotationProperties is required and cannot be null."));
- } else {
- annotationProperties.validate();
- }
final String apiVersion = "2015-05-01";
+ final String contentType = "application/json";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, apiVersion,
- this.client.getSubscriptionId(), resourceName, annotationProperties, accept, context))
+ .withContext(
+ context -> service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, contentType, accept, annotationProperties, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Create an Annotation of an Application Insights component.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param annotationProperties Properties that need to be specified to create an annotation of a Application
- * Insights component.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AnnotationErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return array of Annotation along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(String resourceGroupName, String resourceName,
- AnnotationInner annotationProperties, 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 (annotationProperties == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter annotationProperties is required and cannot be null."));
- } else {
- annotationProperties.validate();
- }
- final String apiVersion = "2015-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.create(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(),
- resourceName, annotationProperties, accept, context);
- }
-
/**
* Create an Annotation of an Application Insights component.
*
@@ -377,7 +325,7 @@ private Mono>> createWithResponseAsync(String res
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AnnotationErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return array of Annotation on successful completion of {@link Mono}.
+ * @return the response body on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createAsync(String resourceGroupName, String resourceName,
@@ -397,12 +345,16 @@ private Mono> createAsync(String resourceGroupName, String
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AnnotationErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return array of Annotation along with {@link Response}.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response> createWithResponse(String resourceGroupName, String resourceName,
AnnotationInner annotationProperties, Context context) {
- return createWithResponseAsync(resourceGroupName, resourceName, annotationProperties, context).block();
+ final String apiVersion = "2015-05-01";
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, contentType, accept, annotationProperties, context);
}
/**
@@ -415,7 +367,7 @@ public Response> createWithResponse(String resourceGroupNa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AnnotationErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return array of Annotation.
+ * @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public List create(String resourceGroupName, String resourceName,
@@ -437,70 +389,13 @@ public List create(String resourceGroupName, String resourceNam
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName,
String annotationId) {
- 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 (annotationId == null) {
- return Mono.error(new IllegalArgumentException("Parameter annotationId is required and cannot be null."));
- }
final String apiVersion = "2015-05-01";
return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion,
+ .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, resourceGroupName,
this.client.getSubscriptionId(), resourceName, annotationId, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Delete an Annotation of an Application Insights component.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param annotationId The unique annotation ID. This is unique within a Application Insights component.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName,
- String annotationId, 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 (annotationId == null) {
- return Mono.error(new IllegalArgumentException("Parameter annotationId is required and cannot be null."));
- }
- final String apiVersion = "2015-05-01";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(),
- resourceName, annotationId, context);
- }
-
/**
* Delete an Annotation of an Application Insights component.
*
@@ -532,7 +427,9 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(String resourceGroupName, String resourceName, String annotationId,
Context context) {
- return deleteWithResponseAsync(resourceGroupName, resourceName, annotationId, context).block();
+ final String apiVersion = "2015-05-01";
+ return service.deleteSync(this.client.getEndpoint(), apiVersion, resourceGroupName,
+ this.client.getSubscriptionId(), resourceName, annotationId, context);
}
/**
@@ -564,72 +461,14 @@ public void delete(String resourceGroupName, String resourceName, String annotat
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> getWithResponseAsync(String resourceGroupName, String resourceName,
String annotationId) {
- 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 (annotationId == null) {
- return Mono.error(new IllegalArgumentException("Parameter annotationId is required and cannot be null."));
- }
final String apiVersion = "2015-05-01";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, apiVersion,
+ .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, resourceGroupName,
this.client.getSubscriptionId(), resourceName, annotationId, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Get the annotation for given id.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param annotationId The unique annotation ID. This is unique within a Application Insights component.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AnnotationErrorException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the annotation for given id along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> getWithResponseAsync(String resourceGroupName, String resourceName,
- String annotationId, 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 (annotationId == null) {
- return Mono.error(new IllegalArgumentException("Parameter annotationId is required and cannot be null."));
- }
- final String apiVersion = "2015-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(),
- resourceName, annotationId, accept, context);
- }
-
/**
* Get the annotation for given id.
*
@@ -662,7 +501,10 @@ private Mono> getAsync(String resourceGroupName, String re
@ServiceMethod(returns = ReturnType.SINGLE)
public Response> getWithResponse(String resourceGroupName, String resourceName,
String annotationId, Context context) {
- return getWithResponseAsync(resourceGroupName, resourceName, annotationId, context).block();
+ final String apiVersion = "2015-05-01";
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), apiVersion, resourceGroupName,
+ this.client.getSubscriptionId(), resourceName, annotationId, accept, context);
}
/**
@@ -680,4 +522,60 @@ public Response> getWithResponse(String resourceGroupName,
public List get(String resourceGroupName, String resourceName, String annotationId) {
return getWithResponse(resourceGroupName, resourceName, annotationId, Context.NONE).getValue();
}
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws AnnotationErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of annotations for a component for given time range along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws AnnotationErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of annotations for a component for given time range along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws AnnotationErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of annotations for a component for given time range along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
}
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java
index 817f8af3b34c..0f2fe58cd89f 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.implementation;
@@ -46,15 +46,11 @@ public Response> createWithResponse(String resourceGroupName, S
AnnotationInner annotationProperties, Context context) {
Response> inner
= this.serviceClient().createWithResponse(resourceGroupName, resourceName, annotationProperties, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- inner.getValue()
- .stream()
- .map(inner1 -> new AnnotationImpl(inner1, this.manager()))
- .collect(Collectors.toList()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ inner.getValue()
+ .stream()
+ .map(inner1 -> new AnnotationImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
}
public List create(String resourceGroupName, String resourceName,
@@ -82,15 +78,11 @@ public Response> getWithResponse(String resourceGroupName, Stri
String annotationId, Context context) {
Response> inner
= this.serviceClient().getWithResponse(resourceGroupName, resourceName, annotationId, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- inner.getValue()
- .stream()
- .map(inner1 -> new AnnotationImpl(inner1, this.manager()))
- .collect(Collectors.toList()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ inner.getValue()
+ .stream()
+ .map(inner1 -> new AnnotationImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
}
public List get(String resourceGroupName, String resourceName, String annotationId) {
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java
index feb77f6f5ded..42643378f1e1 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.applicationinsights.implementation;
@@ -30,8 +30,8 @@
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.applicationinsights.fluent.ApiKeysClient;
import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner;
+import com.azure.resourcemanager.applicationinsights.implementation.models.ApplicationInsightsComponentAPIKeyListResult;
import com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest;
-import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentApiKeyListResult;
import reactor.core.publisher.Mono;
/**
@@ -62,34 +62,69 @@ public final class ApiKeysClientImpl implements ApiKeysClient {
* The interface defining all the services for ApplicationInsightsManagementClientApiKeys to be used by the proxy
* service to perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "ApplicationInsightsM")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ApplicationInsightsManagementClientApiKeys")
public interface ApiKeysService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName,
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> create(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ApiKeyRequest apiKeyProperties, Context context);
+
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> create(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
+ Response createSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ApiKeyRequest apiKeyProperties, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName,
@PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName,
- @BodyParam("application/json") ApiKeyRequest apiKeyProperties, @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam("keyId") String keyId, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> delete(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName,
+ @PathParam("keyId") String keyId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName,
@PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName,
@PathParam("keyId") String keyId, @HeaderParam("Accept") String accept, Context context);
@@ -97,10 +132,26 @@ Mono> delete(@HostParam("$host
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName,
@PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName,
@PathParam("keyId") String keyId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -117,28 +168,14 @@ Mono> get(@HostParam("$host")
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(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 (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."));
- }
final String apiVersion = "2015-05-01";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, apiVersion,
- this.client.getSubscriptionId(), resourceName, accept, context))
- .>map(res -> new PagedResponseBase<>(
- res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, 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()));
}
@@ -147,39 +184,16 @@ private Mono> listSingleP
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of API keys of an Application Insights component along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
+ * @return a list of API keys of an Application Insights component as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(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 (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."));
- }
- final String apiVersion = "2015-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(),
- resourceName, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), null, null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName,
+ String resourceName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
@@ -190,12 +204,17 @@ private Mono> listSingleP
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of API keys of an Application Insights component as paginated response with {@link PagedFlux}.
+ * @return a list of API keys of an Application Insights component along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName,
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
String resourceName) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName));
+ final String apiVersion = "2015-05-01";
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -207,12 +226,17 @@ private PagedFlux listAsync(String reso
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of API keys of an Application Insights component as paginated response with {@link PagedFlux}.
+ * @return a list of API keys of an Application Insights component along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String resourceName,
- Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String resourceName, Context context) {
+ final String apiVersion = "2015-05-01";
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -227,7 +251,8 @@ private PagedFlux listAsync(String reso
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String resourceName) {
- return new PagedIterable<>(listAsync(resourceGroupName, resourceName));
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceName),
+ nextLink -> listNextSinglePage(nextLink));
}
/**
@@ -244,7 +269,8 @@ public PagedIterable list(String resour
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String resourceName,
Context context) {
- return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context));
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceName, context),
+ nextLink -> listNextSinglePage(nextLink, context));
}
/**
@@ -252,7 +278,7 @@ public PagedIterable list(String resour
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights
+ * @param apiKeyProperties Properties that need to be specified to create an API Key of an Application Insights
* component.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -263,32 +289,13 @@ public PagedIterable list(String resour
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createWithResponseAsync(String resourceGroupName,
String resourceName, ApiKeyRequest apiKeyProperties) {
- 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 (apiKeyProperties == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter apiKeyProperties is required and cannot be null."));
- } else {
- apiKeyProperties.validate();
- }
final String apiVersion = "2015-05-01";
+ final String contentType = "application/json";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, apiVersion,
- this.client.getSubscriptionId(), resourceName, apiKeyProperties, accept, context))
+ .withContext(
+ context -> service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(),
+ resourceGroupName, resourceName, contentType, accept, apiKeyProperties, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -297,52 +304,7 @@ private Mono> createWithRespon
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights
- * component.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return properties that define an API key of an Application Insights Component along with {@link Response} on
- * successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createWithResponseAsync(String resourceGroupName,
- String resourceName, ApiKeyRequest apiKeyProperties, 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 (apiKeyProperties == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter apiKeyProperties is required and cannot be null."));
- } else {
- apiKeyProperties.validate();
- }
- final String apiVersion = "2015-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.create(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(),
- resourceName, apiKeyProperties, accept, context);
- }
-
- /**
- * Create an API Key of an Application Insights component.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param resourceName The name of the Application Insights component resource.
- * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights
+ * @param apiKeyProperties Properties that need to be specified to create an API Key of an Application Insights
* component.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -362,7 +324,7 @@ private Mono createAsync(String resourc
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the Application Insights component resource.
- * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights
+ * @param apiKeyProperties Properties that need to be specified to create an API Key of an Application Insights
* component.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -373,7 +335,11 @@ private Mono