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 createAsync(String resourc @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse(String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, apiKeyProperties, 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, apiKeyProperties, context); } /** @@ -381,7 +347,7 @@ public Response createWithResponse(Stri * * @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. @@ -409,73 +375,14 @@ public ApplicationInsightsComponentApiKeyInner create(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, String keyId) { - 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 (keyId == null) { - return Mono.error(new IllegalArgumentException("Parameter keyId is required and cannot be null.")); - } final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, resourceGroupName, this.client.getSubscriptionId(), resourceName, keyId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Delete 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 keyId The API Key ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an API key of an Application Insights Component along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, - String resourceName, String keyId, 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 (keyId == null) { - return Mono.error(new IllegalArgumentException("Parameter keyId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, keyId, accept, context); - } - /** * Delete an API Key of an Application Insights component. * @@ -510,7 +417,10 @@ private Mono deleteAsync(String resourc @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String resourceName, String keyId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, keyId, context).block(); + final String apiVersion = "2015-05-01"; + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, keyId, accept, context); } /** @@ -543,72 +453,14 @@ public ApplicationInsightsComponentApiKeyInner delete(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, String keyId) { - 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 (keyId == null) { - return Mono.error(new IllegalArgumentException("Parameter keyId 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, keyId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get the API Key for this key 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 keyId The API Key ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the API Key for this key id along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String resourceName, String keyId, 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 (keyId == null) { - return Mono.error(new IllegalArgumentException("Parameter keyId 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, keyId, accept, context); - } - /** * Get the API Key for this key id. * @@ -642,7 +494,10 @@ private Mono getAsync(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String resourceName, String keyId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, keyId, 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, keyId, accept, context); } /** @@ -660,4 +515,62 @@ public Response getWithResponse(String public ApplicationInsightsComponentApiKeyInner get(String resourceGroupName, String resourceName, String keyId) { return getWithResponse(resourceGroupName, resourceName, keyId, 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 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}. + */ + @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 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}. + */ + @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 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}. + */ + @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/ApiKeysImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysImpl.java index 71ecd08d787d..518c67de8a84 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysImpl.java @@ -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; @@ -47,12 +47,8 @@ public Response createWithResponse(String re String resourceName, ApiKeyRequest apiKeyProperties, Context context) { Response inner = this.serviceClient().createWithResponse(resourceGroupName, resourceName, apiKeyProperties, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentApiKey create(String resourceGroupName, String resourceName, @@ -70,12 +66,8 @@ public Response deleteWithResponse(String re String resourceName, String keyId, Context context) { Response inner = this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, keyId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentApiKey delete(String resourceGroupName, String resourceName, String keyId) { @@ -92,12 +84,8 @@ public Response getWithResponse(String resou String keyId, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, resourceName, keyId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentApiKey get(String resourceGroupName, String resourceName, String keyId) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAnalyticsItemImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAnalyticsItemImpl.java index 1d19364be539..bbb46cc831c6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAnalyticsItemImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAnalyticsItemImpl.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/ApplicationInsightsComponentApiKeyImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentApiKeyImpl.java index 70e48c3874bc..a2a0d421a9d3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentApiKeyImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentApiKeyImpl.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/ApplicationInsightsComponentAvailableFeaturesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAvailableFeaturesImpl.java index 7548ca27fe30..07527833d13b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAvailableFeaturesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAvailableFeaturesImpl.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/ApplicationInsightsComponentBillingFeaturesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentBillingFeaturesImpl.java index fec17b1511e1..e8f2ca1caf91 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentBillingFeaturesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentBillingFeaturesImpl.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/ApplicationInsightsComponentExportConfigurationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentExportConfigurationImpl.java index 2b36b9f4fd14..2945133aa60e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentExportConfigurationImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentExportConfigurationImpl.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/ApplicationInsightsComponentFavoriteImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFavoriteImpl.java index 5b11fb162ca5..b72ada3a9db2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFavoriteImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFavoriteImpl.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/ApplicationInsightsComponentFeatureCapabilitiesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFeatureCapabilitiesImpl.java index 7738c91cca6d..f0d4ebf09211 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFeatureCapabilitiesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFeatureCapabilitiesImpl.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/ApplicationInsightsComponentImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentImpl.java index 928260c7e3d1..24c6ada1951f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentImpl.java @@ -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; @@ -378,6 +378,6 @@ public ApplicationInsightsComponentImpl withDisableLocalAuth(Boolean disableLoca } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentProactiveDetectionConfigurationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentProactiveDetectionConfigurationImpl.java index a8ea99baa2e7..663390c17d6a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentProactiveDetectionConfigurationImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentProactiveDetectionConfigurationImpl.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/ApplicationInsightsComponentQuotaStatusImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentQuotaStatusImpl.java index ad2fbb09429b..afe10255750a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentQuotaStatusImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentQuotaStatusImpl.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/ApplicationInsightsComponentWebTestLocationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentWebTestLocationImpl.java index 7a9504e7a0b2..dca01fbcffd0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentWebTestLocationImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentWebTestLocationImpl.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/ApplicationInsightsManagementClientBuilder.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientBuilder.java index a189fa782ec9..7615d5410f22 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientBuilder.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientBuilder.java @@ -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; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { ApplicationInsightsManagementClientImpl.class }) public final class ApplicationInsightsManagementClientBuilder { /* - * The ID of the target subscription. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the ApplicationInsightsManagementClientBuilder. */ - public ApplicationInsightsManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public ApplicationInsightsManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the ApplicationInsightsManagementClientBuilder. */ - public ApplicationInsightsManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public ApplicationInsightsManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public ApplicationInsightsManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); ApplicationInsightsManagementClientImpl client = new ApplicationInsightsManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java index 1dbd4e2df68e..bb42836a3729 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java @@ -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; @@ -15,12 +15,15 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient; @@ -59,31 +62,31 @@ @ServiceClient(builder = ApplicationInsightsManagementClientBuilder.class) public final class ApplicationInsightsManagementClientImpl implements ApplicationInsightsManagementClient { /** - * The ID of the target subscription. + * Service host. */ - private final String subscriptionId; + private final String endpoint; /** - * Gets The ID of the target subscription. + * Gets Service host. * - * @return the subscriptionId value. + * @return the endpoint value. */ - public String getSubscriptionId() { - return this.subscriptionId; + public String getEndpoint() { + return this.endpoint; } /** - * server parameter. + * The ID of the target subscription. The value must be an UUID. */ - private final String endpoint; + private final String subscriptionId; /** - * Gets server parameter. + * Gets The ID of the target subscription. The value must be an UUID. * - * @return the endpoint value. + * @return the subscriptionId value. */ - public String getEndpoint() { - return this.endpoint; + public String getSubscriptionId() { + return this.subscriptionId; } /** @@ -129,17 +132,73 @@ public Duration getDefaultPollInterval() { } /** - * The ComponentsClient object to access its operations. + * The WebTestsClient object to access its operations. */ - private final ComponentsClient components; + private final WebTestsClient webTests; /** - * Gets the ComponentsClient object to access its operations. + * Gets the WebTestsClient object to access its operations. * - * @return the ComponentsClient object. + * @return the WebTestsClient object. */ - public ComponentsClient getComponents() { - return this.components; + public WebTestsClient getWebTests() { + return this.webTests; + } + + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** + * The WorkbooksClient object to access its operations. + */ + private final WorkbooksClient workbooks; + + /** + * Gets the WorkbooksClient object to access its operations. + * + * @return the WorkbooksClient object. + */ + public WorkbooksClient getWorkbooks() { + return this.workbooks; + } + + /** + * The WorkbookTemplatesClient object to access its operations. + */ + private final WorkbookTemplatesClient workbookTemplates; + + /** + * Gets the WorkbookTemplatesClient object to access its operations. + * + * @return the WorkbookTemplatesClient object. + */ + public WorkbookTemplatesClient getWorkbookTemplates() { + return this.workbookTemplates; + } + + /** + * The AnalyticsItemsClient object to access its operations. + */ + private final AnalyticsItemsClient analyticsItems; + + /** + * Gets the AnalyticsItemsClient object to access its operations. + * + * @return the AnalyticsItemsClient object. + */ + public AnalyticsItemsClient getAnalyticsItems() { + return this.analyticsItems; } /** @@ -269,101 +328,59 @@ public WorkItemConfigurationsClient getWorkItemConfigurations() { } /** - * The FavoritesClient object to access its operations. - */ - private final FavoritesClient favorites; - - /** - * Gets the FavoritesClient object to access its operations. - * - * @return the FavoritesClient object. - */ - public FavoritesClient getFavorites() { - return this.favorites; - } - - /** - * The WebTestLocationsClient object to access its operations. - */ - private final WebTestLocationsClient webTestLocations; - - /** - * Gets the WebTestLocationsClient object to access its operations. - * - * @return the WebTestLocationsClient object. - */ - public WebTestLocationsClient getWebTestLocations() { - return this.webTestLocations; - } - - /** - * The WebTestsClient object to access its operations. - */ - private final WebTestsClient webTests; - - /** - * Gets the WebTestsClient object to access its operations. - * - * @return the WebTestsClient object. - */ - public WebTestsClient getWebTests() { - return this.webTests; - } - - /** - * The AnalyticsItemsClient object to access its operations. + * The ComponentLinkedStorageAccountsOperationsClient object to access its operations. */ - private final AnalyticsItemsClient analyticsItems; + private final ComponentLinkedStorageAccountsOperationsClient componentLinkedStorageAccountsOperations; /** - * Gets the AnalyticsItemsClient object to access its operations. + * Gets the ComponentLinkedStorageAccountsOperationsClient object to access its operations. * - * @return the AnalyticsItemsClient object. + * @return the ComponentLinkedStorageAccountsOperationsClient object. */ - public AnalyticsItemsClient getAnalyticsItems() { - return this.analyticsItems; + public ComponentLinkedStorageAccountsOperationsClient getComponentLinkedStorageAccountsOperations() { + return this.componentLinkedStorageAccountsOperations; } /** - * The OperationsClient object to access its operations. + * The ComponentsClient object to access its operations. */ - private final OperationsClient operations; + private final ComponentsClient components; /** - * Gets the OperationsClient object to access its operations. + * Gets the ComponentsClient object to access its operations. * - * @return the OperationsClient object. + * @return the ComponentsClient object. */ - public OperationsClient getOperations() { - return this.operations; + public ComponentsClient getComponents() { + return this.components; } /** - * The WorkbookTemplatesClient object to access its operations. + * The DeletedWorkbooksClient object to access its operations. */ - private final WorkbookTemplatesClient workbookTemplates; + private final DeletedWorkbooksClient deletedWorkbooks; /** - * Gets the WorkbookTemplatesClient object to access its operations. + * Gets the DeletedWorkbooksClient object to access its operations. * - * @return the WorkbookTemplatesClient object. + * @return the DeletedWorkbooksClient object. */ - public WorkbookTemplatesClient getWorkbookTemplates() { - return this.workbookTemplates; + public DeletedWorkbooksClient getDeletedWorkbooks() { + return this.deletedWorkbooks; } /** - * The WorkbooksClient object to access its operations. + * The FavoritesClient object to access its operations. */ - private final WorkbooksClient workbooks; + private final FavoritesClient favorites; /** - * Gets the WorkbooksClient object to access its operations. + * Gets the FavoritesClient object to access its operations. * - * @return the WorkbooksClient object. + * @return the FavoritesClient object. */ - public WorkbooksClient getWorkbooks() { - return this.workbooks; + public FavoritesClient getFavorites() { + return this.favorites; } /** @@ -381,31 +398,17 @@ public LiveTokensClient getLiveTokens() { } /** - * The ComponentLinkedStorageAccountsOperationsClient object to access its operations. - */ - private final ComponentLinkedStorageAccountsOperationsClient componentLinkedStorageAccountsOperations; - - /** - * Gets the ComponentLinkedStorageAccountsOperationsClient object to access its operations. - * - * @return the ComponentLinkedStorageAccountsOperationsClient object. - */ - public ComponentLinkedStorageAccountsOperationsClient getComponentLinkedStorageAccountsOperations() { - return this.componentLinkedStorageAccountsOperations; - } - - /** - * The DeletedWorkbooksClient object to access its operations. + * The WebTestLocationsClient object to access its operations. */ - private final DeletedWorkbooksClient deletedWorkbooks; + private final WebTestLocationsClient webTestLocations; /** - * Gets the DeletedWorkbooksClient object to access its operations. + * Gets the WebTestLocationsClient object to access its operations. * - * @return the DeletedWorkbooksClient object. + * @return the WebTestLocationsClient object. */ - public DeletedWorkbooksClient getDeletedWorkbooks() { - return this.deletedWorkbooks; + public WebTestLocationsClient getWebTestLocations() { + return this.webTestLocations; } /** @@ -415,17 +418,21 @@ public DeletedWorkbooksClient getDeletedWorkbooks() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ ApplicationInsightsManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.components = new ComponentsClientImpl(this); + this.subscriptionId = subscriptionId; + this.webTests = new WebTestsClientImpl(this); + this.operations = new OperationsClientImpl(this); + this.workbooks = new WorkbooksClientImpl(this); + this.workbookTemplates = new WorkbookTemplatesClientImpl(this); + this.analyticsItems = new AnalyticsItemsClientImpl(this); this.annotations = new AnnotationsClientImpl(this); this.apiKeys = new ApiKeysClientImpl(this); this.exportConfigurations = new ExportConfigurationsClientImpl(this); @@ -435,16 +442,12 @@ public DeletedWorkbooksClient getDeletedWorkbooks() { this.componentAvailableFeatures = new ComponentAvailableFeaturesClientImpl(this); this.proactiveDetectionConfigurations = new ProactiveDetectionConfigurationsClientImpl(this); this.workItemConfigurations = new WorkItemConfigurationsClientImpl(this); - this.favorites = new FavoritesClientImpl(this); - this.webTestLocations = new WebTestLocationsClientImpl(this); - this.webTests = new WebTestsClientImpl(this); - this.analyticsItems = new AnalyticsItemsClientImpl(this); - this.operations = new OperationsClientImpl(this); - this.workbookTemplates = new WorkbookTemplatesClientImpl(this); - this.workbooks = new WorkbooksClientImpl(this); - this.liveTokens = new LiveTokensClientImpl(this); this.componentLinkedStorageAccountsOperations = new ComponentLinkedStorageAccountsOperationsClientImpl(this); + this.components = new ComponentsClientImpl(this); this.deletedWorkbooks = new DeletedWorkbooksClientImpl(this); + this.favorites = new FavoritesClientImpl(this); + this.liveTokens = new LiveTokensClientImpl(this); + this.webTestLocations = new WebTestLocationsClientImpl(this); } /** @@ -484,6 +487,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java index 3791849c3b79..ec27f1e1d97b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java @@ -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; @@ -54,16 +54,25 @@ public final class ComponentAvailableFeaturesClientImpl implements ComponentAvai * The interface defining all the services for ApplicationInsightsManagementClientComponentAvailableFeatures to be * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientComponentAvailableFeatures") public interface ComponentAvailableFeaturesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/getavailablebillingfeatures") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + Mono> get(@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}/getavailablebillingfeatures") + @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, @HeaderParam("Accept") String accept, Context context); } @@ -81,66 +90,14 @@ Mono> get(@HostPara @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Returns all available features of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component available features along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getWithResponseAsync(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.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, accept, context); - } - /** * Returns all available features of the application insights component. * @@ -171,7 +128,10 @@ private Mono getAsync(String @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, 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, accept, context); } /** diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java index 2bf83f70cbb3..4349a6419dc3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java @@ -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,12 +30,8 @@ public Response getWithResponse(S String resourceName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentAvailableFeaturesImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentAvailableFeaturesImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentAvailableFeatures get(String resourceGroupName, String resourceName) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java index e95c65b0152f..0ffe85be7c71 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java @@ -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; @@ -56,27 +56,46 @@ public final class ComponentCurrentBillingFeaturesClientImpl implements Componen * The interface defining all the services for ApplicationInsightsManagementClientComponentCurrentBillingFeatures to * be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientComponentCurrentBillingFeatures") public interface ComponentCurrentBillingFeaturesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + Mono> get(@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}/currentbillingfeatures") + @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, + @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + Mono> update(@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") ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@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") ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, + Context context); } /** @@ -93,66 +112,14 @@ Mono> update(@HostPar @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Returns current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getWithResponseAsync(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.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, accept, context); - } - /** * Returns current billing features for an Application Insights component. * @@ -183,7 +150,10 @@ private Mono getAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, 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, accept, context); } /** @@ -206,8 +176,7 @@ public ApplicationInsightsComponentBillingFeaturesInner get(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param 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 ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -218,32 +187,13 @@ public ApplicationInsightsComponentBillingFeaturesInner get(String resourceGroup private Mono> updateWithResponseAsync( String resourceGroupName, String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { - 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 (billingFeaturesProperties == null) { - return Mono.error( - new IllegalArgumentException("Parameter billingFeaturesProperties is required and cannot be null.")); - } else { - billingFeaturesProperties.validate(); - } final String apiVersion = "2015-05-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, billingFeaturesProperties, accept, context)) + .withContext( + context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, contentType, accept, billingFeaturesProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -252,54 +202,7 @@ private Mono> updateW * * @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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, 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 (billingFeaturesProperties == null) { - return Mono.error( - new IllegalArgumentException("Parameter billingFeaturesProperties is required and cannot be null.")); - } else { - billingFeaturesProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, billingFeaturesProperties, accept, context); - } - - /** - * Update current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param 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 ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -317,8 +220,7 @@ private Mono updateAsync(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 ManagementException thrown if the request is rejected by server. @@ -329,7 +231,11 @@ private Mono updateAsync(Strin public Response updateWithResponse(String resourceGroupName, String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, billingFeaturesProperties, context).block(); + final String apiVersion = "2015-05-01"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, contentType, accept, billingFeaturesProperties, context); } /** @@ -337,8 +243,7 @@ public Response updateWithResp * * @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 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/implementation/ComponentCurrentBillingFeaturesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java index 6b85091aacaa..853463df84d6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java @@ -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,12 +30,8 @@ public Response getWithResponse(Str String resourceName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentBillingFeaturesImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentBillingFeaturesImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentBillingFeatures get(String resourceGroupName, String resourceName) { @@ -53,12 +49,8 @@ public Response updateWithResponse( Context context) { Response inner = this.serviceClient() .updateWithResponse(resourceGroupName, resourceName, billingFeaturesProperties, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentBillingFeaturesImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentBillingFeaturesImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentBillingFeatures update(String resourceGroupName, String resourceName, diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java index de5e4f0366b8..5820fab96357 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java @@ -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; @@ -54,16 +54,25 @@ public final class ComponentFeatureCapabilitiesClientImpl implements ComponentFe * The interface defining all the services for ApplicationInsightsManagementClientComponentFeatureCapabilities to be * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientComponentFeatureCapabilities") public interface ComponentFeatureCapabilitiesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/featurecapabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + Mono> get(@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}/featurecapabilities") + @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, @HeaderParam("Accept") String accept, Context context); } @@ -81,66 +90,14 @@ Mono> get(@HostPa @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Returns feature capabilities of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component feature capabilities along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getWithResponseAsync(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.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, accept, context); - } - /** * Returns feature capabilities of the application insights component. * @@ -171,7 +128,10 @@ private Mono getAsync(Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, 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, accept, context); } /** diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java index b634309c19d6..a65e4f214fce 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java @@ -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,12 +30,8 @@ public Response getWithResponse String resourceName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentFeatureCapabilitiesImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentFeatureCapabilitiesImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentFeatureCapabilities get(String resourceGroupName, String resourceName) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java index 0cc408da97b9..0d707d2f81c1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java @@ -1,9 +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.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner; import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts; @@ -28,6 +29,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String linkedStorageAccount() { return this.innerModel().linkedStorageAccount(); } @@ -141,6 +146,6 @@ public ComponentLinkedStorageAccountsImpl withLinkedStorageAccount(String linked } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java index 9149b7318810..d18eb266a53f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java @@ -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; @@ -63,48 +63,88 @@ public final class ComponentLinkedStorageAccountsOperationsClientImpl * ApplicationInsightsManagementClientComponentLinkedStorageAccountsOperations to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientComponentLinkedStorageAccountsOperations") public interface ComponentLinkedStorageAccountsOperationsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/linkedStorageAccounts/{storageType}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("storageType") StorageType storageType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/linkedStorageAccounts/{storageType}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createAndUpdate(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @PathParam("storageType") StorageType storageType, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("storageType") StorageType storageType, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createAndUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("storageType") StorageType storageType, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/linkedStorageAccounts/{storageType}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @PathParam("storageType") StorageType storageType, + Response createAndUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("storageType") StorageType storageType, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("storageType") StorageType storageType, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("storageType") StorageType storageType, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/linkedStorageAccounts/{storageType}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @PathParam("storageType") StorageType storageType, @HeaderParam("Accept") String accept, Context context); + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("storageType") StorageType storageType, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @ExpectedResponses({ 200, 204 }) + @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("storageType") StorageType storageType, Context context); } /** @@ -122,73 +162,14 @@ Mono> delete(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, StorageType storageType) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (storageType == null) { - return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); - } final String apiVersion = "2020-03-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, storageType, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, storageType, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Returns the current linked storage settings for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param storageType The type of the Application Insights component data source for the linked storage account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component linked storage accounts along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String resourceName, StorageType storageType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (storageType == null) { - return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); - } - final String apiVersion = "2020-03-01-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, storageType, accept, context); - } - /** * Returns the current linked storage settings for an Application Insights component. * @@ -222,7 +203,10 @@ private Mono getAsync(String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String resourceName, StorageType storageType, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, storageType, context).block(); + final String apiVersion = "2020-03-01-preview"; + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, storageType, accept, context); } /** @@ -260,90 +244,16 @@ public ComponentLinkedStorageAccountsInner get(String resourceGroupName, String private Mono> createAndUpdateWithResponseAsync( String resourceGroupName, String resourceName, StorageType storageType, ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (storageType == null) { - return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); - } - if (linkedStorageAccountsProperties == null) { - return Mono.error(new IllegalArgumentException( - "Parameter linkedStorageAccountsProperties is required and cannot be null.")); - } else { - linkedStorageAccountsProperties.validate(); - } final String apiVersion = "2020-03-01-preview"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createAndUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, storageType, linkedStorageAccountsProperties, accept, - context)) + .withContext(context -> service.createAndUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, storageType, contentType, accept, + linkedStorageAccountsProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Replace current linked storage account for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param storageType The type of the Application Insights component data source for the linked storage account. - * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage accounts for - * an Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component linked storage accounts along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createAndUpdateWithResponseAsync( - String resourceGroupName, String resourceName, StorageType storageType, - ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (storageType == null) { - return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); - } - if (linkedStorageAccountsProperties == null) { - return Mono.error(new IllegalArgumentException( - "Parameter linkedStorageAccountsProperties is required and cannot be null.")); - } else { - linkedStorageAccountsProperties.validate(); - } - final String apiVersion = "2020-03-01-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createAndUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, storageType, linkedStorageAccountsProperties, accept, - context); - } - /** * Replace current linked storage account for an Application Insights component. * @@ -383,8 +293,12 @@ private Mono createAndUpdateAsync(String re public Response createAndUpdateWithResponse(String resourceGroupName, String resourceName, StorageType storageType, ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties, Context context) { - return createAndUpdateWithResponseAsync(resourceGroupName, resourceName, storageType, - linkedStorageAccountsProperties, context).block(); + final String apiVersion = "2020-03-01-preview"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createAndUpdateSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, storageType, contentType, accept, linkedStorageAccountsProperties, + context); } /** @@ -425,89 +339,16 @@ public ComponentLinkedStorageAccountsInner createAndUpdate(String resourceGroupN private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, StorageType storageType, ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (storageType == null) { - return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); - } - if (linkedStorageAccountsProperties == null) { - return Mono.error(new IllegalArgumentException( - "Parameter linkedStorageAccountsProperties is required and cannot be null.")); - } else { - linkedStorageAccountsProperties.validate(); - } final String apiVersion = "2020-03-01-preview"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, storageType, linkedStorageAccountsProperties, accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, storageType, contentType, accept, + linkedStorageAccountsProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Update linked storage accounts for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param storageType The type of the Application Insights component data source for the linked storage account. - * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked storage accounts - * for an Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component linked storage accounts along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String resourceName, StorageType storageType, - ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (storageType == null) { - return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); - } - if (linkedStorageAccountsProperties == null) { - return Mono.error(new IllegalArgumentException( - "Parameter linkedStorageAccountsProperties is required and cannot be null.")); - } else { - linkedStorageAccountsProperties.validate(); - } - final String apiVersion = "2020-03-01-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, storageType, linkedStorageAccountsProperties, accept, context); - } - /** * Update linked storage accounts for an Application Insights component. * @@ -546,8 +387,12 @@ private Mono updateAsync(String resourceGro public Response updateWithResponse(String resourceGroupName, String resourceName, StorageType storageType, ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, - context).block(); + final String apiVersion = "2020-03-01-preview"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, storageType, contentType, accept, linkedStorageAccountsProperties, + context); } /** @@ -584,72 +429,13 @@ public ComponentLinkedStorageAccountsInner update(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, StorageType storageType) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (storageType == null) { - return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); - } final String apiVersion = "2020-03-01-preview"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, storageType, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, storageType, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Delete linked storage accounts for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param storageType The type of the Application Insights component data source for the linked storage account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - StorageType storageType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (storageType == null) { - return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); - } - final String apiVersion = "2020-03-01-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, storageType, accept, context); - } - /** * Delete linked storage accounts for an Application Insights component. * @@ -681,7 +467,9 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String resourceName, StorageType storageType, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, storageType, context).block(); + final String apiVersion = "2020-03-01-preview"; + return service.deleteSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, storageType, context); } /** diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java index 5ea29b91b337..ed28cb44fa49 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java @@ -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; @@ -31,12 +31,8 @@ public Response getWithResponse(String resourceG StorageType storageType, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, resourceName, storageType, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentLinkedStorageAccountsImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ComponentLinkedStorageAccountsImpl(inner.getValue(), this.manager())); } public ComponentLinkedStorageAccounts get(String resourceGroupName, String resourceName, StorageType storageType) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeResponseImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeResponseImpl.java index 85512726b6b4..09adda5a5423 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeResponseImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeResponseImpl.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/ComponentPurgeStatusResponseImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeStatusResponseImpl.java index 5b24ee8a9292..c2c2fac24ac3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeStatusResponseImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeStatusResponseImpl.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/ComponentQuotaStatusClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusClientImpl.java index 65c8f6421c60..ad5dd8040772 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusClientImpl.java @@ -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; @@ -54,16 +54,25 @@ public final class ComponentQuotaStatusClientImpl implements ComponentQuotaStatu * The interface defining all the services for ApplicationInsightsManagementClientComponentQuotaStatus to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientComponentQuotaStatus") public interface ComponentQuotaStatusService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/quotastatus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + Mono> get(@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}/quotastatus") + @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, @HeaderParam("Accept") String accept, Context context); } @@ -81,66 +90,14 @@ Mono> get(@HostParam("$ho @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Returns daily data volume cap (quota) status for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component daily data volume cap status along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, accept, context); - } - /** * Returns daily data volume cap (quota) status for an Application Insights component. * @@ -170,7 +127,10 @@ private Mono getAsync(String resou @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, 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, accept, context); } /** diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java index 8914f6b657aa..6dc6803d21a5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java @@ -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,12 +30,8 @@ public Response getWithResponse(String String resourceName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentQuotaStatusImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentQuotaStatusImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentQuotaStatus get(String resourceGroupName, String resourceName) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java index f7485bef3d77..ef056f3b44c7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java @@ -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; @@ -34,7 +34,7 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentInner; import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeResponseInner; import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeStatusResponseInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentListResult; +import com.azure.resourcemanager.applicationinsights.implementation.models.ApplicationInsightsComponentListResult; import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBody; import com.azure.resourcemanager.applicationinsights.models.TagsResource; import reactor.core.publisher.Mono; @@ -68,558 +68,463 @@ public final class ComponentsClientImpl implements ComponentsClient { * The interface defining all the services for ApplicationInsightsManagementClientComponents to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientComponents") public interface ComponentsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/components") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@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") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@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); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Mono> createOrUpdate(@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") ApplicationInsightsComponentInner insightProperties, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@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") ApplicationInsightsComponentInner insightProperties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@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") TagsResource componentTags, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateTagsSync(@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") TagsResource componentTags, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") + @ExpectedResponses({ 200, 204 }) + @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, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ApplicationInsightsComponentInner insightProperties, - @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/components") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateTags(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") TagsResource componentTags, @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/components") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> purge(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ComponentPurgeBody body, @HeaderParam("Accept") String accept, - Context context); + Mono> purge(@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") ComponentPurgeBody body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response purgeSync(@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") ComponentPurgeBody body, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getPurgeStatus(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + Mono> getPurgeStatus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("purgeId") String purgeId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getPurgeStatusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("purgeId") String purgeId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @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 listByResourceGroupNextSync( + @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) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @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) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return an Application Insights component definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> + getByResourceGroupWithResponseAsync(String resourceGroupName, String resourceName) { final String apiVersion = "2020-02-02"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of all Application Insights components within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Application Insights components within a subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-02-02"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Application Insights components within a subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Application Insights components within a subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Application Insights components within a subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Application Insights components within a subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Gets a list of Application Insights components within a resource group. + * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return an Application Insights component definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (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.")); - } - final String apiVersion = "2020-02-02"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - apiVersion, this.client.getSubscriptionId(), 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())); + private Mono getByResourceGroupAsync(String resourceGroupName, + String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of Application Insights components within a resource group. + * 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 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 along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return an Application Insights component definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (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.")); - } + public Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceName, Context context) { final String apiVersion = "2020-02-02"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getByResourceGroupSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); } /** - * Gets a list of Application Insights components within a resource group. + * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. + * @return an Application Insights component definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationInsightsComponentInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** - * 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 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 PagedFlux}. + * @return an Application Insights component definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ApplicationInsightsComponentInner insightProperties) { + final String apiVersion = "2020-02-02"; + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, + insightProperties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ApplicationInsightsComponentInner insightProperties) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, insightProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * 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 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) - public PagedIterable listByResourceGroup(String resourceGroupName, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String resourceName, ApplicationInsightsComponentInner insightProperties, Context context) { + final String apiVersion = "2020-02-02"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, contentType, accept, insightProperties, context); } /** - * Deletes an Application Insights component. + * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (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 = "2020-02-02"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public ApplicationInsightsComponentInner createOrUpdate(String resourceGroupName, String resourceName, + ApplicationInsightsComponentInner insightProperties) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, insightProperties, Context.NONE).getValue(); } /** - * 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 context The context to associate with this operation. + * @param componentTags Updated tag information to set into the component instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return an Application Insights component definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (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.")); - } + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String resourceName, TagsResource componentTags) { final String apiVersion = "2020-02-02"; + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, accept, context); + return FluxUtil + .withContext( + context -> service.updateTags(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, contentType, accept, componentTags, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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 ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return an Application Insights component definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); + private Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsResource componentTags) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, componentTags) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * 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 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) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + public Response updateTagsWithResponse(String resourceGroupName, + String resourceName, TagsResource componentTags, Context context) { + final String apiVersion = "2020-02-02"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateTagsSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, contentType, accept, componentTags, 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 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) - public void delete(String resourceGroupName, String resourceName) { - deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + public ApplicationInsightsComponentInner updateTags(String resourceGroupName, String resourceName, + TagsResource componentTags) { + return updateTagsWithResponse(resourceGroupName, resourceName, componentTags, Context.NONE).getValue(); } /** - * 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 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} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getByResourceGroupWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (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.")); - } + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { final String apiVersion = "2020-02-02"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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 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} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getByResourceGroupWithResponseAsync(String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (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 = "2020-02-02"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, accept, 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 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 on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); } /** - * 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. @@ -627,364 +532,238 @@ private Mono getByResourceGroupAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + final String apiVersion = "2020-02-02"; + return service.deleteSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, 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 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) - public ApplicationInsightsComponentInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); } /** - * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of Application Insights components within a resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ApplicationInsightsComponentInner insightProperties) { - 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 (insightProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter insightProperties is required and cannot be null.")); - } else { - insightProperties.validate(); - } + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { final String apiVersion = "2020-02-02"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, insightProperties, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, 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())); } /** - * 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 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} on successful completion of - * {@link Mono}. + * @return a list of Application Insights components within a resource group as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ApplicationInsightsComponentInner insightProperties, 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 (insightProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter insightProperties is required and cannot be null.")); - } else { - insightProperties.validate(); - } - final String apiVersion = "2020-02-02"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, insightProperties, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. + * @return a list of Application Insights components within a resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ApplicationInsightsComponentInner insightProperties) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, insightProperties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String apiVersion = "2020-02-02"; + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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 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 along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String resourceName, ApplicationInsightsComponentInner insightProperties, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, insightProperties, context).block(); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String apiVersion = "2020-02-02"; + final String accept = "application/json"; + Response res = service.listByResourceGroupSync( + this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) - public ApplicationInsightsComponentInner createOrUpdate(String resourceGroupName, String resourceName, - ApplicationInsightsComponentInner insightProperties) { - return createOrUpdateWithResponse(resourceGroupName, resourceName, insightProperties, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. + * 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 componentTags Updated tag information to set into the component instance. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of Application Insights components within a resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Gets a list of all Application Insights components within a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all Application Insights components within a subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync(String resourceGroupName, - String resourceName, TagsResource componentTags) { - 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 (componentTags == null) { - return Mono.error(new IllegalArgumentException("Parameter componentTags is required and cannot be null.")); - } else { - componentTags.validate(); - } + private Mono> listSinglePageAsync() { final String apiVersion = "2020-02-02"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, componentTags, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + 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())); } /** - * 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 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} on successful completion of - * {@link Mono}. + * @return a list of all Application Insights components within a subscription as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync(String resourceGroupName, - String resourceName, TagsResource componentTags, 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 (componentTags == null) { - return Mono.error(new IllegalArgumentException("Parameter componentTags is required and cannot be null.")); - } else { - componentTags.validate(); - } - final String apiVersion = "2020-02-02"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, componentTags, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. + * @return a list of all Application Insights components within a subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String resourceName, - TagsResource componentTags) { - return updateTagsWithResponseAsync(resourceGroupName, resourceName, componentTags) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listSinglePage() { + final String apiVersion = "2020-02-02"; + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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 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 along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse(String resourceGroupName, - String resourceName, TagsResource componentTags, Context context) { - return updateTagsWithResponseAsync(resourceGroupName, resourceName, componentTags, context).block(); + private PagedResponse listSinglePage(Context context) { + final String apiVersion = "2020-02-02"; + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) - public ApplicationInsightsComponentInner updateTags(String resourceGroupName, String resourceName, - TagsResource componentTags) { - return updateTagsWithResponse(resourceGroupName, resourceName, componentTags, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * Purges data in an Application Insights component by a set of user-defined filters. - * - * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the - * execution of purge requests by sending a single command whose predicate includes all user identities that require - * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge - * request to verify that the results are expected. - * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please - * run purge operation (directly on the - * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific - * resource id. + * 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 body Describes the body of a request to purge data in a single table of an Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response containing operationId for a specific purge action along with {@link Response} on successful - * completion of {@link Mono}. + * @return a list of all Application Insights components within a subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> purgeWithResponseAsync(String resourceGroupName, - String resourceName, ComponentPurgeBody body) { - 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 (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String apiVersion = "2020-02-02"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.purge(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -1002,7 +781,6 @@ private Mono> purgeWithResponseAsync(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 body Describes the body of a request to purge data in a single table of an Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1011,32 +789,14 @@ private Mono> purgeWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> purgeWithResponseAsync(String resourceGroupName, - String resourceName, ComponentPurgeBody body, 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 (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + String resourceName, ComponentPurgeBody body) { final String apiVersion = "2020-02-02"; + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.purge(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, body, accept, context); + return FluxUtil + .withContext(context -> service.purge(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1090,7 +850,11 @@ private Mono purgeAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response purgeWithResponse(String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context) { - return purgeWithResponseAsync(resourceGroupName, resourceName, body, context).block(); + final String apiVersion = "2020-02-02"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.purgeSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, contentType, accept, body, context); } /** @@ -1133,73 +897,14 @@ public ComponentPurgeResponseInner purge(String resourceGroupName, String resour @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getPurgeStatusWithResponseAsync(String resourceGroupName, String resourceName, String purgeId) { - 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 (purgeId == null) { - return Mono.error(new IllegalArgumentException("Parameter purgeId is required and cannot be null.")); - } final String apiVersion = "2020-02-02"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getPurgeStatus(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, purgeId, accept, context)) + .withContext(context -> service.getPurgeStatus(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, purgeId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get status for an ongoing purge operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return status for an ongoing purge operation along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPurgeStatusWithResponseAsync(String resourceGroupName, - String resourceName, String purgeId, 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 (purgeId == null) { - return Mono.error(new IllegalArgumentException("Parameter purgeId is required and cannot be null.")); - } - final String apiVersion = "2020-02-02"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getPurgeStatus(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, purgeId, accept, context); - } - /** * Get status for an ongoing purge operation. * @@ -1233,7 +938,10 @@ private Mono getPurgeStatusAsync(String resou @ServiceMethod(returns = ReturnType.SINGLE) public Response getPurgeStatusWithResponse(String resourceGroupName, String resourceName, String purgeId, Context context) { - return getPurgeStatusWithResponseAsync(resourceGroupName, resourceName, purgeId, context).block(); + final String apiVersion = "2020-02-02"; + final String accept = "application/json"; + return service.getPurgeStatusSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, purgeId, accept, context); } /** @@ -1260,25 +968,39 @@ public ComponentPurgeStatusResponseInner getPurgeStatus(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the list of Application Insights Resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of Application Insights components within a resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> + listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .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 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 along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(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. * @@ -1287,24 +1009,16 @@ private Mono> listNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the list of Application Insights Resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of Application Insights components within a resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1314,28 +1028,36 @@ private Mono> listNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the list of Application Insights Resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of all Application Insights components within a subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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 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 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. * @@ -1344,23 +1066,14 @@ private Mono> listNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the list of Application Insights Resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of all Application Insights components within a subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + 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/ComponentsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsImpl.java index e656af28769b..53235ee1d753 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsImpl.java @@ -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; @@ -32,16 +32,31 @@ public ComponentsImpl(ComponentsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentImpl(inner.getValue(), this.manager())); } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); + public ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, String resourceName) { + ApplicationInsightsComponentInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new ApplicationInsightsComponentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -58,47 +73,24 @@ public PagedIterable listByResourceGroup(String re inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); } - public Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); - } - - public void deleteByResourceGroup(String resourceGroupName, String resourceName) { - this.serviceClient().delete(resourceGroupName, resourceName); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, - String resourceName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); } - public ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentInner inner - = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); - if (inner != null) { - return new ApplicationInsightsComponentImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); } public Response purgeWithResponse(String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context) { Response inner = this.serviceClient().purgeWithResponse(resourceGroupName, resourceName, body, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentPurgeResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ComponentPurgeResponseImpl(inner.getValue(), this.manager())); } public ComponentPurgeResponse purge(String resourceGroupName, String resourceName, ComponentPurgeBody body) { @@ -114,12 +106,8 @@ public Response getPurgeStatusWithResponse(String String resourceName, String purgeId, Context context) { Response inner = this.serviceClient().getPurgeStatusWithResponse(resourceGroupName, resourceName, purgeId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentPurgeStatusResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ComponentPurgeStatusResponseImpl(inner.getValue(), this.manager())); } public ComponentPurgeStatusResponse getPurgeStatus(String resourceGroupName, String resourceName, String purgeId) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbookImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbookImpl.java index 7edceb7de842..3824b18e9332 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbookImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbookImpl.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/DeletedWorkbooksClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbooksClientImpl.java index 29a846f1c57d..5fca35bff529 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbooksClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbooksClientImpl.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; @@ -26,9 +26,9 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.applicationinsights.fluent.DeletedWorkbooksClient; import com.azure.resourcemanager.applicationinsights.fluent.models.DeletedWorkbookInner; +import com.azure.resourcemanager.applicationinsights.implementation.models.DeletedWorkbooksListResult; import com.azure.resourcemanager.applicationinsights.models.CategoryType; import com.azure.resourcemanager.applicationinsights.models.DeletedWorkbookErrorDefinitionException; -import com.azure.resourcemanager.applicationinsights.models.DeletedWorkbooksListResult; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -63,16 +63,25 @@ public final class DeletedWorkbooksClientImpl implements DeletedWorkbooksClient * The interface defining all the services for ApplicationInsightsManagementClientDeletedWorkbooks to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientDeletedWorkbooks") public interface DeletedWorkbooksService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/deletedWorkbooks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DeletedWorkbookErrorDefinitionException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("category") CategoryType category, - @QueryParam("tags") String tags, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("category") CategoryType category, @QueryParam("tags") String tags, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/deletedWorkbooks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DeletedWorkbookErrorDefinitionException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("category") CategoryType category, @QueryParam("tags") String tags, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -80,7 +89,15 @@ Mono> list(@HostParam("$host") String endpo @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DeletedWorkbookErrorDefinitionException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @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(DeletedWorkbookErrorDefinitionException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -97,14 +114,6 @@ Mono> listBySubscriptionNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(CategoryType category, List tags) { - 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.")); - } final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; String tagsConverted = (tags == null) @@ -113,51 +122,13 @@ private Mono> listSinglePageAsync(CategoryTy .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), category, - tagsConverted, apiVersion, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + category, tagsConverted, 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 all recently deleted Workbooks in a specified subscription. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DeletedWorkbookErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all recently deleted Workbooks in a specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(CategoryType category, List tags, - 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.")); - } - final String apiVersion = "2024-02-01-preview"; - final String accept = "application/json"; - String tagsConverted = (tags == null) - ? null - : tags.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), category, tagsConverted, apiVersion, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - /** * Get all recently deleted Workbooks in a specified subscription. * @@ -189,6 +160,31 @@ private PagedFlux listAsync() { nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } + /** + * Get all recently deleted Workbooks in a specified subscription. + * + * @param category Category of workbook to return. + * @param tags Tags presents on each workbook returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DeletedWorkbookErrorDefinitionException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all recently deleted Workbooks in a specified subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(CategoryType category, List tags) { + final String apiVersion = "2024-02-01-preview"; + final String accept = "application/json"; + String tagsConverted = (tags == null) + ? null + : tags.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res = service.listSync(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), category, tagsConverted, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get all recently deleted Workbooks in a specified subscription. * @@ -198,12 +194,22 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DeletedWorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all recently deleted Workbooks in a specified subscription as paginated response with {@link PagedFlux}. + * @return all recently deleted Workbooks in a specified subscription along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(CategoryType category, List tags, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(category, tags, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(CategoryType category, List tags, + Context context) { + final String apiVersion = "2024-02-01-preview"; + final String accept = "application/json"; + String tagsConverted = (tags == null) + ? null + : tags.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res = service.listSync(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), category, tagsConverted, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -218,7 +224,8 @@ private PagedFlux listAsync(CategoryType category, List list() { final CategoryType category = null; final List tags = null; - return new PagedIterable<>(listAsync(category, tags)); + return new PagedIterable<>(() -> listSinglePage(category, tags), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** @@ -235,7 +242,8 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(CategoryType category, List tags, Context context) { - return new PagedIterable<>(listAsync(category, tags, context)); + return new PagedIterable<>(() -> listSinglePage(category, tags, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -245,17 +253,11 @@ public PagedIterable list(CategoryType category, List> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -265,6 +267,24 @@ private Mono> listBySubscriptionNextSinglePa .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 DeletedWorkbookErrorDefinitionException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all recently deleted Workbooks in a specified subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(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. * @@ -273,22 +293,14 @@ private Mono> listBySubscriptionNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DeletedWorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all recently deleted Workbooks in a specified subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(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/DeletedWorkbooksImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbooksImpl.java index 03f377018a6f..959a19ec4aaa 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbooksImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbooksImpl.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/ExportConfigurationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsClientImpl.java index 402a5865973b..c0af1839cf1f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsClientImpl.java @@ -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; @@ -60,35 +60,66 @@ public final class ExportConfigurationsClientImpl implements ExportConfiguration * The interface defining all the services for ApplicationInsightsManagementClientExportConfigurations to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientExportConfigurations") public interface ExportConfigurationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration") @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, @HeaderParam("Accept") String accept, Context context); + @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}/exportconfiguration") + @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}/exportconfiguration") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create( - @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ApplicationInsightsComponentExportRequest exportProperties, - @HeaderParam("Accept") String accept, Context context); + @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") ApplicationInsightsComponentExportRequest exportProperties, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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") ApplicationInsightsComponentExportRequest exportProperties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}") + @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, + @PathParam("exportId") String exportId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}") @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("exportId") String exportId, @HeaderParam("Accept") String accept, Context context); @@ -96,21 +127,41 @@ Mono> delete(@Hos @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.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("exportId") String exportId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.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("exportId") String exportId, @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> update( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @PathParam("exportId") String exportId, - @BodyParam("application/json") ApplicationInsightsComponentExportRequest exportProperties, - @HeaderParam("Accept") String accept, Context context); + @PathParam("exportId") String exportId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationInsightsComponentExportRequest exportProperties, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("exportId") String exportId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationInsightsComponentExportRequest exportProperties, Context context); } /** @@ -127,66 +178,14 @@ Mono> update(@Hos @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> listWithResponseAsync(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)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Gets a list of Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configuration of an Application Insights component along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> - listWithResponseAsync(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); - } - /** * Gets a list of Continuous Export configuration of an Application Insights component. * @@ -219,7 +218,10 @@ private Mono> listAsy @ServiceMethod(returns = ReturnType.SINGLE) public Response> listWithResponse(String resourceGroupName, String resourceName, Context context) { - return listWithResponseAsync(resourceGroupName, resourceName, 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, accept, context); } /** @@ -243,43 +245,22 @@ public List list(String re * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param 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 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} 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, ApplicationInsightsComponentExportRequest exportProperties) { - 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 (exportProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter exportProperties is required and cannot be null.")); - } else { - exportProperties.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, exportProperties, accept, context)) + .withContext( + context -> service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, contentType, accept, exportProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -288,58 +269,11 @@ private Mono * * @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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configurations along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties, - 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 (exportProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter exportProperties is required and cannot be null.")); - } else { - exportProperties.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, exportProperties, accept, context); - } - - /** - * Create a Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param 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 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 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, @@ -353,19 +287,22 @@ private Mono> createA * * @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 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) public Response> createWithResponse( String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties, Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, exportProperties, 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, exportProperties, context); } /** @@ -373,12 +310,11 @@ public Response> crea * * @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 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) public List create(String resourceGroupName, @@ -401,73 +337,14 @@ public List create(String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, String exportId) { - 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 (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId is required and cannot be null.")); - } final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, resourceGroupName, this.client.getSubscriptionId(), resourceName, exportId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Delete a Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a Continuous Export configuration along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - deleteWithResponseAsync(String resourceGroupName, String resourceName, String exportId, 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 (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, exportId, accept, context); - } - /** * Delete a Continuous Export configuration of an Application Insights component. * @@ -501,7 +378,10 @@ private Mono deleteAsync(S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String resourceName, String exportId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, exportId, context).block(); + final String apiVersion = "2015-05-01"; + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, exportId, accept, context); } /** @@ -536,73 +416,14 @@ public ApplicationInsightsComponentExportConfigurationInner delete(String resour @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, String exportId) { - 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 (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId 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, exportId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get the Continuous Export configuration for this export id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Continuous Export configuration for this export id along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getWithResponseAsync(String resourceGroupName, String resourceName, String exportId, 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 (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId 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, exportId, accept, context); - } - /** * Get the Continuous Export configuration for this export id. * @@ -636,7 +457,10 @@ private Mono getAsync(Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String resourceName, String exportId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, exportId, 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, exportId, accept, context); } /** @@ -673,87 +497,14 @@ public ApplicationInsightsComponentExportConfigurationInner get(String resourceG private Mono> updateWithResponseAsync( String resourceGroupName, String resourceName, String exportId, ApplicationInsightsComponentExportRequest exportProperties) { - 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 (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId is required and cannot be null.")); - } - if (exportProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter exportProperties is required and cannot be null.")); - } else { - exportProperties.validate(); - } final String apiVersion = "2015-05-01"; + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, exportId, exportProperties, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, exportId, contentType, accept, exportProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Update the Continuous Export configuration for this export id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a Continuous Export configuration along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String resourceName, String exportId, - ApplicationInsightsComponentExportRequest exportProperties, 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 (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId is required and cannot be null.")); - } - if (exportProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter exportProperties is required and cannot be null.")); - } else { - exportProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, exportId, exportProperties, accept, context); - } - /** * Update the Continuous Export configuration for this export id. * @@ -790,7 +541,11 @@ private Mono updateAsync(S public Response updateWithResponse(String resourceGroupName, String resourceName, String exportId, ApplicationInsightsComponentExportRequest exportProperties, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, exportId, exportProperties, context).block(); + final String apiVersion = "2015-05-01"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, exportId, contentType, accept, exportProperties, context); } /** diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java index 0f240b7016c9..5323cf34ab02 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java @@ -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; @@ -34,15 +34,11 @@ public Response> listWithR String resourceName, Context context) { Response> inner = this.serviceClient().listWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - inner.getValue() - .stream() - .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + inner.getValue() + .stream() + .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) + .collect(Collectors.toList())); } public List list(String resourceGroupName, String resourceName) { @@ -61,15 +57,11 @@ public Response> createWit String resourceName, ApplicationInsightsComponentExportRequest exportProperties, Context context) { Response> inner = this.serviceClient().createWithResponse(resourceGroupName, resourceName, exportProperties, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - inner.getValue() - .stream() - .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + inner.getValue() + .stream() + .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) + .collect(Collectors.toList())); } public List create(String resourceGroupName, String resourceName, @@ -89,12 +81,8 @@ public Response deleteWithRespo String resourceName, String exportId, Context context) { Response inner = this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, exportId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentExportConfiguration delete(String resourceGroupName, String resourceName, @@ -112,12 +100,8 @@ public Response getWithResponse String resourceName, String exportId, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, resourceName, exportId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentExportConfiguration get(String resourceGroupName, String resourceName, @@ -136,12 +120,8 @@ public Response updateWithRespo Context context) { Response inner = this.serviceClient() .updateWithResponse(resourceGroupName, resourceName, exportId, exportProperties, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentExportConfiguration update(String resourceGroupName, String resourceName, diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java index 8ca64c5230af..27f7098f05fa 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java @@ -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; @@ -63,16 +63,28 @@ public final class FavoritesClientImpl implements FavoritesClient { * The interface defining all the services for ApplicationInsightsManagementClientFavorites to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientFavorites") public interface FavoritesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites") @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, + @QueryParam("favoriteType") FavoriteType favoriteType, + @QueryParam("sourceType") FavoriteSourceType sourceType, + @QueryParam("canFetchContent") Boolean canFetchContent, @QueryParam("tags") String tags, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites") + @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, @QueryParam("favoriteType") FavoriteType favoriteType, @QueryParam("sourceType") FavoriteSourceType sourceType, @QueryParam("canFetchContent") Boolean canFetchContent, @QueryParam("tags") String tags, @@ -82,39 +94,79 @@ Mono>> list(@HostParam( @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.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("favoriteId") String favoriteId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.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("favoriteId") String favoriteId, @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> add(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> add(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @PathParam("favoriteId") String favoriteId, + @PathParam("favoriteId") String favoriteId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ApplicationInsightsComponentFavoriteInner favoriteProperties, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response addSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("favoriteId") String favoriteId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationInsightsComponentFavoriteInner favoriteProperties, + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @PathParam("favoriteId") String favoriteId, + @PathParam("favoriteId") String favoriteId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ApplicationInsightsComponentFavoriteInner favoriteProperties, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("favoriteId") String favoriteId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationInsightsComponentFavoriteInner favoriteProperties, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("favoriteId") String favoriteId, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, @PathParam("favoriteId") String favoriteId, Context context); } @@ -140,21 +192,6 @@ Mono> delete(@HostParam("$host") String endpoint, private Mono>> listWithResponseAsync( String resourceGroupName, String resourceName, FavoriteType favoriteType, FavoriteSourceType sourceType, Boolean canFetchContent, List tags) { - 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"; String tagsConverted = (tags == null) @@ -163,61 +200,12 @@ private Mono>> listWith .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, favoriteType, sourceType, canFetchContent, tagsConverted, - accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tagsConverted, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteType The type of favorite. Value can be either shared or user. - * @param sourceType Source type of favorite to return. When left out, the source type defaults to 'other' (not - * present in this enum). - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable favorite. If - * false, only return summary content for favorites. - * @param tags Tags that must be present on each favorite returned. - * @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 favorites 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, FavoriteType favoriteType, FavoriteSourceType sourceType, - Boolean canFetchContent, List tags, 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"; - String tagsConverted = (tags == null) - ? null - : tags.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, favoriteType, sourceType, canFetchContent, tagsConverted, accept, context); - } - /** * Gets a list of favorites defined within an Application Insights component. * @@ -261,8 +249,15 @@ private Mono> listAsync(String r public Response> listWithResponse(String resourceGroupName, String resourceName, FavoriteType favoriteType, FavoriteSourceType sourceType, Boolean canFetchContent, List tags, Context context) { - return listWithResponseAsync(resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags, - context).block(); + final String apiVersion = "2015-05-01"; + final String accept = "application/json"; + String tagsConverted = (tags == null) + ? null + : tags.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tagsConverted, accept, context); } /** @@ -300,73 +295,14 @@ public List list(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, String favoriteId) { - 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 (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId 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, favoriteId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String resourceName, String favoriteId, 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 (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId 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, favoriteId, accept, context); - } - /** * Get a single favorite by its FavoriteId, defined within an Application Insights component. * @@ -402,7 +338,10 @@ private Mono getAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String resourceName, String favoriteId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, favoriteId, 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, favoriteId, accept, context); } /** @@ -439,88 +378,16 @@ public ApplicationInsightsComponentFavoriteInner get(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono> addWithResponseAsync(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { - 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 (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - if (favoriteProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter favoriteProperties is required and cannot be null.")); - } else { - favoriteProperties.validate(); - } final String apiVersion = "2015-05-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.add(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, favoriteId, favoriteProperties, accept, context)) + .withContext(context -> service.add(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, favoriteId, contentType, accept, favoriteProperties, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Adds a new favorites to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a favorite that is associated to an Application Insights component along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> addWithResponseAsync(String resourceGroupName, - String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, - 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 (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - if (favoriteProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter favoriteProperties is required and cannot be null.")); - } else { - favoriteProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.add(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, favoriteId, favoriteProperties, accept, context); - } - /** * Adds a new favorites to an Application Insights component. * @@ -561,7 +428,12 @@ private Mono addAsync(String resource public Response addWithResponse(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, Context context) { - return addWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties, context).block(); + final String apiVersion = "2015-05-01"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.addSync(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, favoriteId, contentType, accept, favoriteProperties, + context); } /** @@ -600,87 +472,16 @@ public ApplicationInsightsComponentFavoriteInner add(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { - 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 (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - if (favoriteProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter favoriteProperties is required and cannot be null.")); - } else { - favoriteProperties.validate(); - } final String apiVersion = "2015-05-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, favoriteId, favoriteProperties, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, favoriteId, contentType, accept, favoriteProperties, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Updates a favorite that has already been added to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a favorite that is associated to an Application Insights component along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, - 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 (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - if (favoriteProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter favoriteProperties is required and cannot be null.")); - } else { - favoriteProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, favoriteId, favoriteProperties, accept, context); - } - /** * Updates a favorite that has already been added to an Application Insights component. * @@ -719,8 +520,12 @@ private Mono updateAsync(String resou public Response updateWithResponse(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties, context) - .block(); + final String apiVersion = "2015-05-01"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, favoriteId, contentType, accept, favoriteProperties, + context); } /** @@ -756,70 +561,13 @@ public ApplicationInsightsComponentFavoriteInner update(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, String favoriteId) { - 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 (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId 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, favoriteId, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Remove a favorite that is associated to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @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 favoriteId, 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 (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId 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, favoriteId, context); - } - /** * Remove a favorite that is associated to an Application Insights component. * @@ -851,7 +599,9 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String resourceName, String favoriteId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, favoriteId, context).block(); + final String apiVersion = "2015-05-01"; + return service.deleteSync(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, favoriteId, context); } /** diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java index 6462be6fa87c..37de6f6a1b45 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java @@ -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> listWithResponse(Str Response> inner = this.serviceClient() .listWithResponse(resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - inner.getValue() - .stream() - .map(inner1 -> new ApplicationInsightsComponentFavoriteImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + inner.getValue() + .stream() + .map(inner1 -> new ApplicationInsightsComponentFavoriteImpl(inner1, this.manager())) + .collect(Collectors.toList())); } public List list(String resourceGroupName, String resourceName) { @@ -64,12 +60,8 @@ public Response getWithResponse(String res String favoriteId, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, resourceName, favoriteId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentFavorite get(String resourceGroupName, String resourceName, String favoriteId) { @@ -86,12 +78,8 @@ public Response addWithResponse(String res String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, Context context) { Response inner = this.serviceClient() .addWithResponse(resourceGroupName, resourceName, favoriteId, favoriteProperties, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentFavorite add(String resourceGroupName, String resourceName, String favoriteId, @@ -110,12 +98,8 @@ public Response updateWithResponse(String Context context) { Response inner = this.serviceClient() .updateWithResponse(resourceGroupName, resourceName, favoriteId, favoriteProperties, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentFavorite update(String resourceGroupName, String resourceName, String favoriteId, diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokenResponseImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokenResponseImpl.java index b59351a1b1f6..f6d442b7e4b8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokenResponseImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokenResponseImpl.java @@ -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/LiveTokensClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensClientImpl.java index 8c603bb6401a..22cca065ac93 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensClientImpl.java @@ -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; @@ -54,22 +54,32 @@ public final class LiveTokensClientImpl implements LiveTokensClient { * The interface defining all the services for ApplicationInsightsManagementClientLiveTokens to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientLiveTokens") public interface LiveTokensService { @Headers({ "Content-Type: application/json" }) @Post("/{resourceUri}/providers/Microsoft.Insights/generatelivetoken") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/{resourceUri}/providers/Microsoft.Insights/generatelivetoken") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, + Context context); } /** * **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 ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -77,49 +87,17 @@ Mono> get(@HostParam("$host") String endpoint, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceUri) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } final String apiVersion = "2021-10-14"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceUri, apiVersion, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, resourceUri, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * **Gets an access token for live metrics stream data.**. * - * @param resourceUri The identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to a live token query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceUri, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String apiVersion = "2021-10-14"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceUri, apiVersion, accept, context); - } - - /** - * **Gets an access token for live metrics stream data.**. - * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -133,7 +111,7 @@ private Mono getAsync(String resourceUri) { /** * **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 ManagementException thrown if the request is rejected by server. @@ -142,13 +120,15 @@ private Mono getAsync(String resourceUri) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceUri, Context context) { - return getWithResponseAsync(resourceUri, context).block(); + final String apiVersion = "2021-10-14"; + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), apiVersion, resourceUri, accept, context); } /** * **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 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/implementation/LiveTokensImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensImpl.java index 91588c440e9e..ddb91d771b69 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensImpl.java @@ -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; @@ -28,12 +28,8 @@ public LiveTokensImpl(LiveTokensClient innerClient, public Response getWithResponse(String resourceUri, Context context) { Response inner = this.serviceClient().getWithResponse(resourceUri, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LiveTokenResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LiveTokenResponseImpl(inner.getValue(), this.manager())); } public LiveTokenResponse get(String resourceUri) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationImpl.java index b882928ccdea..ad20053714fe 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationImpl.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/OperationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java index 1672a70d686c..8035f4c55f54 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java @@ -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; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.applicationinsights.fluent.OperationsClient; import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner; -import com.azure.resourcemanager.applicationinsights.models.OperationListResult; +import com.azure.resourcemanager.applicationinsights.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,21 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for ApplicationInsightsManagementClientOperations to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Insights/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Insights/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,23 +81,27 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @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); } /** - * Lists all of the available insights REST API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @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 along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String apiVersion = "2021-03-08"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) @@ -100,82 +111,84 @@ private Mono> listSinglePageAsync() { } /** - * 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 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 along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @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 PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String apiVersion = "2021-03-08"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Lists all of the available insights REST API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations as paginated response with {@link PagedFlux}. + * @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 along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String apiVersion = "2021-03-08"; + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), apiVersion, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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 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 {@link PagedFlux}. + * @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 along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String apiVersion = "2021-03-08"; + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), apiVersion, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Lists all of the available insights REST API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the 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) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * 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 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) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -185,18 +198,12 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @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 along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } 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(), @@ -204,6 +211,25 @@ private Mono> listNextSinglePageAsync(String nextL .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 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. + * It contains a list of operations and a URL link to get the next set of results 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. * @@ -212,22 +238,14 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @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 along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + 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/OperationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsImpl.java index 14d49b659b79..1380ca4d4cc2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsImpl.java @@ -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/ProactiveDetectionConfigurationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsClientImpl.java index 548dac24eb8d..262b10532e5f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsClientImpl.java @@ -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; @@ -57,38 +57,74 @@ public final class ProactiveDetectionConfigurationsClientImpl implements Proacti * The interface defining all the services for ApplicationInsightsManagementClientProactiveDetectionConfigurations * to be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientProactiveDetectionConfigurations") public interface ProactiveDetectionConfigurationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs") @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, @HeaderParam("Accept") String accept, Context context); + @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}/ProactiveDetectionConfigs") + @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); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( - @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, @PathParam("ConfigurationId") String configurationId, - @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("ConfigurationId") String configurationId, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.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("ConfigurationId") String configurationId, @HeaderParam("Accept") String accept, + Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( - @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, @PathParam("ConfigurationId") String configurationId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("ConfigurationId") String configurationId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("ConfigurationId") String configurationId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, + Context context); } /** @@ -105,66 +141,14 @@ Mono> @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> listWithResponseAsync(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)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Gets a list of ProactiveDetection configurations of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> - listWithResponseAsync(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); - } - /** * Gets a list of ProactiveDetection configurations of an Application Insights component. * @@ -197,7 +181,10 @@ Mono> @ServiceMethod(returns = ReturnType.SINGLE) public Response> listWithResponse(String resourceGroupName, String resourceName, Context context) { - return listWithResponseAsync(resourceGroupName, resourceName, 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, accept, context); } /** @@ -232,76 +219,14 @@ public List li @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, String configurationId) { - 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 (configurationId == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationId 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, configurationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get the ProactiveDetection configuration for this configuration 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 configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ProactiveDetection configuration for this configuration id along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getWithResponseAsync(String resourceGroupName, String resourceName, String configurationId, 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 (configurationId == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationId 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, configurationId, accept, context); - } - /** * Get the ProactiveDetection configuration for this configuration id. * @@ -337,7 +262,10 @@ private Mono g @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String resourceName, String configurationId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, configurationId, 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, configurationId, accept, context); } /** @@ -377,93 +305,16 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationInner get(Stri private Mono> updateWithResponseAsync( String resourceGroupName, String resourceName, String configurationId, ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { - 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 (configurationId == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationId is required and cannot be null.")); - } - if (proactiveDetectionProperties == null) { - return Mono.error( - new IllegalArgumentException("Parameter proactiveDetectionProperties is required and cannot be null.")); - } else { - proactiveDetectionProperties.validate(); - } final String apiVersion = "2015-05-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, configurationId, proactiveDetectionProperties, accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, configurationId, contentType, accept, + proactiveDetectionProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Update the ProactiveDetection configuration for this configuration 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 configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a ProactiveDetection configuration along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String resourceName, String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - 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 (configurationId == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationId is required and cannot be null.")); - } - if (proactiveDetectionProperties == null) { - return Mono.error( - new IllegalArgumentException("Parameter proactiveDetectionProperties is required and cannot be null.")); - } else { - proactiveDetectionProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), - resourceName, configurationId, proactiveDetectionProperties, accept, context); - } - /** * Update the ProactiveDetection configuration for this configuration id. * @@ -506,8 +357,12 @@ public Response> inner = this.serviceClient().listWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - inner.getValue() - .stream() - .map(inner1 -> new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner1, - this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), inner.getValue() + .stream() + .map(inner1 -> new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner1, this.manager())) + .collect(Collectors.toList())); } public List list(String resourceGroupName, @@ -63,12 +57,8 @@ public List list(St getWithResponse(String resourceGroupName, String resourceName, String configurationId, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, resourceName, configurationId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentProactiveDetectionConfiguration get(String resourceGroupName, @@ -89,12 +79,8 @@ public Response upd Response inner = this.serviceClient() .updateWithResponse(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner.getValue(), this.manager())); } public ApplicationInsightsComponentProactiveDetectionConfiguration update(String resourceGroupName, diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ResourceManagerUtils.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ResourceManagerUtils.java index 10a18bc74759..0ec1e1b5aa2f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ResourceManagerUtils.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ResourceManagerUtils.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/WebTestImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestImpl.java index f38e721fe5f5..11facc58137f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestImpl.java @@ -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; @@ -293,6 +293,6 @@ public WebTestImpl withValidationRules(WebTestPropertiesValidationRules validati } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java index 2b01f3bed0cf..33e423c1d637 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java @@ -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; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.applicationinsights.fluent.WebTestLocationsClient; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsWebTestLocationsListResult; +import com.azure.resourcemanager.applicationinsights.implementation.models.ApplicationInsightsWebTestLocationsListResult; import reactor.core.publisher.Mono; /** @@ -59,16 +59,41 @@ public final class WebTestLocationsClientImpl implements WebTestLocationsClient * The interface defining all the services for ApplicationInsightsManagementClientWebTestLocations to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientWebTestLocations") public interface WebTestLocationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/syntheticmonitorlocations") @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}/syntheticmonitorlocations") + @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); + + @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); } @@ -86,28 +111,14 @@ Mono> list(@HostParam("$ @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())); } @@ -116,39 +127,17 @@ Mono> list(@HostParam("$ * * @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 web test locations available to this Application Insights component along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of web test locations available to this 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)); } /** @@ -159,13 +148,18 @@ Mono> list(@HostParam("$ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 web test locations available to this Application Insights component as paginated response with - * {@link PagedFlux}. + * @return a list of web test locations available to this 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); } /** @@ -177,13 +171,18 @@ private PagedFlux listAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 web test locations available to this Application Insights component as paginated response with - * {@link PagedFlux}. + * @return a list of web test locations available to this 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, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, 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); } /** @@ -200,7 +199,8 @@ private PagedFlux listAsync(St @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)); } /** @@ -218,6 +218,68 @@ public PagedIterable list(Stri @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)); + } + + /** + * 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 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 web test locations available to this Application Insights component 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 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 web test locations available to this Application Insights component 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 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 web test locations available to this Application Insights component 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/WebTestLocationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsImpl.java index b7b9e6e0e352..b29d8500507f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsImpl.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/WebTestsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java index c5b1d5a73948..caaf39308c7e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java @@ -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; @@ -31,8 +31,8 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient; import com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner; +import com.azure.resourcemanager.applicationinsights.implementation.models.WebTestListResult; import com.azure.resourcemanager.applicationinsights.models.TagsResource; -import com.azure.resourcemanager.applicationinsights.models.WebTestListResult; import reactor.core.publisher.Mono; /** @@ -63,60 +63,112 @@ public final class WebTestsClientImpl implements WebTestsClient { * The interface defining all the services for ApplicationInsightsManagementClientWebTests to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientWebTests") public interface WebTestsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webTestName") String webTestName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("webTestName") String webTestName, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webTestName") String webTestName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("webTestName") String webTestName, - @BodyParam("application/json") WebTestInner webTestDefinition, @HeaderParam("Accept") String accept, - Context context); + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webTestName") String webTestName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WebTestInner webTestDefinition, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webTestName") String webTestName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WebTestInner webTestDefinition, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webTestName") String webTestName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TagsResource webTestTags, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateTags(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("webTestName") String webTestName, - @BodyParam("application/json") TagsResource webTestTags, @HeaderParam("Accept") String accept, + Response updateTagsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webTestName") String webTestName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TagsResource webTestTags, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webTestName") String webTestName, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webTestName") String webTestName, - @QueryParam("api-version") String apiVersion, Context context); + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/webtests") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/webtests") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -124,9 +176,18 @@ Mono> list(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{componentName}/webtests") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByComponent(@HostParam("$host") String endpoint, + Mono> listByComponent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("componentName") String componentName, @PathParam("resourceGroupName") String resourceGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{componentName}/webtests") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByComponentSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("componentName") String componentName, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -134,7 +195,15 @@ Mono> listByComponent(@HostParam("$host") String end @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @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 listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -142,149 +211,30 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @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); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByComponentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - /** - * Get all Application Insights web tests defined for the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified resource group along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (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.")); - } - final String apiVersion = "2022-06-15"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - apiVersion, this.client.getSubscriptionId(), 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 all Application Insights web tests defined for the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified resource group along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (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.")); - } - final String apiVersion = "2022-06-15"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get all Application Insights web tests defined for the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified resource group as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get all Application Insights web tests defined for the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified resource group as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all Application Insights web tests defined for the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(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 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) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByComponentNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -301,66 +251,14 @@ public PagedIterable listByResourceGroup(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String webTestName) { - 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 (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } final String apiVersion = "2022-06-15"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), webTestName, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, webTestName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get a specific Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights WebTest resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String webTestName, 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 (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - final String apiVersion = "2022-06-15"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), webTestName, accept, context); - } - /** * Get a specific Application Insights web test definition. * @@ -391,7 +289,10 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String webTestName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, webTestName, context).block(); + final String apiVersion = "2022-06-15"; + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, webTestName, accept, context); } /** @@ -425,80 +326,16 @@ public WebTestInner getByResourceGroup(String resourceGroupName, String webTestN @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String webTestName, WebTestInner webTestDefinition) { - 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 (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - if (webTestDefinition == null) { - return Mono - .error(new IllegalArgumentException("Parameter webTestDefinition is required and cannot be null.")); - } else { - webTestDefinition.validate(); - } final String apiVersion = "2022-06-15"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), webTestName, webTestDefinition, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, webTestName, contentType, accept, webTestDefinition, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights WebTest resource. - * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web - * test definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights WebTest definition along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String webTestName, - WebTestInner webTestDefinition, 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 (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - if (webTestDefinition == null) { - return Mono - .error(new IllegalArgumentException("Parameter webTestDefinition is required and cannot be null.")); - } else { - webTestDefinition.validate(); - } - final String apiVersion = "2022-06-15"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), webTestName, webTestDefinition, accept, context); - } - /** * Creates or updates an Application Insights web test definition. * @@ -534,7 +371,11 @@ private Mono createOrUpdateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse(String resourceGroupName, String webTestName, WebTestInner webTestDefinition, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, webTestName, webTestDefinition, context).block(); + final String apiVersion = "2022-06-15"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, webTestName, contentType, accept, webTestDefinition, context); } /** @@ -569,77 +410,16 @@ public WebTestInner createOrUpdate(String resourceGroupName, String webTestName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateTagsWithResponseAsync(String resourceGroupName, String webTestName, TagsResource webTestTags) { - 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 (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - if (webTestTags == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestTags is required and cannot be null.")); - } else { - webTestTags.validate(); - } final String apiVersion = "2022-06-15"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), webTestName, webTestTags, accept, context)) + .withContext( + context -> service.updateTags(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, webTestName, contentType, accept, webTestTags, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Updates the tags associated with an Application Insights web test. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights WebTest resource. - * @param webTestTags Updated tag information to associate with the web test resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights WebTest definition along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync(String resourceGroupName, String webTestName, - TagsResource webTestTags, 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 (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - if (webTestTags == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestTags is required and cannot be null.")); - } else { - webTestTags.validate(); - } - final String apiVersion = "2022-06-15"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), webTestName, webTestTags, accept, context); - } - /** * Updates the tags associated with an Application Insights web test. * @@ -672,7 +452,11 @@ private Mono updateTagsAsync(String resourceGroupName, String webT @ServiceMethod(returns = ReturnType.SINGLE) public Response updateTagsWithResponse(String resourceGroupName, String webTestName, TagsResource webTestTags, Context context) { - return updateTagsWithResponseAsync(resourceGroupName, webTestName, webTestTags, context).block(); + final String apiVersion = "2022-06-15"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateTagsSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, webTestName, contentType, accept, webTestTags, context); } /** @@ -703,63 +487,13 @@ public WebTestInner updateTags(String resourceGroupName, String webTestName, Tag */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String webTestName) { - 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 (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } final String apiVersion = "2022-06-15"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, webTestName, apiVersion, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, webTestName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Deletes an Application Insights web test. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights WebTest resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 webTestName, - 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 (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - final String apiVersion = "2022-06-15"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - webTestName, apiVersion, context); - } - /** * Deletes an Application Insights web test. * @@ -788,7 +522,9 @@ private Mono deleteAsync(String resourceGroupName, String webTestName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String webTestName, Context context) { - return deleteWithResponseAsync(resourceGroupName, webTestName, context).block(); + final String apiVersion = "2022-06-15"; + return service.deleteSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, webTestName, context); } /** @@ -806,59 +542,135 @@ public void delete(String resourceGroupName, String webTestName) { } /** - * Get all Application Insights web test definitions for the specified subscription. + * Get all Application Insights web tests defined for the specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test definitions for the specified subscription along with + * @return all Application Insights web tests defined for the specified resource group along with * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - 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.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { final String apiVersion = "2022-06-15"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, 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 all Application Insights web test definitions for the specified subscription. + * Get all Application Insights web tests defined for the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Application Insights web tests defined for the specified resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get all Application Insights web tests defined for the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Application Insights web tests defined for the specified resource group along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String apiVersion = "2022-06-15"; + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all Application Insights web tests defined for the specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Application Insights web tests defined for the specified resource group along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String apiVersion = "2022-06-15"; + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all Application Insights web tests defined for the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Application Insights web tests defined for the specified resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Get all Application Insights web tests defined for the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Application Insights web tests defined for the specified resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Get all Application Insights web test definitions for the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Application Insights web test definitions for the specified subscription along with * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listSinglePageAsync() { final String apiVersion = "2022-06-15"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + 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())); } /** @@ -874,6 +686,24 @@ private PagedFlux listAsync() { return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } + /** + * Get all Application Insights web test definitions for the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Application Insights web test definitions for the specified subscription along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String apiVersion = "2022-06-15"; + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get all Application Insights web test definitions for the specified subscription. * @@ -881,13 +711,17 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test definitions for the specified subscription as paginated response with - * {@link PagedFlux}. + * @return all Application Insights web test definitions for the specified subscription along with + * {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String apiVersion = "2022-06-15"; + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -900,7 +734,7 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** @@ -915,7 +749,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -932,26 +766,11 @@ public PagedIterable list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByComponentSinglePageAsync(String componentName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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.")); - } final String apiVersion = "2022-06-15"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByComponent(this.client.getEndpoint(), componentName, resourceGroupName, - apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.listByComponent(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), componentName, resourceGroupName, 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())); @@ -962,39 +781,16 @@ private Mono> listByComponentSinglePageAsync(String * * @param componentName The name of the Application Insights component resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified component along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return all Application Insights web tests defined for the specified component as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByComponentSinglePageAsync(String componentName, - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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.")); - } - final String apiVersion = "2022-06-15"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByComponent(this.client.getEndpoint(), componentName, resourceGroupName, apiVersion, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByComponentAsync(String componentName, String resourceGroupName) { + return new PagedFlux<>(() -> listByComponentSinglePageAsync(componentName, resourceGroupName), + nextLink -> listByComponentNextSinglePageAsync(nextLink)); } /** @@ -1005,13 +801,16 @@ private Mono> listByComponentSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 component as paginated response with - * {@link PagedFlux}. + * @return all Application Insights web tests defined for the specified component along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByComponentAsync(String componentName, String resourceGroupName) { - return new PagedFlux<>(() -> listByComponentSinglePageAsync(componentName, resourceGroupName), - nextLink -> listByComponentNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByComponentSinglePage(String componentName, String resourceGroupName) { + final String apiVersion = "2022-06-15"; + final String accept = "application/json"; + Response res = service.listByComponentSync(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), componentName, resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1023,14 +822,17 @@ private PagedFlux listByComponentAsync(String componentName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 component as paginated response with - * {@link PagedFlux}. + * @return all Application Insights web tests defined for the specified component along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByComponentAsync(String componentName, String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByComponentSinglePage(String componentName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByComponentSinglePageAsync(componentName, resourceGroupName, context), - nextLink -> listByComponentNextSinglePageAsync(nextLink, context)); + final String apiVersion = "2022-06-15"; + final String accept = "application/json"; + Response res = service.listByComponentSync(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), componentName, resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1046,7 +848,8 @@ private PagedFlux listByComponentAsync(String componentName, Strin */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByComponent(String componentName, String resourceGroupName) { - return new PagedIterable<>(listByComponentAsync(componentName, resourceGroupName)); + return new PagedIterable<>(() -> listByComponentSinglePage(componentName, resourceGroupName), + nextLink -> listByComponentNextSinglePage(nextLink)); } /** @@ -1064,7 +867,8 @@ public PagedIterable listByComponent(String componentName, String @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByComponent(String componentName, String resourceGroupName, Context context) { - return new PagedIterable<>(listByComponentAsync(componentName, resourceGroupName, context)); + return new PagedIterable<>(() -> listByComponentSinglePage(componentName, resourceGroupName, context), + nextLink -> listByComponentNextSinglePage(nextLink, context)); } /** @@ -1074,18 +878,11 @@ public PagedIterable listByComponent(String componentName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return all Application Insights web tests defined for the specified resource group along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1095,6 +892,25 @@ private Mono> listByResourceGroupNextSinglePageAsync .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 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 along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(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. * @@ -1103,23 +919,16 @@ private Mono> listByResourceGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return all Application Insights web tests defined for the specified resource group along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1129,18 +938,11 @@ private Mono> listByResourceGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return all Application Insights web test definitions for the specified subscription along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } 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(), @@ -1148,6 +950,25 @@ private Mono> listNextSinglePageAsync(String nextLin .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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Application Insights web test definitions for the specified subscription 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. * @@ -1156,23 +977,15 @@ private Mono> listNextSinglePageAsync(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return all Application Insights web test definitions for the specified subscription along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + 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); } /** @@ -1182,18 +995,11 @@ private Mono> listNextSinglePageAsync(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return all Application Insights web tests defined for the specified component along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByComponentNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByComponentNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1202,6 +1008,24 @@ private Mono> listByComponentNextSinglePageAsync(Str .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 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 component along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByComponentNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByComponentNextSync(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. * @@ -1210,22 +1034,14 @@ private Mono> listByComponentNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return all Application Insights web tests defined for the specified component along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByComponentNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByComponentNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByComponentNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByComponentNextSync(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/WebTestsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsImpl.java index 14dd7f958c7a..3077562c6516 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsImpl.java @@ -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; @@ -27,26 +27,12 @@ public WebTestsImpl(WebTestsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String webTestName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, webTestName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WebTestImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WebTestImpl(inner.getValue(), this.manager())); } public WebTest getByResourceGroup(String resourceGroupName, String webTestName) { @@ -67,6 +53,16 @@ public void deleteByResourceGroup(String resourceGroupName, String webTestName) this.serviceClient().delete(resourceGroupName, webTestName); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); + } + public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); return ResourceManagerUtils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationImpl.java index 949f982070eb..58095f14acec 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationImpl.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/WorkItemConfigurationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsClientImpl.java index f0d3c4c022cb..e02a1725fc4c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsClientImpl.java @@ -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; @@ -31,8 +31,8 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient; import com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner; +import com.azure.resourcemanager.applicationinsights.implementation.models.WorkItemConfigurationsListResult; import com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationErrorException; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationsListResult; import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; import reactor.core.publisher.Mono; @@ -65,43 +65,80 @@ public final class WorkItemConfigurationsClientImpl implements WorkItemConfigura * The interface defining all the services for ApplicationInsightsManagementClientWorkItemConfigurations to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientWorkItemConfigurations") public interface WorkItemConfigurationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkItemConfigurationErrorException.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}/WorkItemConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(WorkItemConfigurationErrorException.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}/WorkItemConfigs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + 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") WorkItemCreateConfiguration workItemConfigurationProperties, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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") WorkItemCreateConfiguration workItemConfigurationProperties, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/DefaultWorkItemConfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDefault(@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}/DefaultWorkItemConfig") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDefault(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + Response getDefaultSync(@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({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("workItemConfigId") String workItemConfigId, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, @PathParam("workItemConfigId") String workItemConfigId, Context context); @@ -109,21 +146,58 @@ Mono> delete(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getItem(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> getItem(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, @PathParam("workItemConfigId") String workItemConfigId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getItemSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("workItemConfigId") String workItemConfigId, @HeaderParam("Accept") String accept, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateItem(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("workItemConfigId") String workItemConfigId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkItemCreateConfiguration workItemConfigurationProperties, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateItem(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response updateItemSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @PathParam("workItemConfigId") String workItemConfigId, + @PathParam("workItemConfigId") String workItemConfigId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") WorkItemCreateConfiguration workItemConfigurationProperties, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(WorkItemConfigurationErrorException.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(WorkItemConfigurationErrorException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -141,28 +215,13 @@ Mono> updateItem(@HostParam("$host") String @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)) + .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(), null, null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -171,39 +230,16 @@ private Mono> listSinglePageAsync(Stri * * @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 WorkItemConfigurationErrorException 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 work item configurations that exist for the application along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the list work item configurations that exist for the application 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)); } /** @@ -214,12 +250,16 @@ private Mono> listSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkItemConfigurationErrorException 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 work item configurations that exist for the application as paginated response with - * {@link PagedFlux}. + * @return the list work item configurations that exist for the application along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String 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); } /** @@ -231,13 +271,17 @@ private PagedFlux listAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkItemConfigurationErrorException 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 work item configurations that exist for the application as paginated response with - * {@link PagedFlux}. + * @return the list work item configurations that exist for the application along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String resourceName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, 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); } /** @@ -253,7 +297,8 @@ private PagedFlux listAsync(String resourceGroupName */ @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)); } /** @@ -271,7 +316,8 @@ public PagedIterable list(String resourceGroupName, @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)); } /** @@ -279,8 +325,7 @@ public PagedIterable list(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 ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -290,32 +335,13 @@ public PagedIterable list(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync(String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { - 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 (workItemConfigurationProperties == null) { - return Mono.error(new IllegalArgumentException( - "Parameter workItemConfigurationProperties is required and cannot be null.")); - } else { - workItemConfigurationProperties.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, workItemConfigurationProperties, accept, context)) + .withContext( + context -> service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, contentType, accept, workItemConfigurationProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -324,53 +350,7 @@ private Mono> createWithResponseAsync(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 workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return work item configuration associated with an application insights resource along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, - String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties, 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 (workItemConfigurationProperties == null) { - return Mono.error(new IllegalArgumentException( - "Parameter workItemConfigurationProperties is required and cannot be null.")); - } else { - workItemConfigurationProperties.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, workItemConfigurationProperties, accept, context); - } - - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. + * @param workItemConfigurationProperties Work item configuration creation payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -389,8 +369,7 @@ private Mono createAsync(String resourceGroupName, S * * @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 ManagementException thrown if the request is rejected by server. @@ -400,8 +379,11 @@ private Mono createAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse(String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties, Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, workItemConfigurationProperties, 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, workItemConfigurationProperties, context); } /** @@ -409,8 +391,7 @@ public Response createWithResponse(String resourceGr * * @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 ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -437,66 +418,14 @@ public WorkItemConfigurationInner create(String resourceGroupName, String resour @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultWithResponseAsync(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.getDefault(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, accept, context)) + .withContext(context -> service.getDefault(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Gets default work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default work item configurations that exist for the application along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDefaultWithResponseAsync(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.getDefault(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, accept, context); - } - /** * Gets default work item configurations that exist for the application. * @@ -527,7 +456,10 @@ private Mono getDefaultAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultWithResponse(String resourceGroupName, String resourceName, Context context) { - return getDefaultWithResponseAsync(resourceGroupName, resourceName, context).block(); + final String apiVersion = "2015-05-01"; + final String accept = "application/json"; + return service.getDefaultSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); } /** @@ -560,73 +492,13 @@ public WorkItemConfigurationInner getDefault(String resourceGroupName, String re @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, String workItemConfigId) { - 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 (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId 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, workItemConfigId, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Delete a work item configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String workItemConfigId, 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 (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId 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, workItemConfigId, context); - } - /** * Delete a work item configuration of an Application Insights component. * @@ -661,7 +533,9 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String resourceName, String workItemConfigId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, context).block(); + final String apiVersion = "2015-05-01"; + return service.deleteSync(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, workItemConfigId, context); } /** @@ -696,76 +570,14 @@ public void delete(String resourceGroupName, String resourceName, String workIte @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getItemWithResponseAsync(String resourceGroupName, String resourceName, String workItemConfigId) { - 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 (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null.")); - } final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getItem(this.client.getEndpoint(), resourceGroupName, apiVersion, + .withContext(context -> service.getItem(this.client.getEndpoint(), apiVersion, resourceGroupName, this.client.getSubscriptionId(), resourceName, workItemConfigId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Gets specified work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified work item configuration for an Application Insights component along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getItemWithResponseAsync(String resourceGroupName, - String resourceName, String workItemConfigId, 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 (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getItem(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, workItemConfigId, accept, context); - } - /** * Gets specified work item configuration for an Application Insights component. * @@ -802,7 +614,10 @@ private Mono getItemAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public Response getItemWithResponse(String resourceGroupName, String resourceName, String workItemConfigId, Context context) { - return getItemWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, context).block(); + final String apiVersion = "2015-05-01"; + final String accept = "application/json"; + return service.getItemSync(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, workItemConfigId, accept, context); } /** @@ -840,93 +655,16 @@ public WorkItemConfigurationInner getItem(String resourceGroupName, String resou @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateItemWithResponseAsync(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties) { - 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 (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null.")); - } - if (workItemConfigurationProperties == null) { - return Mono.error(new IllegalArgumentException( - "Parameter workItemConfigurationProperties is required and cannot be null.")); - } else { - workItemConfigurationProperties.validate(); - } final String apiVersion = "2015-05-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateItem(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, workItemConfigId, workItemConfigurationProperties, - accept, context)) + .withContext(context -> service.updateItem(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, workItemConfigId, contentType, accept, + workItemConfigurationProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Update a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return work item configuration associated with an application insights resource along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateItemWithResponseAsync(String resourceGroupName, - String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties, - 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 (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null.")); - } - if (workItemConfigurationProperties == null) { - return Mono.error(new IllegalArgumentException( - "Parameter workItemConfigurationProperties is required and cannot be null.")); - } else { - workItemConfigurationProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateItem(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), resourceName, workItemConfigId, workItemConfigurationProperties, accept, - context); - } - /** * Update a work item configuration for an Application Insights component. * @@ -967,8 +705,12 @@ private Mono updateItemAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) public Response updateItemWithResponse(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties, Context context) { - return updateItemWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, - workItemConfigurationProperties, context).block(); + final String apiVersion = "2015-05-01"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateItemSync(this.client.getEndpoint(), apiVersion, resourceGroupName, + this.client.getSubscriptionId(), resourceName, workItemConfigId, contentType, accept, + workItemConfigurationProperties, context); } /** @@ -991,4 +733,60 @@ public WorkItemConfigurationInner updateItem(String resourceGroupName, String re return updateItemWithResponse(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties, 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 WorkItemConfigurationErrorException 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 work item configurations that exist for the application 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 WorkItemConfigurationErrorException 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 work item configurations that exist for the application 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 WorkItemConfigurationErrorException 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 work item configurations that exist for the application 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/WorkItemConfigurationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java index 479fd1fa0dda..934865df3cad 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java @@ -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; @@ -43,12 +43,8 @@ public Response createWithResponse(String resourceGroupNa WorkItemCreateConfiguration workItemConfigurationProperties, Context context) { Response inner = this.serviceClient() .createWithResponse(resourceGroupName, resourceName, workItemConfigurationProperties, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkItemConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkItemConfigurationImpl(inner.getValue(), this.manager())); } public WorkItemConfiguration create(String resourceGroupName, String resourceName, @@ -66,12 +62,8 @@ public Response getDefaultWithResponse(String resourceGro Context context) { Response inner = this.serviceClient().getDefaultWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkItemConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkItemConfigurationImpl(inner.getValue(), this.manager())); } public WorkItemConfiguration getDefault(String resourceGroupName, String resourceName) { @@ -96,12 +88,8 @@ public Response getItemWithResponse(String resourceGroupN String workItemConfigId, Context context) { Response inner = this.serviceClient().getItemWithResponse(resourceGroupName, resourceName, workItemConfigId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkItemConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkItemConfigurationImpl(inner.getValue(), this.manager())); } public WorkItemConfiguration getItem(String resourceGroupName, String resourceName, String workItemConfigId) { @@ -119,12 +107,8 @@ public Response updateItemWithResponse(String resourceGro Response inner = this.serviceClient() .updateItemWithResponse(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkItemConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkItemConfigurationImpl(inner.getValue(), this.manager())); } public WorkItemConfiguration updateItem(String resourceGroupName, String resourceName, String workItemConfigId, diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java index 74cf6c1c62ac..ce27fc724957 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java @@ -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; @@ -343,6 +343,6 @@ public WorkbookImpl withRevision(String revision) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java index b0878fc5475b..8c5b0595886c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java @@ -1,10 +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.implementation; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner; import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; @@ -46,6 +47,10 @@ public Map tags() { } } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Integer priority() { return this.innerModel().priority(); } @@ -246,6 +251,6 @@ public WorkbookTemplateImpl withLocalized(Map> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> getByResourceGroup(@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/workbooktemplates/{resourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") - @ExpectedResponses({ 200, 204 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkbookTemplateInner workbookTemplateProperties, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkbookTemplateInner workbookTemplateProperties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkbookTemplateInner workbookTemplateProperties, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@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, + @BodyParam("application/json") WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, @BodyParam("application/json") WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") + @ExpectedResponses({ 200, 204 }) + @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, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @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 listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, 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 resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbook templates defined within a specified resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a single workbook template by its resourceName along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName) { final String apiVersion = "2020-11-20"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, apiVersion, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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 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 along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a single workbook template by its resourceName on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String apiVersion = "2020-11-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * 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 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 PagedFlux}. + * @return a single workbook template by its resourceName along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + final String apiVersion = "2020-11-20"; + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, 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 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 PagedFlux}. + * @return a single workbook template by its resourceName. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** - * Get all Workbook templates defined within a specified resource group. + * Create a new workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbook templates defined within a specified resource group as paginated response with - * {@link PagedIterable}. + * @return an Application Insights workbook template definition along with {@link Response} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, WorkbookTemplateInner workbookTemplateProperties) { + final String apiVersion = "2020-11-20"; + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, + workbookTemplateProperties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get all Workbook templates defined within a specified resource group. + * Create a new workbook template. * * @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 workbookTemplateProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbook templates defined within a specified resource group as paginated response with - * {@link PagedIterable}. + * @return an Application Insights workbook template definition on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + WorkbookTemplateInner workbookTemplateProperties) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * 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 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} on successful completion of - * {@link Mono}. + * @return an Application Insights workbook template definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } + public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + WorkbookTemplateInner workbookTemplateProperties, Context context) { final String apiVersion = "2020-11-20"; + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, apiVersion, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, contentType, accept, workbookTemplateProperties, 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 context The context to associate with this operation. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook template by its resourceName along with {@link Response} on successful completion of - * {@link Mono}. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2020-11-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceName, apiVersion, accept, context); + public WorkbookTemplateInner createOrUpdate(String resourceGroupName, String resourceName, + WorkbookTemplateInner workbookTemplateProperties) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, workbookTemplateProperties, Context.NONE) + .getValue(); } /** - * Get a single workbook template by its resourceName. + * Updates a workbook template that has already been added. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param workbookTemplateUpdateParameters Properties that need to be specified to patch a workbook template. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. + * @return an Application Insights workbook template definition along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, + WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters) { + final String apiVersion = "2020-11-20"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, workbookTemplateUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a single workbook template by its resourceName. + * Updates a workbook template that has already been added. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook template by its resourceName along with {@link Response}. + * @return an Application Insights workbook template definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + private Mono updateAsync(String resourceGroupName, String resourceName) { + final WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters = null; + return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a single workbook template by its resourceName. + * Updates a workbook template that has already been added. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param workbookTemplateUpdateParameters Properties that need to be specified to patch a workbook template. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + public Response updateWithResponse(String resourceGroupName, String resourceName, + WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, Context context) { + final String apiVersion = "2020-11-20"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, workbookTemplateUpdateParameters, 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 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}. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2020-11-20"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, apiVersion, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public WorkbookTemplateInner update(String resourceGroupName, String resourceName) { + final WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters = null; + return updateWithResponse(resourceGroupName, resourceName, workbookTemplateUpdateParameters, Context.NONE) + .getValue(); } /** @@ -411,35 +418,18 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { final String apiVersion = "2020-11-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceName, apiVersion, accept, context); + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -470,7 +460,9 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + final String apiVersion = "2020-11-20"; + return service.deleteSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, context); } /** @@ -488,280 +480,171 @@ public void delete(String resourceGroupName, String resourceName) { } /** - * Create a new workbook template. + * 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 workbookTemplateProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook template definition along with {@link Response} on successful completion - * of {@link Mono}. + * @return all Workbook templates defined within a specified resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, WorkbookTemplateInner workbookTemplateProperties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookTemplateProperties == null) { - return Mono.error( - new IllegalArgumentException("Parameter workbookTemplateProperties is required and cannot be null.")); - } else { - workbookTemplateProperties.validate(); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { final String apiVersion = "2020-11-20"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, apiVersion, workbookTemplateProperties, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, 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())); } /** - * Create a new workbook template. + * 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 workbookTemplateProperties Properties that need to be specified to create a new workbook. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook template definition along with {@link Response} on successful completion - * of {@link Mono}. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, WorkbookTemplateInner workbookTemplateProperties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookTemplateProperties == null) { - return Mono.error( - new IllegalArgumentException("Parameter workbookTemplateProperties is required and cannot be null.")); - } else { - workbookTemplateProperties.validate(); - } - final String apiVersion = "2020-11-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceName, apiVersion, workbookTemplateProperties, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Create a new workbook template. + * 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 workbookTemplateProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook template definition on successful completion of {@link Mono}. + * @return all Workbook templates defined within a specified resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - WorkbookTemplateInner workbookTemplateProperties) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String apiVersion = "2020-11-20"; + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + apiVersion, this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create a new workbook template. + * 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 workbookTemplateProperties Properties that need to be specified to create a new workbook. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook template definition along with {@link Response}. + * @return all Workbook templates defined within a specified resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, - WorkbookTemplateInner workbookTemplateProperties, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties, context) - .block(); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String apiVersion = "2020-11-20"; + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + apiVersion, this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create a new workbook template. + * 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 workbookTemplateProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook template definition. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookTemplateInner createOrUpdate(String resourceGroupName, String resourceName, - WorkbookTemplateInner workbookTemplateProperties) { - return createOrUpdateWithResponse(resourceGroupName, resourceName, workbookTemplateProperties, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * 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 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} on successful completion - * of {@link Mono}. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, - WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookTemplateUpdateParameters != null) { - workbookTemplateUpdateParameters.validate(); - } - final String apiVersion = "2020-11-20"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, apiVersion, workbookTemplateUpdateParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Updates a workbook template that has already been added. + * Get the next page of items. * - * @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. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook template definition along with {@link Response} on successful completion - * of {@link Mono}. + * @return all Workbook templates defined within a specified resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, - WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookTemplateUpdateParameters != null) { - workbookTemplateUpdateParameters.validate(); - } - final String apiVersion = "2020-11-20"; + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceName, apiVersion, workbookTemplateUpdateParameters, accept, context); + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a workbook template that has already been added. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook template definition on successful completion of {@link Mono}. + * @return all Workbook templates defined within a specified resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String resourceName) { - final WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters = null; - return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Updates a workbook template that has already been added. + * Get the next page of items. * - * @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 nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook template definition along with {@link Response}. + * @return all Workbook templates defined within a specified resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String resourceName, - WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters, context) - .block(); - } - - /** - * Updates a workbook template that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook template definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookTemplateInner update(String resourceGroupName, String resourceName) { - final WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters = null; - return updateWithResponse(resourceGroupName, resourceName, workbookTemplateUpdateParameters, Context.NONE) - .getValue(); + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(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/WorkbookTemplatesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java index b35db9e85647..ef43feab2266 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java @@ -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; @@ -27,27 +27,12 @@ public WorkbookTemplatesImpl(WorkbookTemplatesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookTemplateImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookTemplateImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkbookTemplateImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkbookTemplateImpl(inner.getValue(), this.manager())); } public WorkbookTemplate getByResourceGroup(String resourceGroupName, String resourceName) { @@ -68,6 +53,17 @@ public void deleteByResourceGroup(String resourceGroupName, String resourceName) this.serviceClient().delete(resourceGroupName, resourceName); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookTemplateImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookTemplateImpl(inner1, this.manager())); + } + public WorkbookTemplate getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java index a0437093ad8e..3efae5f06298 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java @@ -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,10 +30,10 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient; import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner; +import com.azure.resourcemanager.applicationinsights.implementation.models.WorkbooksListResult; import com.azure.resourcemanager.applicationinsights.models.CategoryType; import com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException; import com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateParameters; -import com.azure.resourcemanager.applicationinsights.models.WorkbooksListResult; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -68,103 +68,179 @@ public final class WorkbooksClientImpl implements WorkbooksClient { * The interface defining all the services for ApplicationInsightsManagementClientWorkbooks to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") + @Host("{endpoint}") + @ServiceInterface(name = "ApplicationInsightsManagementClientWorkbooks") public interface WorkbooksService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/workbooks") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("category") CategoryType category, - @QueryParam("tags") String tags, @QueryParam("canFetchContent") Boolean canFetchContent, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("canFetchContent") Boolean canFetchContent, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("category") CategoryType category, - @QueryParam("tags") String tags, @QueryParam("sourceId") String sourceId, - @QueryParam("canFetchContent") Boolean canFetchContent, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("canFetchContent") Boolean canFetchContent, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("sourceId") String sourceId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") WorkbookInner workbookProperties, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("sourceId") String sourceId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") WorkbookInner workbookProperties, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, @QueryParam("canFetchContent") Boolean canFetchContent, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("sourceId") String sourceId, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkbookUpdateParameters workbookUpdateParameters, Context context); @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("sourceId") String sourceId, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkbookUpdateParameters workbookUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("sourceId") String sourceId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkbookInner workbookProperties, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/workbooks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("category") CategoryType category, @QueryParam("tags") String tags, + @QueryParam("canFetchContent") Boolean canFetchContent, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/workbooks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("category") CategoryType category, @QueryParam("tags") String tags, + @QueryParam("canFetchContent") Boolean canFetchContent, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}/revisions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) + Mono> revisionsList(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("sourceId") String sourceId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkbookUpdateParameters workbookUpdateParameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}/revisions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> revisionsList(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response revisionsListSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}/revisions/{revisionId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> revisionGet(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> revisionGet(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("revisionId") String revisionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("revisionId") String revisionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}/revisions/{revisionId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) + Response revisionGetSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("revisionId") String revisionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("category") CategoryType category, + @QueryParam("tags") String tags, @QueryParam("sourceId") String sourceId, + @QueryParam("canFetchContent") Boolean canFetchContent, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("category") CategoryType category, + @QueryParam("tags") String tags, @QueryParam("sourceId") String sourceId, + @QueryParam("canFetchContent") Boolean canFetchContent, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @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(WorkbookErrorDefinitionException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -172,396 +248,95 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) Mono> revisionsListNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get all Workbooks defined within a specified subscription and category. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified subscription and category along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(CategoryType category, List tags, - Boolean canFetchContent) { - 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 (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } - final String apiVersion = "2023-06-01"; - final String accept = "application/json"; - String tagsConverted = (tags == null) - ? null - : tags.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), category, - tagsConverted, canFetchContent, apiVersion, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all Workbooks defined within a specified subscription and category. - * - * @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 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 along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(CategoryType category, List tags, - Boolean canFetchContent, 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 (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } - final String apiVersion = "2023-06-01"; - final String accept = "application/json"; - String tagsConverted = (tags == null) - ? null - : tags.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), category, tagsConverted, canFetchContent, - apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get all Workbooks defined within a specified subscription and category. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified subscription and category as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(CategoryType category, List tags, Boolean canFetchContent) { - return new PagedFlux<>(() -> listSinglePageAsync(category, tags, canFetchContent), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * 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 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 PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(CategoryType category) { - final List tags = null; - final Boolean canFetchContent = null; - return new PagedFlux<>(() -> listSinglePageAsync(category, tags, canFetchContent), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - /** - * Get all Workbooks defined within a specified subscription and category. - * - * @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 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 PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(CategoryType category, List tags, Boolean canFetchContent, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(category, tags, canFetchContent, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) + Response revisionsListNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * 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 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) - public PagedIterable list(CategoryType category) { - final List tags = null; - final Boolean canFetchContent = null; - return new PagedIterable<>(listAsync(category, tags, canFetchContent)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Get all Workbooks defined within a specified subscription and category. - * - * @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 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) - public PagedIterable list(CategoryType category, List tags, Boolean canFetchContent, - Context context) { - return new PagedIterable<>(listAsync(category, tags, canFetchContent, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, 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 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a single workbook by its resourceName along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - CategoryType category, List tags, String sourceId, Boolean canFetchContent) { - 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 (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName, Boolean canFetchContent) { final String apiVersion = "2023-06-01"; final String accept = "application/json"; - String tagsConverted = (tags == null) - ? null - : tags.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, category, tagsConverted, sourceId, canFetchContent, apiVersion, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, canFetchContent, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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 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 along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a single workbook by its resourceName on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - CategoryType category, List tags, String sourceId, Boolean canFetchContent, 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 (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } - final String apiVersion = "2023-06-01"; - final String accept = "application/json"; - String tagsConverted = (tags == null) - ? null - : tags.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - category, tagsConverted, sourceId, canFetchContent, apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, CategoryType category, - List tags, String sourceId, Boolean canFetchContent) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, category, tags, sourceId, canFetchContent), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * 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 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 PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, CategoryType category) { - final List tags = null; - final String sourceId = null; - final Boolean canFetchContent = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, category, tags, sourceId, canFetchContent), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * 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 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 PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, CategoryType category, - List tags, String sourceId, Boolean canFetchContent, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, category, tags, sourceId, - canFetchContent, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, 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 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) - public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category) { - final List tags = null; - final String sourceId = null; + private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { final Boolean canFetchContent = null; - return new PagedIterable<>( - listByResourceGroupAsync(resourceGroupName, category, tags, sourceId, canFetchContent)); + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, canFetchContent) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * 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 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) - public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category, - List tags, String sourceId, Boolean canFetchContent, Context context) { - return new PagedIterable<>( - listByResourceGroupAsync(resourceGroupName, category, tags, sourceId, canFetchContent, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Boolean canFetchContent, Context context) { + final String apiVersion = "2023-06-01"; + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, canFetchContent, accept, context); } /** @@ -569,233 +344,184 @@ public PagedIterable listByResourceGroup(String resourceGroupName * * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName along with {@link Response} on successful completion of - * {@link Mono}. + * @return a single workbook by its resourceName. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName, Boolean canFetchContent) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2023-06-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, apiVersion, canFetchContent, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public WorkbookInner getByResourceGroup(String resourceGroupName, String resourceName) { + final Boolean canFetchContent = null; + return getByResourceGroupWithResponse(resourceGroupName, resourceName, canFetchContent, Context.NONE) + .getValue(); } /** - * 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 context The context to associate with this operation. + * @param workbookProperties Properties that need to be specified to create a new workbook. + * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName along with {@link Response} on successful completion of - * {@link Mono}. + * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName, Boolean canFetchContent, 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.")); - } + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + WorkbookInner workbookProperties, String sourceId) { final String apiVersion = "2023-06-01"; + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceName, apiVersion, canFetchContent, accept, context); + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, sourceId, contentType, accept, + workbookProperties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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 WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName on successful completion of {@link Mono}. + * @return a workbook definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { - final Boolean canFetchContent = null; - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, canFetchContent) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + WorkbookInner workbookProperties) { + final String sourceId = null; + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * 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 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) - public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Boolean canFetchContent, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, canFetchContent, context).block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + WorkbookInner workbookProperties, String sourceId, Context context) { + final String apiVersion = "2023-06-01"; + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, sourceId, contentType, accept, workbookProperties, 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 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) - public WorkbookInner getByResourceGroup(String resourceGroupName, String resourceName) { - final Boolean canFetchContent = null; - return getByResourceGroupWithResponse(resourceGroupName, resourceName, canFetchContent, Context.NONE) + public WorkbookInner createOrUpdate(String resourceGroupName, String resourceName, + WorkbookInner workbookProperties) { + final String sourceId = null; + return createOrUpdateWithResponse(resourceGroupName, resourceName, workbookProperties, sourceId, Context.NONE) .getValue(); } /** - * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } + private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, + String sourceId, WorkbookUpdateParameters workbookUpdateParameters) { final String apiVersion = "2023-06-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, apiVersion, accept, context)) + .withContext( + context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, sourceId, accept, workbookUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return a workbook definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2023-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceName, apiVersion, accept, context); + private Mono updateAsync(String resourceGroupName, String resourceName) { + final String sourceId = null; + final WorkbookUpdateParameters workbookUpdateParameters = null; + return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * 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 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 {@link Mono} that completes when a successful response is received. + * @return a workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); + public Response updateWithResponse(String resourceGroupName, String resourceName, String sourceId, + WorkbookUpdateParameters workbookUpdateParameters, Context context) { + final String apiVersion = "2023-06-01"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, sourceId, accept, workbookUpdateParameters, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return a workbook definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + public WorkbookInner update(String resourceGroupName, String resourceName) { + final String sourceId = null; + final WorkbookUpdateParameters workbookUpdateParameters = null; + return updateWithResponse(resourceGroupName, resourceName, sourceId, workbookUpdateParameters, Context.NONE) + .getValue(); } /** @@ -806,294 +532,226 @@ public Response deleteWithResponse(String resourceGroupName, String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { + final String apiVersion = "2023-06-01"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - WorkbookInner workbookProperties, String sourceId) { - 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 (workbookProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter workbookProperties is required and cannot be null.")); - } else { - workbookProperties.validate(); - } - final String apiVersion = "2023-06-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, sourceId, apiVersion, workbookProperties, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); } /** - * 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 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} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - WorkbookInner workbookProperties, String sourceId, 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 (workbookProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter workbookProperties is required and cannot be null.")); - } else { - workbookProperties.validate(); - } + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { final String apiVersion = "2023-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceName, sourceId, apiVersion, workbookProperties, accept, context); + return service.deleteSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, 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 WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - WorkbookInner workbookProperties) { - final String sourceId = null; - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); } /** - * Create a new workbook. + * 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 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. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition along with {@link Response}. + * @return all Workbooks defined within a specified subscription and category along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, - WorkbookInner workbookProperties, String sourceId, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context) - .block(); + private Mono> listSinglePageAsync(CategoryType category, List tags, + Boolean canFetchContent) { + final String apiVersion = "2023-06-01"; + final String accept = "application/json"; + String tagsConverted = (tags == null) + ? null + : tags.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + category, tagsConverted, canFetchContent, 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())); } /** - * Create a new workbook. + * 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 workbookProperties Properties that need to be specified to create a new workbook. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition. + * @return all Workbooks defined within a specified subscription and category as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookInner createOrUpdate(String resourceGroupName, String resourceName, - WorkbookInner workbookProperties) { - final String sourceId = null; - return createOrUpdateWithResponse(resourceGroupName, resourceName, workbookProperties, sourceId, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(CategoryType category, List tags, Boolean canFetchContent) { + return new PagedFlux<>(() -> listSinglePageAsync(category, tags, canFetchContent), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * 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 category Category of workbook to return. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. + * @return all Workbooks defined within a specified subscription and category as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, - String sourceId, WorkbookUpdateParameters workbookUpdateParameters) { - 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 (workbookUpdateParameters != null) { - workbookUpdateParameters.validate(); - } - final String apiVersion = "2023-06-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, sourceId, apiVersion, workbookUpdateParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(CategoryType category) { + final List tags = null; + final Boolean canFetchContent = null; + return new PagedFlux<>(() -> listSinglePageAsync(category, tags, canFetchContent), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * 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. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. + * @return all Workbooks defined within a specified subscription and category along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, - String sourceId, WorkbookUpdateParameters workbookUpdateParameters, 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 (workbookUpdateParameters != null) { - workbookUpdateParameters.validate(); - } + private PagedResponse listSinglePage(CategoryType category, List tags, + Boolean canFetchContent) { final String apiVersion = "2023-06-01"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceName, sourceId, apiVersion, workbookUpdateParameters, accept, context); + String tagsConverted = (tags == null) + ? null + : tags.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res = service.listSync(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), category, tagsConverted, canFetchContent, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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 WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition on successful completion of {@link Mono}. + * @return all Workbooks defined within a specified subscription and category along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String resourceName) { - final String sourceId = null; - final WorkbookUpdateParameters workbookUpdateParameters = null; - return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listSinglePage(CategoryType category, List tags, + Boolean canFetchContent, Context context) { + final String apiVersion = "2023-06-01"; + final String accept = "application/json"; + String tagsConverted = (tags == null) + ? null + : tags.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res = service.listSync(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), category, tagsConverted, canFetchContent, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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 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) - public Response updateWithResponse(String resourceGroupName, String resourceName, String sourceId, - WorkbookUpdateParameters workbookUpdateParameters, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(CategoryType category) { + final List tags = null; + final Boolean canFetchContent = null; + return new PagedIterable<>(() -> listSinglePage(category, tags, canFetchContent), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * 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 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) - public WorkbookInner update(String resourceGroupName, String resourceName) { - final String sourceId = null; - final WorkbookUpdateParameters workbookUpdateParameters = null; - return updateWithResponse(resourceGroupName, resourceName, sourceId, workbookUpdateParameters, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(CategoryType category, List tags, Boolean canFetchContent, + Context context) { + return new PagedIterable<>(() -> listSinglePage(category, tags, canFetchContent, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1110,26 +768,11 @@ public WorkbookInner update(String resourceGroupName, String resourceName) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> revisionsListSinglePageAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } final String apiVersion = "2023-06-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.revisionsList(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, apiVersion, accept, context)) + .withContext(context -> service.revisionsList(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())); @@ -1140,39 +783,15 @@ private Mono> revisionsListSinglePageAsync(String r * * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the revisions for the workbook defined by its resourceName along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the revisions for the workbook defined by its resourceName as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> revisionsListSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2023-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .revisionsList(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, resourceName, - apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux revisionsListAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> revisionsListSinglePageAsync(resourceGroupName, resourceName), + nextLink -> revisionsListNextSinglePageAsync(nextLink)); } /** @@ -1183,12 +802,16 @@ private Mono> revisionsListSinglePageAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the revisions for the workbook defined by its resourceName as paginated response with {@link PagedFlux}. + * @return the revisions for the workbook defined by its resourceName along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux revisionsListAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> revisionsListSinglePageAsync(resourceGroupName, resourceName), - nextLink -> revisionsListNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse revisionsListSinglePage(String resourceGroupName, String resourceName) { + final String apiVersion = "2023-06-01"; + final String accept = "application/json"; + Response res = service.revisionsListSync(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); } /** @@ -1200,13 +823,17 @@ private PagedFlux revisionsListAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the revisions for the workbook defined by its resourceName as paginated response with {@link PagedFlux}. + * @return the revisions for the workbook defined by its resourceName along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux revisionsListAsync(String resourceGroupName, String resourceName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse revisionsListSinglePage(String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>(() -> revisionsListSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> revisionsListNextSinglePageAsync(nextLink, context)); + final String apiVersion = "2023-06-01"; + final String accept = "application/json"; + Response res = service.revisionsListSync(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); } /** @@ -1222,7 +849,8 @@ private PagedFlux revisionsListAsync(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable revisionsList(String resourceGroupName, String resourceName) { - return new PagedIterable<>(revisionsListAsync(resourceGroupName, resourceName)); + return new PagedIterable<>(() -> revisionsListSinglePage(resourceGroupName, resourceName), + nextLink -> revisionsListNextSinglePage(nextLink)); } /** @@ -1239,7 +867,8 @@ public PagedIterable revisionsList(String resourceGroupName, Stri */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable revisionsList(String resourceGroupName, String resourceName, Context context) { - return new PagedIterable<>(revisionsListAsync(resourceGroupName, resourceName, context)); + return new PagedIterable<>(() -> revisionsListSinglePage(resourceGroupName, resourceName, context), + nextLink -> revisionsListNextSinglePage(nextLink, context)); } /** @@ -1257,73 +886,14 @@ public PagedIterable revisionsList(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono> revisionGetWithResponseAsync(String resourceGroupName, String resourceName, String revisionId) { - 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 (revisionId == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionId is required and cannot be null.")); - } final String apiVersion = "2023-06-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.revisionGet(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, revisionId, apiVersion, accept, context)) + .withContext(context -> service.revisionGet(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, revisionId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get a single workbook revision defined by its revisionId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the workbook resource. The value must be an UUID. - * @param revisionId The id of the workbook's revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook revision defined by its revisionId along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> revisionGetWithResponseAsync(String resourceGroupName, String resourceName, - String revisionId, 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 (revisionId == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionId is required and cannot be null.")); - } - final String apiVersion = "2023-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.revisionGet(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - resourceName, revisionId, apiVersion, accept, context); - } - /** * Get a single workbook revision defined by its revisionId. * @@ -1356,7 +926,10 @@ private Mono revisionGetAsync(String resourceGroupName, String re @ServiceMethod(returns = ReturnType.SINGLE) public Response revisionGetWithResponse(String resourceGroupName, String resourceName, String revisionId, Context context) { - return revisionGetWithResponseAsync(resourceGroupName, resourceName, revisionId, context).block(); + final String apiVersion = "2023-06-01"; + final String accept = "application/json"; + return service.revisionGetSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, revisionId, accept, context); } /** @@ -1375,6 +948,192 @@ public WorkbookInner revisionGet(String resourceGroupName, String resourceName, return revisionGetWithResponse(resourceGroupName, resourceName, revisionId, Context.NONE).getValue(); } + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Workbooks defined within a specified resource group and category along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + CategoryType category, List tags, String sourceId, Boolean canFetchContent) { + final String apiVersion = "2023-06-01"; + final String accept = "application/json"; + String tagsConverted = (tags == null) + ? null + : tags.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, category, tagsConverted, sourceId, canFetchContent, + 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Workbooks defined within a specified resource group and category as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, CategoryType category, + List tags, String sourceId, Boolean canFetchContent) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, category, tags, sourceId, canFetchContent), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * 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 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 PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, CategoryType category) { + final List tags = null; + final String sourceId = null; + final Boolean canFetchContent = null; + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, category, tags, sourceId, canFetchContent), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Workbooks defined within a specified resource group and category along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, CategoryType category, + List tags, String sourceId, Boolean canFetchContent) { + final String apiVersion = "2023-06-01"; + final String accept = "application/json"; + String tagsConverted = (tags == null) + ? null + : tags.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, category, tagsConverted, sourceId, canFetchContent, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * 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 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 along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, CategoryType category, + List tags, String sourceId, Boolean canFetchContent, Context context) { + final String apiVersion = "2023-06-01"; + final String accept = "application/json"; + String tagsConverted = (tags == null) + ? null + : tags.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, category, tagsConverted, sourceId, canFetchContent, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * 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 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) + public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category) { + final List tags = null; + final String sourceId = null; + final Boolean canFetchContent = null; + return new PagedIterable<>( + () -> listByResourceGroupSinglePage(resourceGroupName, category, tags, sourceId, canFetchContent), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * 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 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) + public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category, + List tags, String sourceId, Boolean canFetchContent, Context context) { + return new PagedIterable<>( + () -> listByResourceGroupSinglePage(resourceGroupName, category, tags, sourceId, canFetchContent, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + /** * Get the next page of items. * @@ -1382,17 +1141,11 @@ public WorkbookInner revisionGet(String resourceGroupName, String resourceName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all Workbooks defined within a specified subscription and category along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1402,6 +1155,24 @@ private Mono> listBySubscriptionNextSinglePageAsync .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 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 along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(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. * @@ -1410,22 +1181,15 @@ private Mono> listBySubscriptionNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all Workbooks defined within a specified subscription and category along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1435,26 +1199,37 @@ private Mono> listBySubscriptionNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the revisions for the workbook defined by its resourceName along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> revisionsListNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.revisionsListNext(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 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 revisions for the workbook defined by its resourceName along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse revisionsListNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.revisionsListNextSync(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. * @@ -1463,23 +1238,15 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the revisions for the workbook defined by its resourceName along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse revisionsListNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.revisionsListNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1489,25 +1256,38 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all Workbooks defined within a specified resource group and category along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> revisionsListNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.revisionsListNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .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 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 along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(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. * @@ -1516,21 +1296,14 @@ private Mono> revisionsListNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all Workbooks defined within a specified resource group and category along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> revisionsListNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.revisionsListNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(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/WorkbooksImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksImpl.java index a4f03ce1132f..4ef52ba88357 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksImpl.java @@ -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; @@ -29,39 +29,12 @@ public WorkbooksImpl(WorkbooksClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(CategoryType category) { - PagedIterable inner = this.serviceClient().list(category); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); - } - - public PagedIterable list(CategoryType category, List tags, Boolean canFetchContent, - Context context) { - PagedIterable inner = this.serviceClient().list(category, tags, canFetchContent, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, category); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category, - List tags, String sourceId, Boolean canFetchContent, Context context) { - PagedIterable inner = this.serviceClient() - .listByResourceGroup(resourceGroupName, category, tags, sourceId, canFetchContent, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Boolean canFetchContent, Context context) { Response inner = this.serviceClient() .getByResourceGroupWithResponse(resourceGroupName, resourceName, canFetchContent, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkbookImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkbookImpl(inner.getValue(), this.manager())); } public Workbook getByResourceGroup(String resourceGroupName, String resourceName) { @@ -82,6 +55,17 @@ public void deleteByResourceGroup(String resourceGroupName, String resourceName) this.serviceClient().delete(resourceGroupName, resourceName); } + public PagedIterable list(CategoryType category) { + PagedIterable inner = this.serviceClient().list(category); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); + } + + public PagedIterable list(CategoryType category, List tags, Boolean canFetchContent, + Context context) { + PagedIterable inner = this.serviceClient().list(category, tags, canFetchContent, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); + } + public PagedIterable revisionsList(String resourceGroupName, String resourceName) { PagedIterable inner = this.serviceClient().revisionsList(resourceGroupName, resourceName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); @@ -97,12 +81,8 @@ public Response revisionGetWithResponse(String resourceGroupName, Stri Context context) { Response inner = this.serviceClient().revisionGetWithResponse(resourceGroupName, resourceName, revisionId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkbookImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkbookImpl(inner.getValue(), this.manager())); } public Workbook revisionGet(String resourceGroupName, String resourceName, String revisionId) { @@ -114,6 +94,18 @@ public Workbook revisionGet(String resourceGroupName, String resourceName, Strin } } + public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, category); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category, + List tags, String sourceId, Boolean canFetchContent, Context context) { + PagedIterable inner = this.serviceClient() + .listByResourceGroup(resourceGroupName, category, tags, sourceId, canFetchContent, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); + } + public Workbook getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/AnnotationsListResult.java similarity index 78% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/AnnotationsListResult.java index 253d400e0865..57a1f202bc7a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/AnnotationsListResult.java @@ -1,8 +1,8 @@ // 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.models; +package com.azure.resourcemanager.applicationinsights.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -23,10 +23,15 @@ public final class AnnotationsListResult implements JsonSerializable value; + /* + * The url to the next page of results. + */ + private String nextLink; + /** * Creates an instance of AnnotationsListResult class. */ - public AnnotationsListResult() { + private AnnotationsListResult() { } /** @@ -39,14 +44,12 @@ public List value() { } /** - * Validates the instance. + * Get the nextLink property: The url to the next page of results. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -55,6 +58,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -76,6 +80,8 @@ public static AnnotationsListResult fromJson(JsonReader jsonReader) throws IOExc if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> AnnotationInner.fromJson(reader1)); deserializedAnnotationsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAnnotationsListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsComponentAPIKeyListResult.java similarity index 53% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsComponentAPIKeyListResult.java index 7f7b0dc760ad..bfc8e9353032 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsComponentAPIKeyListResult.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.models; +package com.azure.resourcemanager.applicationinsights.implementation.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; @@ -17,18 +16,23 @@ /** * Describes the list of API Keys of an Application Insights Component. */ -@Fluent -public final class ApplicationInsightsComponentApiKeyListResult - implements JsonSerializable { +@Immutable +public final class ApplicationInsightsComponentAPIKeyListResult + implements JsonSerializable { /* * List of API Key definitions. */ private List value; + /* + * The url to the next page of results. + */ + private String nextLink; + /** - * Creates an instance of ApplicationInsightsComponentApiKeyListResult class. + * Creates an instance of ApplicationInsightsComponentAPIKeyListResult class. */ - public ApplicationInsightsComponentApiKeyListResult() { + private ApplicationInsightsComponentAPIKeyListResult() { } /** @@ -41,33 +45,14 @@ public List value() { } /** - * Set the value property: List of API Key definitions. + * Get the nextLink property: The url to the next page of results. * - * @param value the value value to set. - * @return the ApplicationInsightsComponentApiKeyListResult object itself. + * @return the nextLink value. */ - public ApplicationInsightsComponentApiKeyListResult withValue(List value) { - this.value = value; - return this; + public String nextLink() { + return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ApplicationInsightsComponentApiKeyListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ApplicationInsightsComponentApiKeyListResult.class); - /** * {@inheritDoc} */ @@ -75,22 +60,23 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } /** - * Reads an instance of ApplicationInsightsComponentApiKeyListResult from the JsonReader. + * Reads an instance of ApplicationInsightsComponentAPIKeyListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ApplicationInsightsComponentApiKeyListResult if the JsonReader was pointing to an instance + * @return An instance of ApplicationInsightsComponentAPIKeyListResult if the JsonReader was pointing to an instance * of it, or null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ApplicationInsightsComponentApiKeyListResult. + * @throws IOException If an error occurs while reading the ApplicationInsightsComponentAPIKeyListResult. */ - public static ApplicationInsightsComponentApiKeyListResult fromJson(JsonReader jsonReader) throws IOException { + public static ApplicationInsightsComponentAPIKeyListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ApplicationInsightsComponentApiKeyListResult deserializedApplicationInsightsComponentApiKeyListResult - = new ApplicationInsightsComponentApiKeyListResult(); + ApplicationInsightsComponentAPIKeyListResult deserializedApplicationInsightsComponentAPIKeyListResult + = new ApplicationInsightsComponentAPIKeyListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -98,13 +84,15 @@ public static ApplicationInsightsComponentApiKeyListResult fromJson(JsonReader j if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ApplicationInsightsComponentApiKeyInner.fromJson(reader1)); - deserializedApplicationInsightsComponentApiKeyListResult.value = value; + deserializedApplicationInsightsComponentAPIKeyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedApplicationInsightsComponentAPIKeyListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedApplicationInsightsComponentApiKeyListResult; + return deserializedApplicationInsightsComponentAPIKeyListResult; }); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsComponentListResult.java similarity index 58% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsComponentListResult.java index be09c5034db3..fa3041383675 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsComponentListResult.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.models; +package com.azure.resourcemanager.applicationinsights.implementation.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,30 +14,29 @@ import java.util.List; /** - * Describes the list of Application Insights Resources. + * The response of a ApplicationInsightsComponent list operation. */ -@Fluent +@Immutable public final class ApplicationInsightsComponentListResult implements JsonSerializable { /* - * List of Application Insights component definitions. + * The ApplicationInsightsComponent items on this page */ private List value; /* - * The URI to get the next set of Application Insights component definitions if too many components where returned - * in the result set. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ApplicationInsightsComponentListResult class. */ - public ApplicationInsightsComponentListResult() { + private ApplicationInsightsComponentListResult() { } /** - * Get the value property: List of Application Insights component definitions. + * Get the value property: The ApplicationInsightsComponent items on this page. * * @return the value value. */ @@ -47,19 +45,7 @@ public List value() { } /** - * Set the value property: List of Application Insights component definitions. - * - * @param value the value value to set. - * @return the ApplicationInsightsComponentListResult object itself. - */ - public ApplicationInsightsComponentListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI to get the next set of Application Insights component definitions if too many - * components where returned in the result set. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -67,35 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI to get the next set of Application Insights component definitions if too many - * components where returned in the result set. - * - * @param nextLink the nextLink value to set. - * @return the ApplicationInsightsComponentListResult object itself. - */ - public ApplicationInsightsComponentListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ApplicationInsightsComponentListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ApplicationInsightsComponentListResult.class); - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsWebTestLocationsListResult.java similarity index 71% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsWebTestLocationsListResult.java index 5d923c3ff836..9428661ccfff 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsWebTestLocationsListResult.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.models; +package com.azure.resourcemanager.applicationinsights.implementation.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; @@ -17,7 +16,7 @@ /** * Describes the list of web test locations available to an Application Insights Component. */ -@Fluent +@Immutable public final class ApplicationInsightsWebTestLocationsListResult implements JsonSerializable { /* @@ -25,10 +24,15 @@ public final class ApplicationInsightsWebTestLocationsListResult */ private List value; + /* + * The URL to the next page of results + */ + private String nextLink; + /** * Creates an instance of ApplicationInsightsWebTestLocationsListResult class. */ - public ApplicationInsightsWebTestLocationsListResult() { + private ApplicationInsightsWebTestLocationsListResult() { } /** @@ -41,34 +45,14 @@ public List value() { } /** - * Set the value property: List of web test locations. + * Get the nextLink property: The URL to the next page of results. * - * @param value the value value to set. - * @return the ApplicationInsightsWebTestLocationsListResult object itself. + * @return the nextLink value. */ - public ApplicationInsightsWebTestLocationsListResult - withValue(List value) { - this.value = value; - return this; + public String nextLink() { + return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ApplicationInsightsWebTestLocationsListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ApplicationInsightsWebTestLocationsListResult.class); - /** * {@inheritDoc} */ @@ -76,6 +60,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -100,6 +85,8 @@ public static ApplicationInsightsWebTestLocationsListResult fromJson(JsonReader List value = reader .readArray(reader1 -> ApplicationInsightsComponentWebTestLocationInner.fromJson(reader1)); deserializedApplicationInsightsWebTestLocationsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedApplicationInsightsWebTestLocationsListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbooksListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/DeletedWorkbooksListResult.java similarity index 75% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbooksListResult.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/DeletedWorkbooksListResult.java index 1718575580a4..41c7e20b421c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbooksListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/DeletedWorkbooksListResult.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.models; +package com.azure.resourcemanager.applicationinsights.implementation.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; @@ -16,7 +16,7 @@ /** * Workbook list result. */ -@Fluent +@Immutable public final class DeletedWorkbooksListResult implements JsonSerializable { /* * An array of workbooks. @@ -24,14 +24,14 @@ public final class DeletedWorkbooksListResult implements JsonSerializable value; /* - * The nextLink property. + * The link to the next page of results. */ private String nextLink; /** * Creates an instance of DeletedWorkbooksListResult class. */ - public DeletedWorkbooksListResult() { + private DeletedWorkbooksListResult() { } /** @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The nextLink property. + * Get the nextLink property: The link to the next page of results. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The nextLink property. - * - * @param nextLink the nextLink value to set. - * @return the DeletedWorkbooksListResult object itself. - */ - public DeletedWorkbooksListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/OperationListResult.java similarity index 69% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/OperationListResult.java index 7d2d2067d5fd..2fecc93f67a5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/OperationListResult.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.models; +package com.azure.resourcemanager.applicationinsights.implementation.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,10 +14,10 @@ import java.util.List; /** - * 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. + * Result of the request to list Azure Workbooks operations. + * It contains a list of operations and a URL link to get the next set of results. */ -@Fluent +@Immutable public final class OperationListResult implements JsonSerializable { /* * List of Workbook operations supported by the Microsoft.Insights resource provider. @@ -32,7 +32,7 @@ public final class OperationListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: List of Workbook operations supported by the Microsoft.Insights resource provider. - * - * @param value the value value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: URL to get the next set of operation list results if there are any. * @@ -64,28 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of operation list results if there are any. - * - * @param nextLink the nextLink value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WebTestListResult.java similarity index 56% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WebTestListResult.java index 848645e781b9..89d536f2e399 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WebTestListResult.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.models; +package com.azure.resourcemanager.applicationinsights.implementation.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,29 +14,28 @@ import java.util.List; /** - * A list of 0 or more Application Insights WebTest definitions. + * Paged collection of WebTest items. */ -@Fluent +@Immutable public final class WebTestListResult implements JsonSerializable { /* - * Set of Application Insights WebTest definitions. + * The WebTest items on this page */ private List value; /* - * The link to get the next part of the returned list of WebTest, should the return set be too large for a single - * request. May be null. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of WebTestListResult class. */ - public WebTestListResult() { + private WebTestListResult() { } /** - * Get the value property: Set of Application Insights WebTest definitions. + * Get the value property: The WebTest items on this page. * * @return the value value. */ @@ -46,19 +44,7 @@ public List value() { } /** - * Set the value property: Set of Application Insights WebTest definitions. - * - * @param value the value value to set. - * @return the WebTestListResult object itself. - */ - public WebTestListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to get the next part of the returned list of WebTest, should the return set - * be too large for a single request. May be null. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -66,34 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to get the next part of the returned list of WebTest, should the return set - * be too large for a single request. May be null. - * - * @param nextLink the nextLink value to set. - * @return the WebTestListResult object itself. - */ - public WebTestListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model WebTestListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WebTestListResult.class); - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkItemConfigurationsListResult.java similarity index 79% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkItemConfigurationsListResult.java index e4bd6fcdedee..76601ba54500 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkItemConfigurationsListResult.java @@ -1,8 +1,8 @@ // 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.models; +package com.azure.resourcemanager.applicationinsights.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -23,10 +23,15 @@ public final class WorkItemConfigurationsListResult implements JsonSerializable< */ private List value; + /* + * The url to the next page of results. + */ + private String nextLink; + /** * Creates an instance of WorkItemConfigurationsListResult class. */ - public WorkItemConfigurationsListResult() { + private WorkItemConfigurationsListResult() { } /** @@ -39,14 +44,12 @@ public List value() { } /** - * Validates the instance. + * Get the nextLink property: The url to the next page of results. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -55,6 +58,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -78,6 +82,8 @@ public static WorkItemConfigurationsListResult fromJson(JsonReader jsonReader) t List value = reader.readArray(reader1 -> WorkItemConfigurationInner.fromJson(reader1)); deserializedWorkItemConfigurationsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkItemConfigurationsListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkbookTemplatesListResult.java similarity index 76% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkbookTemplatesListResult.java index 779367f90913..f1c7d90c2bab 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkbookTemplatesListResult.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.models; +package com.azure.resourcemanager.applicationinsights.implementation.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; @@ -16,17 +16,22 @@ /** * WorkbookTemplate list result. */ -@Fluent +@Immutable public final class WorkbookTemplatesListResult implements JsonSerializable { /* * An array of workbook templates. */ private List value; + /* + * The URL to get the next page of results. + */ + private String nextLink; + /** * Creates an instance of WorkbookTemplatesListResult class. */ - public WorkbookTemplatesListResult() { + private WorkbookTemplatesListResult() { } /** @@ -39,25 +44,12 @@ public List value() { } /** - * Set the value property: An array of workbook templates. - * - * @param value the value value to set. - * @return the WorkbookTemplatesListResult object itself. - */ - public WorkbookTemplatesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URL to get the next page of results. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -67,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -89,6 +82,8 @@ public static WorkbookTemplatesListResult fromJson(JsonReader jsonReader) throws List value = reader.readArray(reader1 -> WorkbookTemplateInner.fromJson(reader1)); deserializedWorkbookTemplatesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkbookTemplatesListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkbooksListResult.java similarity index 75% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkbooksListResult.java index 97cf75c2658f..34479e5a4f4c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkbooksListResult.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.models; +package com.azure.resourcemanager.applicationinsights.implementation.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; @@ -16,7 +16,7 @@ /** * Workbook list result. */ -@Fluent +@Immutable public final class WorkbooksListResult implements JsonSerializable { /* * An array of workbooks. @@ -24,14 +24,14 @@ public final class WorkbooksListResult implements JsonSerializable value; /* - * The nextLink property. + * The link to the next page of results. */ private String nextLink; /** * Creates an instance of WorkbooksListResult class. */ - public WorkbooksListResult() { + private WorkbooksListResult() { } /** @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The nextLink property. + * Get the nextLink property: The link to the next page of results. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The nextLink property. - * - * @param nextLink the nextLink value to set. - * @return the WorkbooksListResult object itself. - */ - public WorkbooksListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/package-info.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/package-info.java index 7cee26d72ed7..53dd8c3c9266 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/package-info.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/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 implementations for ApplicationInsightsManagementClient. - * Composite Swagger for Application Insights Management Client. + * Package containing the implementations for ApplicationInsights. + * Azure Application Insights client for saved items. */ package com.azure.resourcemanager.applicationinsights.implementation; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java index aeba969b3653..3fa278ae2cec 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java @@ -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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotation.java index 8f206ac370e4..a4a6b001a6e0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotation.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotation.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java index 9ad525667e89..133dc3cea6a7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java @@ -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.models; @@ -51,7 +51,7 @@ public final class AnnotationError extends ManagementError { /** * Creates an instance of AnnotationError class. */ - public AnnotationError() { + private AnnotationError() { } /** @@ -113,17 +113,6 @@ public String getCode() { return this.code; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (getInnererror() != null) { - getInnererror().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java index 52c6cd8a847b..71b45aa7bc18 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java @@ -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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java index bc77294b4402..8e5c778fb914 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java @@ -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.models; @@ -60,7 +60,7 @@ PagedIterable list(String resourceGroupName, String resourceName, St * @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}. */ Response> createWithResponse(String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context); @@ -76,7 +76,7 @@ Response> createWithResponse(String resourceGroupName, String r * @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. */ List create(String resourceGroupName, String resourceName, AnnotationInner annotationProperties); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java index 9aacbeb0b0fe..d19655521ada 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java @@ -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.models; @@ -98,14 +98,6 @@ public ApiKeyRequest withLinkedWriteProperties(List linkedWritePropertie 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/models/ApiKeys.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java index bc185806de7b..d8688d4bd93c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java @@ -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.models; @@ -43,7 +43,7 @@ PagedIterable list(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 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. @@ -59,7 +59,7 @@ Response createWithResponse(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param 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/models/ApplicationInsightsComponent.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java index e85bb6e18336..95f9a7920403 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java @@ -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.models; @@ -17,28 +17,28 @@ */ public interface ApplicationInsightsComponent { /** - * Gets the id property: Fully qualified resource Id for the resource. + * Gets the id property: Azure resource Id. * * @return the id value. */ String id(); /** - * Gets the name property: The name of the resource. + * Gets the name property: Azure resource name. * * @return the name value. */ String name(); /** - * Gets the type property: The type of the resource. + * Gets the type property: Azure resource type. * * @return the type value. */ String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the location property: Resource location. * * @return the location value. */ @@ -308,7 +308,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location The geo-location where the resource lives. + * @param location Resource location. * @return the next definition stage. */ WithResourceGroup withRegion(Region location); @@ -316,7 +316,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location The geo-location where the resource lives. + * @param location Resource location. * @return the next definition stage. */ WithResourceGroup withRegion(String location); @@ -384,7 +384,7 @@ interface WithCreate */ interface WithTags { /** - * Specifies the tags property: Resource tags.. + * Specifies the tags property: Resource tags. * * @param tags Resource tags. * @return the next definition stage. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItem.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItem.java index d1c9e475cb54..23ed0caae941 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItem.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItem.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java index fdf5406e3b09..0045e83bc36b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java @@ -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.models; @@ -49,14 +49,6 @@ public ApplicationInsightsComponentAnalyticsItemProperties withFunctionAlias(Str 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/models/ApplicationInsightsComponentApiKey.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKey.java index 68c7c160d5c6..3a66b483cdd0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKey.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKey.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAvailableFeatures.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAvailableFeatures.java index 998696163fab..7ca3c66a337a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAvailableFeatures.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAvailableFeatures.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentBillingFeatures.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentBillingFeatures.java index f1c7bdf02a1c..59baa1895d5e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentBillingFeatures.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentBillingFeatures.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java index 17e0352a3fb3..5bc132aec6d2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java @@ -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.models; @@ -155,14 +155,6 @@ public Float maxHistoryCap() { return this.maxHistoryCap; } - /** - * 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/models/ApplicationInsightsComponentExportConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportConfiguration.java index 938d4f1fe704..42a9b149215d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportConfiguration.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportConfiguration.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java index cecea8b9f96d..d6ab992b70b4 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java @@ -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.models; @@ -260,14 +260,6 @@ public ApplicationInsightsComponentExportRequest withDestinationAccountId(String 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/models/ApplicationInsightsComponentFavorite.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFavorite.java index 3d2a651e2082..ddbbdd668602 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFavorite.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFavorite.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java index de4efa251fae..10b8b8417767 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java @@ -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.models; @@ -66,7 +66,7 @@ public final class ApplicationInsightsComponentFeature /** * Creates an instance of ApplicationInsightsComponentFeature class. */ - public ApplicationInsightsComponentFeature() { + private ApplicationInsightsComponentFeature() { } /** @@ -150,17 +150,6 @@ public String supportedAddonFeatures() { return this.supportedAddonFeatures; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (capabilities() != null) { - capabilities().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapabilities.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapabilities.java index 9c7c67962b8a..a495f916a076 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapabilities.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapabilities.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java index e6b880d773bd..85555ec11d1c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java @@ -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.models; @@ -50,7 +50,7 @@ public final class ApplicationInsightsComponentFeatureCapability /** * Creates an instance of ApplicationInsightsComponentFeatureCapability class. */ - public ApplicationInsightsComponentFeatureCapability() { + private ApplicationInsightsComponentFeatureCapability() { } /** @@ -107,14 +107,6 @@ public String meterRateFrequency() { return this.meterRateFrequency; } - /** - * 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/models/ApplicationInsightsComponentProactiveDetectionConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfiguration.java index 4a1fc948020e..badf85f246b1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfiguration.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfiguration.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java index 9c9d5292fd3a..610f7cbfce42 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java @@ -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.models; @@ -230,14 +230,6 @@ public Boolean supportsEmailNotifications() { 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/models/ApplicationInsightsComponentQuotaStatus.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentQuotaStatus.java index 7a58d90a7be9..48ac24c6e15b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentQuotaStatus.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentQuotaStatus.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentWebTestLocation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentWebTestLocation.java index d76d276fc6b4..d020204d2685 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentWebTestLocation.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentWebTestLocation.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java index b2ef63641527..6c97e254d6f6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java @@ -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.models; @@ -12,12 +12,12 @@ */ public final class ApplicationType extends ExpandableStringEnum { /** - * Static value web for ApplicationType. + * web. */ public static final ApplicationType WEB = fromString("web"); /** - * Static value other for ApplicationType. + * other. */ public static final ApplicationType OTHER = fromString("other"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java index 1296708b3902..b773861e91bc 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java @@ -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.models; @@ -12,22 +12,22 @@ */ public final class CategoryType extends ExpandableStringEnum { /** - * Static value workbook for CategoryType. + * workbook. */ public static final CategoryType WORKBOOK = fromString("workbook"); /** - * Static value TSG for CategoryType. + * TSG. */ public static final CategoryType TSG = fromString("TSG"); /** - * Static value performance for CategoryType. + * performance. */ public static final CategoryType PERFORMANCE = fromString("performance"); /** - * Static value retention for CategoryType. + * retention. */ public static final CategoryType RETENTION = fromString("retention"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java index da3c51e6da5b..dc387d0bba9e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java @@ -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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java index a97477d9e191..1f5da2667d6c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java @@ -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.models; @@ -43,8 +43,7 @@ Response getWithResponse(String res * * @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. @@ -60,8 +59,7 @@ Response updateWithResponse(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param 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/models/ComponentFeatureCapabilities.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java index 2ae75c4a0a4a..a33461d4aa70 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java @@ -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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccounts.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccounts.java index 5677b25036dd..f4b19598f0a8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccounts.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccounts.java @@ -1,9 +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.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner; @@ -32,6 +33,13 @@ public interface ComponentLinkedStorageAccounts { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the linkedStorageAccount property: Linked storage account resource ID. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsOperations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsOperations.java index 711d7a8e2313..74810b483b7f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsOperations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsOperations.java @@ -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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsPatch.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsPatch.java index ecd3b8e3e896..31b1078779fb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsPatch.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsPatch.java @@ -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.models; @@ -61,17 +61,6 @@ public ComponentLinkedStorageAccountsPatch 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} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java index 4db6d53c9182..566d69aa0405 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java @@ -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.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; @@ -74,26 +73,6 @@ public ComponentPurgeBody withFilters(List filters) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (table() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property table in model ComponentPurgeBody")); - } - if (filters() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property filters in model ComponentPurgeBody")); - } else { - filters().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ComponentPurgeBody.class); - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java index a86c21f2dc02..21adfbf5658b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java @@ -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.models; @@ -132,14 +132,6 @@ public ComponentPurgeBodyFilters withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -148,7 +140,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("column", this.column); jsonWriter.writeStringField("operator", this.operator); - jsonWriter.writeUntypedField("value", this.value); + if (this.value != null) { + jsonWriter.writeUntypedField("value", this.value); + } jsonWriter.writeStringField("key", this.key); return jsonWriter.writeEndObject(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeResponse.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeResponse.java index ba858c72971a..f5c8b43bee38 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeResponse.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeResponse.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeStatusResponse.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeStatusResponse.java index c16eedcb5b23..e442663823b9 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeStatusResponse.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeStatusResponse.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java index 3b6f584f25b6..a54bc64987de 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java @@ -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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java index e5097cd0a8d1..614da87e0c80 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java @@ -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.models; @@ -13,101 +13,101 @@ */ public interface Components { /** - * Gets a list of all Application Insights components within a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Application Insights components within a subscription as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * 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}. */ - PagedIterable list(Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); /** - * Gets a list of Application Insights components within a resource group. + * 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. * @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. */ - PagedIterable listByResourceGroup(String resourceGroupName); + ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, String resourceName); /** - * Gets a list of Application Insights components within a resource group. + * Deletes an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Application Insights components within a resource group as paginated response with - * {@link PagedIterable}. + * @return the {@link Response}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** * Deletes an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); + void deleteByResourceGroup(String resourceGroupName, String resourceName); /** - * Deletes an Application Insights component. + * 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. * @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}. */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Returns an Application Insights component. + * 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 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}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Returns an Application Insights component. + * 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. + * @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}. + */ + PagedIterable list(); + + /** + * Gets a list of all Application Insights components within a subscription. + * + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. + * @return a list of all Application Insights components within a subscription as paginated response with + * {@link PagedIterable}. */ - ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, String resourceName); + 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/models/ComponentsResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentsResource.java index 74ddf503957d..f766e155dfe1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentsResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentsResource.java @@ -1,12 +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.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -16,21 +16,31 @@ * An azure resource object. */ @Fluent -public class ComponentsResource extends Resource { +public class ComponentsResource implements JsonSerializable { /* - * The type of the resource. + * Azure resource Id */ - private String type; + private String id; /* - * The name of the resource. + * Azure resource name */ private String name; /* - * Fully qualified resource Id for the resource. + * Azure resource type */ - private String id; + private String type; + + /* + * Resource location + */ + private String location; + + /* + * Resource tags + */ + private Map tags; /** * Creates an instance of ComponentsResource class. @@ -39,59 +49,103 @@ public ComponentsResource() { } /** - * Get the type property: The type of the resource. + * Get the id property: Azure resource Id. * - * @return the type value. + * @return the id value. */ - @Override - public String type() { - return this.type; + public String id() { + return this.id; + } + + /** + * Set the id property: Azure resource Id. + * + * @param id the id value to set. + * @return the ComponentsResource object itself. + */ + ComponentsResource withId(String id) { + this.id = id; + return this; } /** - * Get the name property: The name of the resource. + * Get the name property: Azure resource name. * * @return the name value. */ - @Override public String name() { return this.name; } /** - * Get the id property: Fully qualified resource Id for the resource. + * Set the name property: Azure resource name. * - * @return the id value. + * @param name the name value to set. + * @return the ComponentsResource object itself. */ - @Override - public String id() { - return this.id; + ComponentsResource withName(String name) { + this.name = name; + return this; } /** - * {@inheritDoc} + * Get the type property: Azure resource type. + * + * @return the type value. */ - @Override - public ComponentsResource withLocation(String location) { - super.withLocation(location); + public String type() { + return this.type; + } + + /** + * Set the type property: Azure resource type. + * + * @param type the type value to set. + * @return the ComponentsResource object itself. + */ + ComponentsResource withType(String type) { + this.type = type; return this; } /** - * {@inheritDoc} + * Get the location property: Resource location. + * + * @return the location value. */ - @Override - public ComponentsResource withTags(Map tags) { - super.withTags(tags); + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the ComponentsResource object itself. + */ + public ComponentsResource withLocation(String location) { + this.location = location; return this; } /** - * Validates the instance. + * Get the tags property: Resource tags. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the tags value. */ - public void validate() { + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ComponentsResource object itself. + */ + public ComponentsResource withTags(Map tags) { + this.tags = tags; + return this; } /** @@ -100,8 +154,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -121,17 +175,17 @@ public static ComponentsResource fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("id".equals(fieldName)) { + if ("location".equals(fieldName)) { + deserializedComponentsResource.location = reader.getString(); + } else if ("id".equals(fieldName)) { deserializedComponentsResource.id = reader.getString(); } else if ("name".equals(fieldName)) { deserializedComponentsResource.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedComponentsResource.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedComponentsResource.withLocation(reader.getString()); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedComponentsResource.withTags(tags); + deserializedComponentsResource.tags = tags; } else { reader.skipChildren(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbook.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbook.java index a9609cc8134d..be099d5f851f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbook.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbook.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookErrorDefinition.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookErrorDefinition.java index dd1f778187d1..f28a6ca5b3bd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookErrorDefinition.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookErrorDefinition.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.models; @@ -51,7 +51,7 @@ public final class DeletedWorkbookErrorDefinition extends ManagementError { /** * Creates an instance of DeletedWorkbookErrorDefinition class. */ - public DeletedWorkbookErrorDefinition() { + private DeletedWorkbookErrorDefinition() { } /** @@ -113,17 +113,6 @@ public String getCode() { return this.code; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (getInnererror() != null) { - getInnererror().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookErrorDefinitionException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookErrorDefinitionException.java index b00cee75f584..310de1e79af4 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookErrorDefinitionException.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookErrorDefinitionException.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookInnerErrorTrace.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookInnerErrorTrace.java index 3ee2439da535..71db6505163a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookInnerErrorTrace.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookInnerErrorTrace.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.models; @@ -25,7 +25,7 @@ public final class DeletedWorkbookInnerErrorTrace implements JsonSerializable trace() { return this.trace; } - /** - * 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/models/DeletedWorkbookResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookResource.java index fa5b778dd59c..b723b1f9a5c2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookResource.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.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * An azure resource object. */ -@Fluent +@Immutable public class DeletedWorkbookResource extends Resource { /* * The kind of workbook. Only valid value is shared. @@ -51,7 +51,7 @@ public class DeletedWorkbookResource extends Resource { /** * Creates an instance of DeletedWorkbookResource class. */ - public DeletedWorkbookResource() { + protected DeletedWorkbookResource() { } /** @@ -69,7 +69,7 @@ public WorkbookSharedTypeKind kind() { * @param kind the kind value to set. * @return the DeletedWorkbookResource object itself. */ - public DeletedWorkbookResource withKind(WorkbookSharedTypeKind kind) { + DeletedWorkbookResource withKind(WorkbookSharedTypeKind kind) { this.kind = kind; return this; } @@ -89,7 +89,7 @@ public String etag() { * @param etag the etag value to set. * @return the DeletedWorkbookResource object itself. */ - public DeletedWorkbookResource withEtag(String etag) { + DeletedWorkbookResource withEtag(String etag) { this.etag = etag; return this; } @@ -144,32 +144,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public DeletedWorkbookResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DeletedWorkbookResource withTags(Map tags) { - super.withTags(tags); - 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/models/DeletedWorkbooks.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbooks.java index ba04d34ca255..ea0e33ee298e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbooks.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbooks.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java index c3a81986fc73..49274e06d77d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java @@ -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.models; @@ -44,13 +44,12 @@ Response> listWithResponse * * @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}. */ Response> createWithResponse(String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties, Context context); @@ -60,12 +59,11 @@ Response> 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 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. */ List create(String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java index 612e22db95ba..19dd468d7185 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java @@ -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.models; @@ -12,42 +12,42 @@ */ public final class FavoriteSourceType extends ExpandableStringEnum { /** - * Static value retention for FavoriteSourceType. + * retention. */ public static final FavoriteSourceType RETENTION = fromString("retention"); /** - * Static value notebook for FavoriteSourceType. + * notebook. */ public static final FavoriteSourceType NOTEBOOK = fromString("notebook"); /** - * Static value sessions for FavoriteSourceType. + * sessions. */ public static final FavoriteSourceType SESSIONS = fromString("sessions"); /** - * Static value events for FavoriteSourceType. + * events. */ public static final FavoriteSourceType EVENTS = fromString("events"); /** - * Static value userflows for FavoriteSourceType. + * userflows. */ public static final FavoriteSourceType USERFLOWS = fromString("userflows"); /** - * Static value funnel for FavoriteSourceType. + * funnel. */ public static final FavoriteSourceType FUNNEL = fromString("funnel"); /** - * Static value impact for FavoriteSourceType. + * impact. */ public static final FavoriteSourceType IMPACT = fromString("impact"); /** - * Static value segmentation for FavoriteSourceType. + * segmentation. */ public static final FavoriteSourceType SEGMENTATION = fromString("segmentation"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteType.java index 8d65fe54dcce..158a6911ce8c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteType.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.models; @@ -10,12 +10,12 @@ */ public enum FavoriteType { /** - * Enum value shared. + * shared. */ SHARED("shared"), /** - * Enum value user. + * user. */ USER("user"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Favorites.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Favorites.java index 44866668fec4..0a8cd1546ea1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Favorites.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Favorites.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java index a2e7f9e293b3..94048f9992da 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java @@ -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.models; @@ -13,7 +13,7 @@ */ public final class FlowType extends ExpandableStringEnum { /** - * Static value Bluefield for FlowType. + * Bluefield. */ public static final FlowType BLUEFIELD = fromString("Bluefield"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/HeaderField.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/HeaderField.java index b57c4c4fee94..80deba154d84 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/HeaderField.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/HeaderField.java @@ -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.models; @@ -72,14 +72,6 @@ public HeaderField withHeaderFieldValue(String headerFieldValue) { 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/models/IngestionMode.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java index cacbe74f26cf..d04443230c57 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java @@ -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.models; @@ -12,18 +12,18 @@ */ public final class IngestionMode extends ExpandableStringEnum { /** - * Static value ApplicationInsights for IngestionMode. + * ApplicationInsights. */ public static final IngestionMode APPLICATION_INSIGHTS = fromString("ApplicationInsights"); /** - * Static value ApplicationInsightsWithDiagnosticSettings for IngestionMode. + * ApplicationInsightsWithDiagnosticSettings. */ public static final IngestionMode APPLICATION_INSIGHTS_WITH_DIAGNOSTIC_SETTINGS = fromString("ApplicationInsightsWithDiagnosticSettings"); /** - * Static value LogAnalytics for IngestionMode. + * LogAnalytics. */ public static final IngestionMode LOG_ANALYTICS = fromString("LogAnalytics"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java index 8eedd312d174..1873f97bb57b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java @@ -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.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Inner error. */ -@Fluent +@Immutable public final class InnerError implements JsonSerializable { /* * Provides correlation for request @@ -32,7 +32,7 @@ public final class InnerError implements JsonSerializable { /** * Creates an instance of InnerError class. */ - public InnerError() { + private InnerError() { } /** @@ -44,17 +44,6 @@ public String diagnosticcontext() { return this.diagnosticcontext; } - /** - * Set the diagnosticcontext property: Provides correlation for request. - * - * @param diagnosticcontext the diagnosticcontext value to set. - * @return the InnerError object itself. - */ - public InnerError withDiagnosticcontext(String diagnosticcontext) { - this.diagnosticcontext = diagnosticcontext; - return this; - } - /** * Get the time property: Request time. * @@ -64,25 +53,6 @@ public OffsetDateTime time() { return this.time; } - /** - * Set the time property: Request time. - * - * @param time the time value to set. - * @return the InnerError object itself. - */ - public InnerError withTime(OffsetDateTime time) { - this.time = time; - 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/models/ItemScope.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java index 632c731a3aac..804a2ff100c3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java @@ -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.models; @@ -13,12 +13,12 @@ */ public final class ItemScope extends ExpandableStringEnum { /** - * Static value shared for ItemScope. + * shared. */ public static final ItemScope SHARED = fromString("shared"); /** - * Static value user for ItemScope. + * user. */ public static final ItemScope USER = fromString("user"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java index 4f912ae9cc05..4bece7c97416 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java @@ -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.models; @@ -12,12 +12,12 @@ */ public final class ItemScopePath extends ExpandableStringEnum { /** - * Static value analyticsItems for ItemScopePath. + * analyticsItems. */ public static final ItemScopePath ANALYTICS_ITEMS = fromString("analyticsItems"); /** - * Static value myanalyticsItems for ItemScopePath. + * myanalyticsItems. */ public static final ItemScopePath MYANALYTICS_ITEMS = fromString("myanalyticsItems"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java index 9e7e1f72973b..2a29f989b70d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java @@ -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.models; @@ -12,22 +12,22 @@ */ public final class ItemType extends ExpandableStringEnum { /** - * Static value none for ItemType. + * none. */ public static final ItemType NONE = fromString("none"); /** - * Static value query for ItemType. + * query. */ public static final ItemType QUERY = fromString("query"); /** - * Static value recent for ItemType. + * recent. */ public static final ItemType RECENT = fromString("recent"); /** - * Static value function for ItemType. + * function. */ public static final ItemType FUNCTION = fromString("function"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java index 185ef0a95ad5..e2c0bf2866e3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java @@ -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.models; @@ -12,27 +12,27 @@ */ public final class ItemTypeParameter extends ExpandableStringEnum { /** - * Static value none for ItemTypeParameter. + * none. */ public static final ItemTypeParameter NONE = fromString("none"); /** - * Static value query for ItemTypeParameter. + * query. */ public static final ItemTypeParameter QUERY = fromString("query"); /** - * Static value function for ItemTypeParameter. + * function. */ public static final ItemTypeParameter FUNCTION = fromString("function"); /** - * Static value folder for ItemTypeParameter. + * folder. */ public static final ItemTypeParameter FOLDER = fromString("folder"); /** - * Static value recent for ItemTypeParameter. + * recent. */ public static final ItemTypeParameter RECENT = fromString("recent"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokenResponse.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokenResponse.java index 886ca7b7220e..1153925210d4 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokenResponse.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokenResponse.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokens.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokens.java index dbb514b7c37a..dbf46502144c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokens.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokens.java @@ -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.models; @@ -14,7 +14,7 @@ public interface LiveTokens { /** * **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. @@ -26,7 +26,7 @@ public interface LiveTokens { /** * **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/models/ManagedServiceIdentity.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentity.java index 97ee9f933e03..71fa66469912 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentity.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentity.java @@ -1,18 +1,16 @@ // 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.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; import com.azure.json.JsonWriter; import java.io.IOException; import java.util.Map; -import java.util.UUID; /** * Managed service identity (system assigned and/or user assigned identities). @@ -23,24 +21,21 @@ public class ManagedServiceIdentity implements JsonSerializable userAssignedIdentities; @@ -56,7 +51,7 @@ public ManagedServiceIdentity() { * * @return the principalId value. */ - public UUID principalId() { + public String principalId() { return this.principalId; } @@ -67,7 +62,7 @@ public UUID principalId() { * @param principalId the principalId value to set. * @return the ManagedServiceIdentity object itself. */ - ManagedServiceIdentity withPrincipalId(UUID principalId) { + ManagedServiceIdentity withPrincipalId(String principalId) { this.principalId = principalId; return this; } @@ -78,7 +73,7 @@ ManagedServiceIdentity withPrincipalId(UUID principalId) { * * @return the tenantId value. */ - public UUID tenantId() { + public String tenantId() { return this.tenantId; } @@ -89,14 +84,13 @@ public UUID tenantId() { * @param tenantId the tenantId value to set. * @return the ManagedServiceIdentity object itself. */ - ManagedServiceIdentity withTenantId(UUID tenantId) { + ManagedServiceIdentity withTenantId(String tenantId) { this.tenantId = tenantId; return this; } /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Get the type property: The type of managed identity assigned to this resource. * * @return the type value. */ @@ -105,8 +99,7 @@ public ManagedServiceIdentityType type() { } /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Set the type property: The type of managed identity assigned to this resource. * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. @@ -117,10 +110,7 @@ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { } /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. * * @return the userAssignedIdentities value. */ @@ -129,10 +119,7 @@ public Map userAssignedIdentities() { } /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedServiceIdentity object itself. @@ -142,27 +129,6 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); - /** * {@inheritDoc} */ @@ -194,11 +160,9 @@ public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOEx if ("type".equals(fieldName)) { deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.principalId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.tenantId = reader.getString(); } else if ("userAssignedIdentities".equals(fieldName)) { Map userAssignedIdentities = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java index a33fa95517c8..b822efa8d003 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java @@ -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.models; @@ -12,22 +12,22 @@ */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** - * Static value None for ManagedServiceIdentityType. + * No managed identity. */ public static final ManagedServiceIdentityType NONE = fromString("None"); /** - * Static value SystemAssigned for ManagedServiceIdentityType. + * System assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for ManagedServiceIdentityType. + * User assigned managed identity. */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. + * System and user assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = fromString("SystemAssigned,UserAssigned"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operation.java index be1340bc1ffc..65ae9735563f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operation.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operation.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java index c7dbcda5afb3..02d3b62b10b5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java @@ -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.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 @@ /** * The object that represents the operation. */ -@Fluent +@Immutable public final class OperationDisplay implements JsonSerializable { /* * Service provider: Microsoft.Insights @@ -34,7 +34,7 @@ public final class OperationDisplay implements JsonSerializable 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}. */ PagedIterable list(Context context); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java index 513eb5b7e08f..cded91d9fbd0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java @@ -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.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 @@ /** * The private link scope resource reference. */ -@Fluent +@Immutable public final class PrivateLinkScopedResource implements JsonSerializable { /* * The full resource Id of the private link scope resource. @@ -29,7 +29,7 @@ public final class PrivateLinkScopedResource implements JsonSerializable { /** - * Static value Enabled for PublicNetworkAccessType. + * Enables connectivity to Application Insights through public DNS. */ public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); /** - * Static value Disabled for PublicNetworkAccessType. + * Disables public connectivity to Application Insights through public DNS. */ public static final PublicNetworkAccessType DISABLED = fromString("Disabled"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PurgeState.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PurgeState.java index 0bc184465618..c44fb5825459 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PurgeState.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PurgeState.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.models; @@ -12,12 +12,12 @@ */ public final class PurgeState extends ExpandableStringEnum { /** - * Static value pending for PurgeState. + * pending. */ public static final PurgeState PENDING = fromString("pending"); /** - * Static value completed for PurgeState. + * completed. */ public static final PurgeState COMPLETED = fromString("completed"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java index 736207d175c6..f60955cef3ad 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java @@ -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.models; @@ -13,7 +13,7 @@ */ public final class RequestSource extends ExpandableStringEnum { /** - * Static value rest for RequestSource. + * rest. */ public static final RequestSource REST = fromString("rest"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java index 7435dbea0b8d..d4c0700023df 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java @@ -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.models; @@ -12,7 +12,7 @@ */ public final class StorageType extends ExpandableStringEnum { /** - * Static value ServiceProfiler for StorageType. + * ServiceProfiler. */ public static final StorageType SERVICE_PROFILER = fromString("ServiceProfiler"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java index adc2bbc7e8a7..f31b8db72a35 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java @@ -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.models; @@ -48,14 +48,6 @@ public TagsResource withTags(Map tags) { 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/models/TrackedResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TrackedResource.java new file mode 100644 index 000000000000..ba3100267ae1 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TrackedResource.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.applicationinsights.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; +import java.io.IOException; +import java.util.Map; + +/** + * Tracked Resource + * + * The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a + * 'location'. + */ +@Fluent +public final class TrackedResource extends ProxyResource { + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of TrackedResource class. + */ + public TrackedResource() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the TrackedResource object itself. + */ + public TrackedResource withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the TrackedResource object itself. + */ + public TrackedResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * 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. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrackedResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrackedResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TrackedResource. + */ + public static TrackedResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrackedResource deserializedTrackedResource = new TrackedResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTrackedResource.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTrackedResource.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTrackedResource.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedTrackedResource.location = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedTrackedResource.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedTrackedResource.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTrackedResource; + }); + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java index 703a937b5270..9e56279e1a7a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java @@ -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.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.UUID; /** * User assigned identity properties. @@ -20,12 +19,12 @@ public final class UserAssignedIdentity implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.principalId = reader.getString(); } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.clientId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java index 6b17fa3e322c..2e20c1bb774a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java @@ -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.models; @@ -15,28 +15,28 @@ */ public interface WebTest { /** - * Gets the id property: Fully qualified resource Id for the resource. + * Gets the id property: Azure resource Id. * * @return the id value. */ String id(); /** - * Gets the name property: The name of the resource. + * Gets the name property: Azure resource name. * * @return the name value. */ String name(); /** - * Gets the type property: The type of the resource. + * Gets the type property: Azure resource type. * * @return the type value. */ String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the location property: Resource location. * * @return the location value. */ @@ -203,7 +203,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location The geo-location where the resource lives. + * @param location Resource location. * @return the next definition stage. */ WithResourceGroup withRegion(Region location); @@ -211,7 +211,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location The geo-location where the resource lives. + * @param location Resource location. * @return the next definition stage. */ WithResourceGroup withRegion(String location); @@ -260,7 +260,7 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithKin */ interface WithTags { /** - * Specifies the tags property: Resource tags.. + * Specifies the tags property: Resource tags. * * @param tags Resource tags. * @return the next definition stage. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java index a0a668b319e5..87b12dde252f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java @@ -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.models; @@ -47,14 +47,6 @@ public WebTestGeolocation withLocation(String location) { 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/models/WebTestKind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java index 445b4d07d29a..e3f812ca0af9 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java @@ -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.models; @@ -9,17 +9,17 @@ */ public enum WebTestKind { /** - * Enum value ping. + * ping. */ PING("ping"), /** - * Enum value multistep. + * multistep. */ MULTISTEP("multistep"), /** - * Enum value standard. + * standard. */ STANDARD("standard"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestLocations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestLocations.java index 2de36f9458eb..8d84a516a33a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestLocations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestLocations.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java index 671e7f0b38db..77785f0328af 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java @@ -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.models; @@ -47,14 +47,6 @@ public WebTestPropertiesConfiguration withWebTest(String webTest) { 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/models/WebTestPropertiesRequest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesRequest.java index 215d05ea1157..06bb2b2999f5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesRequest.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesRequest.java @@ -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.models; @@ -173,17 +173,6 @@ public WebTestPropertiesRequest withFollowRedirects(Boolean followRedirects) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (headers() != null) { - headers().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRules.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRules.java index 3fd419ddf41f..4b26781bdc7e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRules.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRules.java @@ -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.models; @@ -151,17 +151,6 @@ public WebTestPropertiesValidationRules withIgnoreHttpStatusCode(Boolean ignoreH return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contentValidation() != null) { - contentValidation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRulesContentValidation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRulesContentValidation.java index 50e1a9fc4c69..44f18d13a78e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRulesContentValidation.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRulesContentValidation.java @@ -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.models; @@ -101,14 +101,6 @@ public WebTestPropertiesValidationRulesContentValidation withPassIfTextFound(Boo 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/models/WebTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java index 681627b9d87f..93b7f40c46f0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java @@ -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.models; @@ -13,32 +13,32 @@ */ public interface WebTests { /** - * Get all Application Insights web tests defined for the specified resource group. + * Get a specific Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webTestName The name of the Application Insights WebTest resource. + * @param context The context to associate with this operation. * @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}. + * @return a specific Application Insights web test definition along with {@link Response}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + Response getByResourceGroupWithResponse(String resourceGroupName, String webTestName, Context context); /** - * Get all Application Insights web tests defined for the specified resource group. + * Get a specific Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified resource group as paginated response with - * {@link PagedIterable}. + * @return a specific Application Insights web test definition. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + WebTest getByResourceGroup(String resourceGroupName, String webTestName); /** - * Get a specific Application Insights web test definition. + * Deletes an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. @@ -46,45 +46,45 @@ public interface WebTests { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition along with {@link Response}. + * @return the {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String webTestName, Context context); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String webTestName, Context context); /** - * Get a specific Application Insights web test definition. + * Deletes an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition. */ - WebTest getByResourceGroup(String resourceGroupName, String webTestName); + void deleteByResourceGroup(String resourceGroupName, String webTestName); /** - * Deletes an Application Insights web test. + * 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 webTestName The name of the Application Insights WebTest resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return all Application Insights web tests defined for the specified resource group as paginated response with + * {@link PagedIterable}. */ - Response deleteByResourceGroupWithResponse(String resourceGroupName, String webTestName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Deletes an Application Insights web test. + * 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 webTestName The name of the Application Insights WebTest resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Application Insights web tests defined for the specified resource group as paginated response with + * {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String webTestName); + 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/models/WebtestsResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebtestsResource.java index d9ffc3705439..fbe96584fad3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebtestsResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebtestsResource.java @@ -1,12 +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.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -16,21 +16,31 @@ * An azure resource object. */ @Fluent -public class WebtestsResource extends Resource { +public class WebtestsResource implements JsonSerializable { /* - * The type of the resource. + * Azure resource Id */ - private String type; + private String id; /* - * The name of the resource. + * Azure resource name */ private String name; /* - * Fully qualified resource Id for the resource. + * Azure resource type */ - private String id; + private String type; + + /* + * Resource location + */ + private String location; + + /* + * Resource tags + */ + private Map tags; /** * Creates an instance of WebtestsResource class. @@ -39,59 +49,103 @@ public WebtestsResource() { } /** - * Get the type property: The type of the resource. + * Get the id property: Azure resource Id. * - * @return the type value. + * @return the id value. */ - @Override - public String type() { - return this.type; + public String id() { + return this.id; + } + + /** + * Set the id property: Azure resource Id. + * + * @param id the id value to set. + * @return the WebtestsResource object itself. + */ + WebtestsResource withId(String id) { + this.id = id; + return this; } /** - * Get the name property: The name of the resource. + * Get the name property: Azure resource name. * * @return the name value. */ - @Override public String name() { return this.name; } /** - * Get the id property: Fully qualified resource Id for the resource. + * Set the name property: Azure resource name. * - * @return the id value. + * @param name the name value to set. + * @return the WebtestsResource object itself. */ - @Override - public String id() { - return this.id; + WebtestsResource withName(String name) { + this.name = name; + return this; } /** - * {@inheritDoc} + * Get the type property: Azure resource type. + * + * @return the type value. */ - @Override - public WebtestsResource withLocation(String location) { - super.withLocation(location); + public String type() { + return this.type; + } + + /** + * Set the type property: Azure resource type. + * + * @param type the type value to set. + * @return the WebtestsResource object itself. + */ + WebtestsResource withType(String type) { + this.type = type; return this; } /** - * {@inheritDoc} + * Get the location property: Resource location. + * + * @return the location value. */ - @Override - public WebtestsResource withTags(Map tags) { - super.withTags(tags); + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the WebtestsResource object itself. + */ + public WebtestsResource withLocation(String location) { + this.location = location; return this; } /** - * Validates the instance. + * Get the tags property: Resource tags. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the tags value. */ - public void validate() { + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the WebtestsResource object itself. + */ + public WebtestsResource withTags(Map tags) { + this.tags = tags; + return this; } /** @@ -100,8 +154,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -121,17 +175,17 @@ public static WebtestsResource fromJson(JsonReader jsonReader) throws IOExceptio String fieldName = reader.getFieldName(); reader.nextToken(); - if ("id".equals(fieldName)) { + if ("location".equals(fieldName)) { + deserializedWebtestsResource.location = reader.getString(); + } else if ("id".equals(fieldName)) { deserializedWebtestsResource.id = reader.getString(); } else if ("name".equals(fieldName)) { deserializedWebtestsResource.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedWebtestsResource.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedWebtestsResource.withLocation(reader.getString()); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWebtestsResource.withTags(tags); + deserializedWebtestsResource.tags = tags; } else { reader.skipChildren(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfiguration.java index 396d0b882a19..a2654c4c6db0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfiguration.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfiguration.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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java index f3fd83a5b8ea..82c8353b27e3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java @@ -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.models; @@ -51,7 +51,7 @@ public final class WorkItemConfigurationError extends ManagementError { /** * Creates an instance of WorkItemConfigurationError class. */ - public WorkItemConfigurationError() { + private WorkItemConfigurationError() { } /** @@ -113,17 +113,6 @@ public String getCode() { return this.code; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (getInnererror() != null) { - getInnererror().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java index 474c83bc94b9..a116145908dc 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java @@ -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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java index 845922fb7249..a0ee9ae6ff9e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java @@ -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.models; @@ -46,8 +46,7 @@ public interface WorkItemConfigurations { * * @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. @@ -62,8 +61,7 @@ Response createWithResponse(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param 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/models/WorkItemCreateConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java index d1abbb980c6a..ddb3a66dafd6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java @@ -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.models; @@ -123,14 +123,6 @@ public WorkItemCreateConfiguration withWorkItemProperties(Map wo 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/models/Workbook.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbook.java index 60e1827f90bc..d11c30614723 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbook.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbook.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.models; @@ -73,7 +73,7 @@ public interface Workbook { String etag(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinition.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinition.java index a83796c301e1..dddda5f83f79 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinition.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinition.java @@ -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.models; @@ -51,7 +51,7 @@ public final class WorkbookErrorDefinition extends ManagementError { /** * Creates an instance of WorkbookErrorDefinition class. */ - public WorkbookErrorDefinition() { + private WorkbookErrorDefinition() { } /** @@ -113,17 +113,6 @@ public String getCode() { return this.code; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (getInnererror() != null) { - getInnererror().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinitionException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinitionException.java index 9fa1ed901b0e..5d78a0809292 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinitionException.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinitionException.java @@ -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.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookInnerErrorTrace.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookInnerErrorTrace.java index 59088201d819..b533afdcb357 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookInnerErrorTrace.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookInnerErrorTrace.java @@ -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.models; @@ -25,7 +25,7 @@ public final class WorkbookInnerErrorTrace implements JsonSerializable trace() { return this.trace; } - /** - * 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/models/WorkbookResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResource.java deleted file mode 100644 index 98943042c9d3..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResource.java +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * An azure resource object. - */ -@Fluent -public class WorkbookResource extends Resource { - /* - * Identity used for BYOS - */ - private WorkbookResourceIdentity identity; - - /* - * The kind of workbook. Only valid value is shared. - */ - private WorkbookSharedTypeKind kind; - - /* - * Resource etag - */ - private String etag; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of WorkbookResource class. - */ - public WorkbookResource() { - } - - /** - * Get the identity property: Identity used for BYOS. - * - * @return the identity value. - */ - public WorkbookResourceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Identity used for BYOS. - * - * @param identity the identity value to set. - * @return the WorkbookResource object itself. - */ - public WorkbookResource withIdentity(WorkbookResourceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the kind property: The kind of workbook. Only valid value is shared. - * - * @return the kind value. - */ - public WorkbookSharedTypeKind kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of workbook. Only valid value is shared. - * - * @param kind the kind value to set. - * @return the WorkbookResource object itself. - */ - public WorkbookResource withKind(WorkbookSharedTypeKind kind) { - this.kind = kind; - return this; - } - - /** - * Get the etag property: Resource etag. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: Resource etag. - * - * @param etag the etag value to set. - * @return the WorkbookResource object itself. - */ - public WorkbookResource withEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public WorkbookResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public WorkbookResource withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); - jsonWriter.writeStringField("etag", this.etag); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkbookResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkbookResource if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WorkbookResource. - */ - public static WorkbookResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkbookResource deserializedWorkbookResource = new WorkbookResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedWorkbookResource.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedWorkbookResource.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedWorkbookResource.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedWorkbookResource.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWorkbookResource.withTags(tags); - } else if ("identity".equals(fieldName)) { - deserializedWorkbookResource.identity = WorkbookResourceIdentity.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedWorkbookResource.kind = WorkbookSharedTypeKind.fromString(reader.getString()); - } else if ("etag".equals(fieldName)) { - deserializedWorkbookResource.etag = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkbookResource; - }); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResourceIdentity.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResourceIdentity.java index e4db78cae564..05bfe45ea31d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResourceIdentity.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResourceIdentity.java @@ -1,17 +1,15 @@ // 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.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; import java.io.IOException; import java.util.Map; -import java.util.UUID; /** * Identity used for BYOS. @@ -22,13 +20,13 @@ public final class WorkbookResourceIdentity extends ManagedServiceIdentity { * The tenant ID of the system assigned identity. This property will only be provided for a system assigned * identity. */ - private UUID tenantId; + private String tenantId; /* * The service principal ID of the system assigned identity. This property will only be provided for a system * assigned identity. */ - private UUID principalId; + private String principalId; /** * Creates an instance of WorkbookResourceIdentity class. @@ -43,7 +41,7 @@ public WorkbookResourceIdentity() { * @return the tenantId value. */ @Override - public UUID tenantId() { + public String tenantId() { return this.tenantId; } @@ -54,7 +52,7 @@ public UUID tenantId() { * @return the principalId value. */ @Override - public UUID principalId() { + public String principalId() { return this.principalId; } @@ -77,28 +75,6 @@ public WorkbookResourceIdentity withType(ManagedServiceIdentityType type) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model WorkbookResourceIdentity")); - } - if (userAssignedIdentities() != null) { - userAssignedIdentities().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WorkbookResourceIdentity.class); - /** * {@inheritDoc} */ @@ -131,11 +107,9 @@ public static WorkbookResourceIdentity fromJson(JsonReader jsonReader) throws IO deserializedWorkbookResourceIdentity .withType(ManagedServiceIdentityType.fromString(reader.getString())); } else if ("principalId".equals(fieldName)) { - deserializedWorkbookResourceIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedWorkbookResourceIdentity.principalId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedWorkbookResourceIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedWorkbookResourceIdentity.tenantId = reader.getString(); } else if ("userAssignedIdentities".equals(fieldName)) { Map userAssignedIdentities = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java index 8a48d23cfd44..ec90cedf93c7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java @@ -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.models; @@ -12,7 +12,7 @@ */ public final class WorkbookSharedTypeKind extends ExpandableStringEnum { /** - * Static value shared for WorkbookSharedTypeKind. + * shared. */ public static final WorkbookSharedTypeKind SHARED = fromString("shared"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplate.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplate.java index 275d6208ee23..0d3c1564d266 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplate.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplate.java @@ -1,10 +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.models; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner; import java.util.List; @@ -49,6 +50,13 @@ public interface WorkbookTemplate { */ Map tags(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the priority property: Priority of the template. Determines which template to open when a workbook gallery * is opened in viewer mode. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java index bd6537acc68b..6e61ba1780f1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java @@ -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.models; @@ -147,14 +147,6 @@ public WorkbookTemplateGallery withResourceType(String resourceType) { 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/models/WorkbookTemplateLocalizedGallery.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java index ee4c88d83ba7..a4734f2b1d9f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java @@ -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.models; @@ -73,24 +73,15 @@ public WorkbookTemplateLocalizedGallery withGalleries(List e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeUntypedField("templateData", this.templateData); + if (this.templateData != null) { + jsonWriter.writeUntypedField("templateData", this.templateData); + } jsonWriter.writeArrayField("galleries", this.galleries, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateResource.java deleted file mode 100644 index 0be0ae7b9aa5..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateResource.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * An azure resource object. - */ -@Fluent -public class WorkbookTemplateResource extends Resource { - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of WorkbookTemplateResource class. - */ - public WorkbookTemplateResource() { - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public WorkbookTemplateResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public WorkbookTemplateResource withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkbookTemplateResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkbookTemplateResource if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WorkbookTemplateResource. - */ - public static WorkbookTemplateResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkbookTemplateResource deserializedWorkbookTemplateResource = new WorkbookTemplateResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedWorkbookTemplateResource.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedWorkbookTemplateResource.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedWorkbookTemplateResource.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedWorkbookTemplateResource.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWorkbookTemplateResource.withTags(tags); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkbookTemplateResource; - }); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java index a4fa2a7d0d94..4a5b715fb870 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java @@ -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.models; @@ -184,17 +184,6 @@ public Map> localized() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java index 1744393a794b..0585467179dc 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java @@ -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.models; @@ -13,32 +13,33 @@ */ public interface WorkbookTemplates { /** - * 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}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + 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. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + WorkbookTemplate getByResourceGroup(String resourceGroupName, String resourceName); /** - * Get a single workbook template by its resourceName. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -46,46 +47,45 @@ public interface WorkbookTemplates { * @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 the {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Get a single workbook template by its resourceName. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @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. */ - WorkbookTemplate getByResourceGroup(String resourceGroupName, String resourceName); + void deleteByResourceGroup(String resourceGroupName, String resourceName); /** - * Delete a workbook template. + * 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 the {@link Response}. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedIterable}. */ - Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Delete a workbook template. + * 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 all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Get a single workbook template by its resourceName. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java index 62ca8285f8c3..b1e9a06c4d46 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java @@ -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.models; @@ -229,17 +229,6 @@ public WorkbookUpdateParameters withRevision(String revision) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java index 6bdaaaf62715..73774f57ef1f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java @@ -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.models; @@ -12,7 +12,7 @@ */ public final class WorkbookUpdateSharedTypeKind extends ExpandableStringEnum { /** - * Static value shared for WorkbookUpdateSharedTypeKind. + * shared. */ public static final WorkbookUpdateSharedTypeKind SHARED = fromString("shared"); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java index c2539ad6ce30..ea43bcdae0eb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java @@ -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.models; @@ -14,23 +14,10 @@ */ public interface Workbooks { /** - * 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}. - */ - 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. @@ -38,64 +25,40 @@ public interface Workbooks { * @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}. - */ - 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}. */ - PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category); + 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. */ - PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category, List tags, - String sourceId, Boolean canFetchContent, Context context); + Workbook getByResourceGroup(String resourceGroupName, String resourceName); /** - * Get a single workbook by its resourceName. + * 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 canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName along with {@link Response}. + * @return the {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Boolean canFetchContent, Context context); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Get a single workbook by its resourceName. + * 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. @@ -103,35 +66,38 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Stri * @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. */ - Workbook getByResourceGroup(String resourceGroupName, String resourceName); + void deleteByResourceGroup(String resourceGroupName, String resourceName); /** - * Delete a workbook. + * 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 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 the {@link Response}. + * @return all Workbooks defined within a specified subscription and category as paginated response with + * {@link PagedIterable}. */ - Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); + PagedIterable list(CategoryType category); /** - * Delete a workbook. + * 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 all Workbooks defined within a specified subscription and category as paginated response with + * {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); + PagedIterable list(CategoryType category, List tags, Boolean canFetchContent, Context context); /** * Get the revisions for the workbook defined by its resourceName. @@ -192,6 +158,40 @@ Response revisionGetWithResponse(String resourceGroupName, String reso */ Workbook 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}. + */ + 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}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category, List tags, + String sourceId, Boolean canFetchContent, Context context); + /** * Get a single workbook by its resourceName. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/package-info.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/package-info.java index ce6423194d94..76e4c5f19ee9 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/package-info.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/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 data models for ApplicationInsightsManagementClient. - * Composite Swagger for Application Insights Management Client. + * Package containing the data models for ApplicationInsights. + * Azure Application Insights client for saved items. */ package com.azure.resourcemanager.applicationinsights.models; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/package-info.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/package-info.java index ebd7e89cc4b2..ba8479ea36bc 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/package-info.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/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 classes for ApplicationInsightsManagementClient. - * Composite Swagger for Application Insights Management Client. + * Package containing the classes for ApplicationInsights. + * Azure Application Insights client for saved items. */ package com.azure.resourcemanager.applicationinsights; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/module-info.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/module-info.java index 74c69e07e646..f2b5798616ba 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/module-info.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/module-info.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. module com.azure.resourcemanager.applicationinsights { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.applicationinsights.fluent.models to com.azure.core; opens com.azure.resourcemanager.applicationinsights.models to com.azure.core; + opens com.azure.resourcemanager.applicationinsights.implementation.models to com.azure.core; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/resources/META-INF/azure-resourcemanager-applicationinsights_metadata.json b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/resources/META-INF/azure-resourcemanager-applicationinsights_metadata.json new file mode 100644 index 000000000000..5a18f938c461 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/resources/META-INF/azure-resourcemanager-applicationinsights_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"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"},"crossLanguageDefinitions":{"com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient":"AnalyticsItems","com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient.delete":"AnalyticsItems.AnalyticsItemsOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient.deleteWithResponse":"AnalyticsItems.AnalyticsItemsOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient.get":"AnalyticsItems.AnalyticsItemsOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient.getWithResponse":"AnalyticsItems.AnalyticsItemsOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient.list":"AnalyticsItems.AnalyticsItemsOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient.listWithResponse":"AnalyticsItems.AnalyticsItemsOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient.put":"AnalyticsItems.AnalyticsItemsOperationGroup.put","com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient.putWithResponse":"AnalyticsItems.AnalyticsItemsOperationGroup.put","com.azure.resourcemanager.applicationinsights.fluent.AnnotationsClient":"ComponentAPIs","com.azure.resourcemanager.applicationinsights.fluent.AnnotationsClient.create":"ComponentAPIs.AnnotationsOperationGroup.create","com.azure.resourcemanager.applicationinsights.fluent.AnnotationsClient.createWithResponse":"ComponentAPIs.AnnotationsOperationGroup.create","com.azure.resourcemanager.applicationinsights.fluent.AnnotationsClient.delete":"ComponentAPIs.AnnotationsOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.AnnotationsClient.deleteWithResponse":"ComponentAPIs.AnnotationsOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.AnnotationsClient.get":"ComponentAPIs.AnnotationsOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.AnnotationsClient.getWithResponse":"ComponentAPIs.AnnotationsOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.AnnotationsClient.list":"ComponentAPIs.AnnotationsOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.ApiKeysClient":"ComponentAPIs","com.azure.resourcemanager.applicationinsights.fluent.ApiKeysClient.create":"ComponentAPIs.APIKeysOperationGroup.create","com.azure.resourcemanager.applicationinsights.fluent.ApiKeysClient.createWithResponse":"ComponentAPIs.APIKeysOperationGroup.create","com.azure.resourcemanager.applicationinsights.fluent.ApiKeysClient.delete":"ComponentAPIs.APIKeysOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.ApiKeysClient.deleteWithResponse":"ComponentAPIs.APIKeysOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.ApiKeysClient.get":"ComponentAPIs.APIKeysOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ApiKeysClient.getWithResponse":"ComponentAPIs.APIKeysOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ApiKeysClient.list":"ComponentAPIs.APIKeysOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.ApplicationInsightsManagementClient":"ApplicationInsightsManagementClient","com.azure.resourcemanager.applicationinsights.fluent.ComponentAvailableFeaturesClient":"ComponentAPIs","com.azure.resourcemanager.applicationinsights.fluent.ComponentAvailableFeaturesClient.get":"ComponentAPIs.ComponentAvailableFeaturesOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentAvailableFeaturesClient.getWithResponse":"ComponentAPIs.ComponentAvailableFeaturesOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentCurrentBillingFeaturesClient":"ComponentAPIs","com.azure.resourcemanager.applicationinsights.fluent.ComponentCurrentBillingFeaturesClient.get":"ComponentAPIs.ComponentCurrentBillingFeaturesOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentCurrentBillingFeaturesClient.getWithResponse":"ComponentAPIs.ComponentCurrentBillingFeaturesOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentCurrentBillingFeaturesClient.update":"ComponentAPIs.ComponentCurrentBillingFeaturesOperationGroup.update","com.azure.resourcemanager.applicationinsights.fluent.ComponentCurrentBillingFeaturesClient.updateWithResponse":"ComponentAPIs.ComponentCurrentBillingFeaturesOperationGroup.update","com.azure.resourcemanager.applicationinsights.fluent.ComponentFeatureCapabilitiesClient":"ComponentAPIs","com.azure.resourcemanager.applicationinsights.fluent.ComponentFeatureCapabilitiesClient.get":"ComponentAPIs.ComponentFeatureCapabilitiesOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentFeatureCapabilitiesClient.getWithResponse":"ComponentAPIs.ComponentFeatureCapabilitiesOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient":"ComponentLinkedStorageAccountApi","com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient.createAndUpdate":"ComponentLinkedStorageAccountApi.ComponentLinkedStorageAccountsOperationGroup.createAndUpdate","com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient.createAndUpdateWithResponse":"ComponentLinkedStorageAccountApi.ComponentLinkedStorageAccountsOperationGroup.createAndUpdate","com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient.delete":"ComponentLinkedStorageAccountApi.ComponentLinkedStorageAccountsOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient.deleteWithResponse":"ComponentLinkedStorageAccountApi.ComponentLinkedStorageAccountsOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient.get":"ComponentLinkedStorageAccountApi.ComponentLinkedStorageAccountsOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient.getWithResponse":"ComponentLinkedStorageAccountApi.ComponentLinkedStorageAccountsOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient.update":"ComponentLinkedStorageAccountApi.ComponentLinkedStorageAccountsOperationGroup.update","com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient.updateWithResponse":"ComponentLinkedStorageAccountApi.ComponentLinkedStorageAccountsOperationGroup.update","com.azure.resourcemanager.applicationinsights.fluent.ComponentQuotaStatusClient":"ComponentAPIs","com.azure.resourcemanager.applicationinsights.fluent.ComponentQuotaStatusClient.get":"ComponentAPIs.ComponentQuotaStatusOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentQuotaStatusClient.getWithResponse":"ComponentAPIs.ComponentQuotaStatusOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient":"Components","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.createOrUpdate":"Components.ApplicationInsightsComponents.createOrUpdate","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.createOrUpdateWithResponse":"Components.ApplicationInsightsComponents.createOrUpdate","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.delete":"Components.ApplicationInsightsComponents.delete","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.deleteWithResponse":"Components.ApplicationInsightsComponents.delete","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.getByResourceGroup":"Components.ApplicationInsightsComponents.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.getByResourceGroupWithResponse":"Components.ApplicationInsightsComponents.get","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.getPurgeStatus":"Components.ComponentPurgeStatusOperationGroup.getPurgeStatus","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.getPurgeStatusWithResponse":"Components.ComponentPurgeStatusOperationGroup.getPurgeStatus","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.list":"Components.ApplicationInsightsComponents.list","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.listByResourceGroup":"Components.ApplicationInsightsComponents.listByResourceGroup","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.purge":"Components.ApplicationInsightsComponents.purge","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.purgeWithResponse":"Components.ApplicationInsightsComponents.purge","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.updateTags":"Components.ApplicationInsightsComponents.updateTags","com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient.updateTagsWithResponse":"Components.ApplicationInsightsComponents.updateTags","com.azure.resourcemanager.applicationinsights.fluent.DeletedWorkbooksClient":"DeletedWorkbookApi","com.azure.resourcemanager.applicationinsights.fluent.DeletedWorkbooksClient.list":"DeletedWorkbookApi.DeletedWorkbooksOperationGroup.listBySubscription","com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient":"ComponentAPIs","com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient.create":"ComponentAPIs.ExportConfigurationsOperationGroup.create","com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient.createWithResponse":"ComponentAPIs.ExportConfigurationsOperationGroup.create","com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient.delete":"ComponentAPIs.ExportConfigurationsOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient.deleteWithResponse":"ComponentAPIs.ExportConfigurationsOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient.get":"ComponentAPIs.ExportConfigurationsOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient.getWithResponse":"ComponentAPIs.ExportConfigurationsOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient.list":"ComponentAPIs.ExportConfigurationsOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient.listWithResponse":"ComponentAPIs.ExportConfigurationsOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient.update":"ComponentAPIs.ExportConfigurationsOperationGroup.update","com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient.updateWithResponse":"ComponentAPIs.ExportConfigurationsOperationGroup.update","com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient":"Favorites","com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient.add":"Favorites.FavoritesOperationGroup.add","com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient.addWithResponse":"Favorites.FavoritesOperationGroup.add","com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient.delete":"Favorites.FavoritesOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient.deleteWithResponse":"Favorites.FavoritesOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient.get":"Favorites.FavoritesOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient.getWithResponse":"Favorites.FavoritesOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient.list":"Favorites.FavoritesOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient.listWithResponse":"Favorites.FavoritesOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient.update":"Favorites.FavoritesOperationGroup.update","com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient.updateWithResponse":"Favorites.FavoritesOperationGroup.update","com.azure.resourcemanager.applicationinsights.fluent.LiveTokensClient":"LiveTokenApi","com.azure.resourcemanager.applicationinsights.fluent.LiveTokensClient.get":"LiveTokenApi.LiveTokenOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.LiveTokensClient.getWithResponse":"LiveTokenApi.LiveTokenOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.OperationsClient":"WorkBookOperations.Operations","com.azure.resourcemanager.applicationinsights.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.applicationinsights.fluent.ProactiveDetectionConfigurationsClient":"ComponentAPIs","com.azure.resourcemanager.applicationinsights.fluent.ProactiveDetectionConfigurationsClient.get":"ComponentAPIs.ProactiveDetectionConfigurationsOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ProactiveDetectionConfigurationsClient.getWithResponse":"ComponentAPIs.ProactiveDetectionConfigurationsOperationGroup.get","com.azure.resourcemanager.applicationinsights.fluent.ProactiveDetectionConfigurationsClient.list":"ComponentAPIs.ProactiveDetectionConfigurationsOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.ProactiveDetectionConfigurationsClient.listWithResponse":"ComponentAPIs.ProactiveDetectionConfigurationsOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.ProactiveDetectionConfigurationsClient.update":"ComponentAPIs.ProactiveDetectionConfigurationsOperationGroup.update","com.azure.resourcemanager.applicationinsights.fluent.ProactiveDetectionConfigurationsClient.updateWithResponse":"ComponentAPIs.ProactiveDetectionConfigurationsOperationGroup.update","com.azure.resourcemanager.applicationinsights.fluent.WebTestLocationsClient":"WebTestLocation","com.azure.resourcemanager.applicationinsights.fluent.WebTestLocationsClient.list":"WebTestLocation.webTestLocationsOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient":"WebTestsApi.WebTests","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient.createOrUpdate":"WebTestsApi.WebTests.createOrUpdate","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient.createOrUpdateWithResponse":"WebTestsApi.WebTests.createOrUpdate","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient.delete":"WebTestsApi.WebTests.delete","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient.deleteWithResponse":"WebTestsApi.WebTests.delete","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient.getByResourceGroup":"WebTestsApi.WebTests.get","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient.getByResourceGroupWithResponse":"WebTestsApi.WebTests.get","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient.list":"WebTestsApi.WebTests.list","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient.listByComponent":"WebTestsApi.WebTestsOperationGroup.listByComponent","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient.listByResourceGroup":"WebTestsApi.WebTests.listByResourceGroup","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient.updateTags":"WebTestsApi.WebTests.updateTags","com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient.updateTagsWithResponse":"WebTestsApi.WebTests.updateTags","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient":"ComponentAPIs","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient.create":"ComponentAPIs.WorkItemConfigurationsOperationGroup.create","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient.createWithResponse":"ComponentAPIs.WorkItemConfigurationsOperationGroup.create","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient.delete":"ComponentAPIs.WorkItemConfigurationsOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient.deleteWithResponse":"ComponentAPIs.WorkItemConfigurationsOperationGroup.delete","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient.getDefault":"ComponentAPIs.WorkItemConfigurationsOperationGroup.getDefault","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient.getDefaultWithResponse":"ComponentAPIs.WorkItemConfigurationsOperationGroup.getDefault","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient.getItem":"ComponentAPIs.WorkItemConfigurationsOperationGroup.getItem","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient.getItemWithResponse":"ComponentAPIs.WorkItemConfigurationsOperationGroup.getItem","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient.list":"ComponentAPIs.WorkItemConfigurationsOperationGroup.list","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient.updateItem":"ComponentAPIs.WorkItemConfigurationsOperationGroup.updateItem","com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient.updateItemWithResponse":"ComponentAPIs.WorkItemConfigurationsOperationGroup.updateItem","com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient":"WorkbookTemplatesApi.WorkbookTemplates","com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient.createOrUpdate":"WorkbookTemplatesApi.WorkbookTemplates.createOrUpdate","com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient.createOrUpdateWithResponse":"WorkbookTemplatesApi.WorkbookTemplates.createOrUpdate","com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient.delete":"WorkbookTemplatesApi.WorkbookTemplates.delete","com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient.deleteWithResponse":"WorkbookTemplatesApi.WorkbookTemplates.delete","com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient.getByResourceGroup":"WorkbookTemplatesApi.WorkbookTemplates.get","com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient.getByResourceGroupWithResponse":"WorkbookTemplatesApi.WorkbookTemplates.get","com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient.listByResourceGroup":"WorkbookTemplatesApi.WorkbookTemplates.listByResourceGroup","com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient.update":"WorkbookTemplatesApi.WorkbookTemplates.update","com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient.updateWithResponse":"WorkbookTemplatesApi.WorkbookTemplates.update","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient":"WorkbooksApi.Workbooks","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.createOrUpdate":"WorkbooksApi.Workbooks.createOrUpdate","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.createOrUpdateWithResponse":"WorkbooksApi.Workbooks.createOrUpdate","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.delete":"WorkbooksApi.Workbooks.delete","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.deleteWithResponse":"WorkbooksApi.Workbooks.delete","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.getByResourceGroup":"WorkbooksApi.Workbooks.get","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.getByResourceGroupWithResponse":"WorkbooksApi.Workbooks.get","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.list":"WorkbooksApi.Workbooks.listBySubscription","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.listByResourceGroup":"WorkbooksApi.WorkbookOperationGroup.listByResourceGroup","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.revisionGet":"WorkbooksApi.WorkbookOperationGroup.revisionGet","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.revisionGetWithResponse":"WorkbooksApi.WorkbookOperationGroup.revisionGet","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.revisionsList":"WorkbooksApi.Workbooks.revisionsList","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.update":"WorkbooksApi.Workbooks.update","com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient.updateWithResponse":"WorkbooksApi.Workbooks.update","com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner":"ComponentAPIs.Annotation","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner":"AnalyticsItems.ApplicationInsightsComponentAnalyticsItem","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner":"ComponentAPIs.ApplicationInsightsComponentAPIKey","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner":"ComponentAPIs.ApplicationInsightsComponentAvailableFeatures","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner":"ComponentAPIs.ApplicationInsightsComponentBillingFeatures","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentExportConfigurationInner":"ComponentAPIs.ApplicationInsightsComponentExportConfiguration","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner":"Favorites.ApplicationInsightsComponentFavorite","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner":"ComponentAPIs.ApplicationInsightsComponentFeatureCapabilities","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentInner":"Components.ApplicationInsightsComponent","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner":"ComponentAPIs.ApplicationInsightsComponentProactiveDetectionConfiguration","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProperties":"Components.ApplicationInsightsComponentProperties","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner":"ComponentAPIs.ApplicationInsightsComponentQuotaStatus","com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner":"WebTestLocation.ApplicationInsightsComponentWebTestLocation","com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner":"ComponentLinkedStorageAccountApi.ComponentLinkedStorageAccounts","com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeResponseInner":"Components.ComponentPurgeResponse","com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeStatusResponseInner":"Components.ComponentPurgeStatusResponse","com.azure.resourcemanager.applicationinsights.fluent.models.DeletedWorkbookInner":"DeletedWorkbookApi.DeletedWorkbook","com.azure.resourcemanager.applicationinsights.fluent.models.DeletedWorkbookProperties":"DeletedWorkbookApi.DeletedWorkbookProperties","com.azure.resourcemanager.applicationinsights.fluent.models.LinkedStorageAccountsProperties":"ComponentLinkedStorageAccountApi.LinkedStorageAccountsProperties","com.azure.resourcemanager.applicationinsights.fluent.models.LiveTokenResponseInner":"LiveTokenApi.LiveTokenResponse","com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner":"WorkBookOperations.Operation","com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner":"WebTestsApi.WebTest","com.azure.resourcemanager.applicationinsights.fluent.models.WebTestProperties":"WebTestsApi.WebTestProperties","com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner":"ComponentAPIs.WorkItemConfiguration","com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner":"WorkbooksApi.Workbook","com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookProperties":"WorkbooksApi.WorkbookProperties","com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookPropertiesUpdateParameters":"WorkbooksApi.WorkbookPropertiesUpdateParameters","com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner":"WorkbookTemplatesApi.WorkbookTemplate","com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateProperties":"WorkbookTemplatesApi.WorkbookTemplateProperties","com.azure.resourcemanager.applicationinsights.implementation.ApplicationInsightsManagementClientBuilder":"ApplicationInsightsManagementClient","com.azure.resourcemanager.applicationinsights.implementation.models.AnnotationsListResult":"ComponentAPIs.AnnotationsListResult","com.azure.resourcemanager.applicationinsights.implementation.models.ApplicationInsightsComponentAPIKeyListResult":"ComponentAPIs.ApplicationInsightsComponentAPIKeyListResult","com.azure.resourcemanager.applicationinsights.implementation.models.ApplicationInsightsComponentListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.applicationinsights.implementation.models.ApplicationInsightsWebTestLocationsListResult":"WebTestLocation.ApplicationInsightsWebTestLocationsListResult","com.azure.resourcemanager.applicationinsights.implementation.models.DeletedWorkbooksListResult":"DeletedWorkbookApi.DeletedWorkbooksListResult","com.azure.resourcemanager.applicationinsights.implementation.models.OperationListResult":"WorkBookOperations.OperationListResult","com.azure.resourcemanager.applicationinsights.implementation.models.WebTestListResult":"WebTestsApi.webTestListResult","com.azure.resourcemanager.applicationinsights.implementation.models.WorkItemConfigurationsListResult":"ComponentAPIs.WorkItemConfigurationsListResult","com.azure.resourcemanager.applicationinsights.implementation.models.WorkbookTemplatesListResult":"WorkbookTemplatesApi.WorkbookTemplatesListResult","com.azure.resourcemanager.applicationinsights.implementation.models.WorkbooksListResult":"WorkbooksApi.WorkbooksListResult","com.azure.resourcemanager.applicationinsights.models.AnnotationError":"ComponentAPIs.AnnotationError","com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest":"ComponentAPIs.APIKeyRequest","com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAnalyticsItemProperties":"AnalyticsItems.ApplicationInsightsComponentAnalyticsItemProperties","com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap":"ComponentAPIs.ApplicationInsightsComponentDataVolumeCap","com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest":"ComponentAPIs.ApplicationInsightsComponentExportRequest","com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFeature":"ComponentAPIs.ApplicationInsightsComponentFeature","com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFeatureCapability":"ComponentAPIs.ApplicationInsightsComponentFeatureCapability","com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions":"ComponentAPIs.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions","com.azure.resourcemanager.applicationinsights.models.ApplicationType":"Components.ApplicationType","com.azure.resourcemanager.applicationinsights.models.CategoryType":"ApplicationInsightsCommonTypes.CategoryType","com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsPatch":"ComponentLinkedStorageAccountApi.ComponentLinkedStorageAccountsPatch","com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBody":"Components.ComponentPurgeBody","com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBodyFilters":"Components.ComponentPurgeBodyFilters","com.azure.resourcemanager.applicationinsights.models.ComponentsResource":"Components.ComponentsResource","com.azure.resourcemanager.applicationinsights.models.DeletedWorkbookErrorDefinition":"DeletedWorkbookApi.DeletedWorkbookError","com.azure.resourcemanager.applicationinsights.models.DeletedWorkbookInnerErrorTrace":"DeletedWorkbookApi.DeletedWorkbookInnerErrorTrace","com.azure.resourcemanager.applicationinsights.models.DeletedWorkbookResource":"DeletedWorkbookApi.DeletedWorkbookResource","com.azure.resourcemanager.applicationinsights.models.FavoriteSourceType":"Favorites.FavoriteSourceType","com.azure.resourcemanager.applicationinsights.models.FavoriteType":"Favorites.FavoriteType","com.azure.resourcemanager.applicationinsights.models.FlowType":"Components.FlowType","com.azure.resourcemanager.applicationinsights.models.HeaderField":"WebTestsApi.HeaderField","com.azure.resourcemanager.applicationinsights.models.IngestionMode":"Components.IngestionMode","com.azure.resourcemanager.applicationinsights.models.InnerError":"ComponentAPIs.InnerError","com.azure.resourcemanager.applicationinsights.models.ItemScope":"AnalyticsItems.ItemScope","com.azure.resourcemanager.applicationinsights.models.ItemScopePath":"AnalyticsItems.ItemScopePath","com.azure.resourcemanager.applicationinsights.models.ItemType":"AnalyticsItems.ItemType","com.azure.resourcemanager.applicationinsights.models.ItemTypeParameter":"AnalyticsItems.ItemTypeParameter","com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.applicationinsights.models.OperationDisplay":"WorkBookOperations.OperationDisplay","com.azure.resourcemanager.applicationinsights.models.PrivateLinkScopedResource":"Components.PrivateLinkScopedResource","com.azure.resourcemanager.applicationinsights.models.PublicNetworkAccessType":"Components.PublicNetworkAccessType","com.azure.resourcemanager.applicationinsights.models.PurgeState":"Components.PurgeState","com.azure.resourcemanager.applicationinsights.models.RequestSource":"Components.RequestSource","com.azure.resourcemanager.applicationinsights.models.StorageType":"ComponentLinkedStorageAccountApi.StorageType","com.azure.resourcemanager.applicationinsights.models.TagsResource":"ApplicationInsightsCommonTypes.TagsResource","com.azure.resourcemanager.applicationinsights.models.TrackedResource":"Azure.ResourceManager.CommonTypes.TrackedResource","com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation":"WebTestsApi.WebTestGeolocation","com.azure.resourcemanager.applicationinsights.models.WebTestKind":"WebTestsApi.WebTestKind","com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration":"WebTestsApi.WebTestPropertiesConfiguration","com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesRequest":"WebTestsApi.WebTestPropertiesRequest","com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRules":"WebTestsApi.WebTestPropertiesValidationRules","com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRulesContentValidation":"WebTestsApi.WebTestPropertiesValidationRulesContentValidation","com.azure.resourcemanager.applicationinsights.models.WebtestsResource":"WebTestsApi.WebtestsResource","com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationError":"ComponentAPIs.WorkItemConfigurationError","com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration":"ComponentAPIs.WorkItemCreateConfiguration","com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinition":"WorkbooksApi.WorkbookError","com.azure.resourcemanager.applicationinsights.models.WorkbookInnerErrorTrace":"WorkbooksApi.WorkbookInnerErrorTrace","com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity":"WorkbooksApi.WorkbookResourceIdentity","com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind":"ApplicationInsightsCommonTypes.WorkbookSharedTypeKind","com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery":"WorkbookTemplatesApi.WorkbookTemplateGallery","com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery":"WorkbookTemplatesApi.WorkbookTemplateLocalizedGallery","com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateUpdateParameters":"WorkbookTemplatesApi.WorkbookTemplateUpdateParameters","com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateParameters":"WorkbooksApi.WorkbookUpdateParameters","com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateSharedTypeKind":"WorkbooksApi.WorkbookUpdateSharedTypeKind"},"generatedFiles":["src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApplicationInsightsManagementClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/DeletedWorkbooksClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/LiveTokensClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestLocationsClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbooksClient.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/DeletedWorkbookInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/DeletedWorkbookProperties.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestProperties.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookProperties.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateProperties.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/applicationinsights/fluent/package-info.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAnalyticsItemImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentApiKeyImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAvailableFeaturesImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentBillingFeaturesImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentExportConfigurationImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFavoriteImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFeatureCapabilitiesImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentProactiveDetectionConfigurationImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentQuotaStatusImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentWebTestLocationImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeResponseImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbookImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbooksClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/DeletedWorkbooksImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokenResponseImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksImpl.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/AnnotationsListResult.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsComponentAPIKeyListResult.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsComponentListResult.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/ApplicationInsightsWebTestLocationsListResult.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/DeletedWorkbooksListResult.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WebTestListResult.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkItemConfigurationsListResult.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkbookTemplatesListResult.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/models/WorkbooksListResult.java","src/main/java/com/azure/resourcemanager/applicationinsights/implementation/package-info.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotation.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItem.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKey.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAvailableFeatures.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentBillingFeatures.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportConfiguration.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFavorite.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapabilities.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfiguration.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentQuotaStatus.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentWebTestLocation.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccounts.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsOperations.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsPatch.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeResponse.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeStatusResponse.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentsResource.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbook.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookErrorDefinition.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookErrorDefinitionException.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookInnerErrorTrace.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbookResource.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/DeletedWorkbooks.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteType.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/Favorites.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/HeaderField.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokenResponse.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokens.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/Operation.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/PublicNetworkAccessType.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/PurgeState.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/TrackedResource.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestLocations.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesRequest.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRules.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRulesContentValidation.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WebtestsResource.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfiguration.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbook.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinition.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinitionException.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookInnerErrorTrace.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResourceIdentity.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplate.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java","src/main/java/com/azure/resourcemanager/applicationinsights/models/package-info.java","src/main/java/com/azure/resourcemanager/applicationinsights/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteSamples.java index ac5359953e15..005acc8b391f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteSamples.java @@ -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.generated; @@ -11,9 +11,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetSamples.java index 13c8fb84a715..c197d05007c7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetSamples.java @@ -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.generated; @@ -11,9 +11,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListSamples.java index 02f64017befa..3f76f26cb3f5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListSamples.java @@ -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.generated; @@ -11,9 +11,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutSamples.java index 30d4106645ac..878033d014e5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutSamples.java @@ -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.generated; @@ -14,9 +14,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateSamples.java index f321f058a0a7..737cfbb05cf6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateSamples.java @@ -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.generated; @@ -12,9 +12,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java index b56ddc7b76c8..7800820e171b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java index 7883b54a87a1..45fb1e3ebb90 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java index e3310c1f03ce..136ac3330548 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysCreateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysCreateSamples.java index 3a14ab565877..30d12e6630e3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysCreateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysCreateSamples.java @@ -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.generated; @@ -12,9 +12,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java index de9b72fd872a..7bcfb27c8455 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java index e94d022104e4..33b8e42e1075 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java @@ -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.generated; @@ -9,8 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java index 4093426bb4fc..8396cac7189e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java @@ -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.generated; @@ -9,8 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetSamples.java index 51da19089578..9e165377ee02 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java index fa11a1df80c8..deb6c2445431 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateSamples.java index c40156c142e2..1b5338b98993 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateSamples.java @@ -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.generated; @@ -13,9 +13,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java index b82f6fb70f3c..ff3007aac1e2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationCreateAndUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationCreateAndUpdateSamples.java deleted file mode 100644 index 9a6eccd77785..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationCreateAndUpdateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -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(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationDeleteSamples.java deleted file mode 100644 index 019797766753..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationDeleteSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationGetSamples.java deleted file mode 100644 index 1fa7323ecfae..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationGetSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationUpdateSamples.java deleted file mode 100644 index 7c8219dc863c..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -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(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetSamples.java index 82b10b69a4d3..582bce6a5f34 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsCreateOrUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsCreateOrUpdateSamples.java index 88ee05678064..73cf11156228 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsCreateOrUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsCreateOrUpdateSamples.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.generated; @@ -15,9 +15,7 @@ */ 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. @@ -40,9 +38,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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteSamples.java index 9cc1e7491cf8..f07463611b77 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java index 2b00730431e0..a920ef21656f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java index 9f62d7e31e93..f8c199412d4a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java index 617244283df0..e91ad65fa9c3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java index 8332c3ac282b..4a3c083f5f6b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsPurgeSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsPurgeSamples.java index 97503be6a374..f6e517e6fb3a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsPurgeSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsPurgeSamples.java @@ -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.generated; @@ -13,9 +13,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsUpdateTagsSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsUpdateTagsSamples.java index 75ca1fcfd4c1..ef067ef1a76e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsUpdateTagsSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsUpdateTagsSamples.java @@ -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.generated; @@ -13,9 +13,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbooksListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbooksListSamples.java deleted file mode 100644 index 4a02c5ab775c..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbooksListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * 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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsCreateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsCreateSamples.java index 26bfbfa7e31b..3365d4b1e884 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsCreateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsCreateSamples.java @@ -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.generated; @@ -11,9 +11,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java index 8e84d112db48..adacbfd3c144 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java index 3278f01401c8..881d15224686 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java index f63bade5acb1..6ba9dc75a9fe 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsUpdateSamples.java index 6ed10b670de7..246e0e5456b1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsUpdateSamples.java @@ -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.generated; @@ -11,9 +11,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddSamples.java index cea94ec1f2e5..f4a0ec19e8ce 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddSamples.java @@ -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.generated; @@ -13,8 +13,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java index 8ecc05ced440..896dfed3a839 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java index cd1483278f3a..370f912a2499 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java @@ -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.generated; @@ -9,8 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java index 4213bcd970ee..fd07f3945e60 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateSamples.java index 6081f35e46f8..44f4da57f5e0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateSamples.java @@ -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.generated; @@ -13,9 +13,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/LiveTokenGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/LiveTokenGetSamples.java deleted file mode 100644 index 676a8a6933e8..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/LiveTokenGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * 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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetSamples.java index 4221af3b30d9..15d2b659985a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java index 8be96412f99b..7e8a27750ecc 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateSamples.java index 2bdebd026986..068fa49e4f80 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateSamples.java @@ -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.generated; @@ -13,9 +13,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java index 6fbc7be78f07..60aa9caaa16f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ 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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsCreateOrUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsCreateOrUpdateSamples.java deleted file mode 100644 index 86d76cc58b5a..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsCreateOrUpdateSamples.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.resourcemanager.applicationinsights.models.HeaderField; -import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation; -import com.azure.resourcemanager.applicationinsights.models.WebTestKind; -import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration; -import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesRequest; -import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRules; -import java.util.Arrays; - -/** - * Samples for WebTests CreateOrUpdate. - */ -public final class WebTestsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/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(); - } - - /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/ - * WebTestCreateStandard.json - */ - /** - * Sample code: webTestCreateStandard. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void - webTestCreateStandard(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests() - .define("my-webtest-my-component") - .withRegion("South Central US") - .withExistingResourceGroup("my-resource-group") - .withSyntheticMonitorId("my-webtest-my-component") - .withWebTestName("my-webtest-my-component") - .withDescription("Ping web test alert for mytestwebapp") - .withEnabled(true) - .withFrequency(900) - .withTimeout(120) - .withWebTestKind(WebTestKind.STANDARD) - .withRetryEnabled(true) - .withLocations(Arrays.asList(new WebTestGeolocation().withLocation("us-fl-mia-edge"))) - .withRequest(new WebTestPropertiesRequest().withRequestUrl("https://bing.com") - .withHeaders(Arrays.asList( - new HeaderField().withHeaderFieldName("fakeTokenPlaceholder").withHeaderFieldValue("de-DE"), - new HeaderField().withHeaderFieldName("fakeTokenPlaceholder").withHeaderFieldValue("de-DE"))) - .withHttpVerb("POST") - .withRequestBody("SGVsbG8gd29ybGQ=")) - .withValidationRules( - new WebTestPropertiesValidationRules().withSslCheck(true).withSslCertRemainingLifetimeCheck(100)) - .create(); - } - - /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestUpdate. - * json - */ - /** - * Sample code: webTestUpdate. - * - * @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(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteSamples.java deleted file mode 100644 index dcd5d343733e..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * 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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsGetByResourceGroupSamples.java deleted file mode 100644 index e78af56e9ffb..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsGetByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * Samples for WebTests GetByResourceGroup. - */ -public final class WebTestsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestGet.json - */ - /** - * Sample code: webTestGet. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void webTestGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests() - .getByResourceGroupWithResponse("my-resource-group", "my-webtest-01-mywebservice", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByComponentSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByComponentSamples.java deleted file mode 100644 index 82243da3a38c..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByComponentSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * Samples for WebTests ListByComponent. - */ -public final class WebTestsListByComponentSamples { - /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/ - * WebTestListByComponent.json - */ - /** - * Sample code: webTestListByComponent. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void - webTestListByComponent(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests().listByComponent("my-component", "my-resource-group", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByResourceGroupSamples.java deleted file mode 100644 index d6aeac58b88f..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * Samples for WebTests ListByResourceGroup. - */ -public final class WebTestsListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/ - * WebTestListByResourceGroup.json - */ - /** - * Sample code: webTestListByResourceGroup. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void - webTestListByResourceGroup(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListSamples.java deleted file mode 100644 index 31c79c28c23e..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * Samples for WebTests List. - */ -public final class WebTestsListSamples { - /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestList.json - */ - /** - * Sample code: webTestList. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void webTestList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsUpdateTagsSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsUpdateTagsSamples.java deleted file mode 100644 index 8728df57745e..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsUpdateTagsSamples.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.resourcemanager.applicationinsights.models.WebTest; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for WebTests UpdateTags. - */ -public final class WebTestsUpdateTagsSamples { - /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/ - * WebTestUpdateTagsOnly.json - */ - /** - * Sample code: webTestUpdateTags. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void - webTestUpdateTags(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - WebTest resource = manager.webTests() - .getByResourceGroupWithResponse("my-resource-group", "my-webtest-my-component", - 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(); - } - - // 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; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateSamples.java index 3a09da3e5674..1b5fa2c51486 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateSamples.java @@ -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.generated; @@ -13,9 +13,7 @@ */ public final class WorkItemConfigurationsCreateSamples { /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ - * WorkItemConfigCreate.json + * x-ms-original-file: 2015-05-01/WorkItemConfigCreate.json */ /** * Sample code: WorkItemConfigurationsCreate. @@ -30,7 +28,8 @@ public final class WorkItemConfigurationsCreateSamples { .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); + .withWorkItemProperties(mapOf("name", "Title", "value", "Validate Only Title")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteSamples.java index 9caf9a9b2050..540b3d21095b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ public final class WorkItemConfigurationsDeleteSamples { /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ - * WorkItemConfigDelete.json + * x-ms-original-file: 2015-05-01/WorkItemConfigDelete.json */ /** * Sample code: WorkItemConfigurationDelete. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultSamples.java index 76e14cdaaa7a..9d4cd4b5ee5a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ public final class WorkItemConfigurationsGetDefaultSamples { /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ - * WorkItemConfigDefaultGet.json + * x-ms-original-file: 2015-05-01/WorkItemConfigDefaultGet.json */ /** * Sample code: WorkItemConfigurationsGetDefault. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java index da2b9d44e917..92ebf5ce7f57 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ public final class WorkItemConfigurationsGetItemSamples { /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ - * WorkItemConfigGet.json + * x-ms-original-file: 2015-05-01/WorkItemConfigGet.json */ /** * Sample code: WorkItemConfigurationsGetDefault. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java index a37b43c77f54..8b59ab9d548b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java @@ -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.generated; @@ -9,9 +9,7 @@ */ public final class WorkItemConfigurationsListSamples { /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ - * WorkItemConfigsGet.json + * x-ms-original-file: 2015-05-01/WorkItemConfigsGet.json */ /** * Sample code: WorkItemConfigurationsList. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemSamples.java index 5fb52b54dcd6..96e20bec1cda 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemSamples.java @@ -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.generated; @@ -13,9 +13,7 @@ */ public final class WorkItemConfigurationsUpdateItemSamples { /* - * x-ms-original-file: - * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ - * WorkItemConfigUpdate.json + * x-ms-original-file: 2015-05-01/WorkItemConfigUpdate.json */ /** * Sample code: WorkItemConfigurationsCreate. @@ -30,7 +28,7 @@ public final class WorkItemConfigurationsUpdateItemSamples { .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()), + .withWorkItemProperties(mapOf("name", "Title", "value", "Validate Only Title")), com.azure.core.util.Context.NONE); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesCreateOrUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesCreateOrUpdateSamples.java deleted file mode 100644 index 9764ff9dcff7..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesCreateOrUpdateSamples.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -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(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteSamples.java deleted file mode 100644 index dccfd2d0a857..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * 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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupSamples.java deleted file mode 100644 index 84a54954518e..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * 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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupSamples.java deleted file mode 100644 index 1c4b94c31679..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * 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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesUpdateSamples.java deleted file mode 100644 index 847e9c7d6322..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -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(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksCreateOrUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksCreateOrUpdateSamples.java deleted file mode 100644 index 9840adbfadc1..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksCreateOrUpdateSamples.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -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; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteSamples.java deleted file mode 100644 index b373a85683ce..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * 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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupSamples.java deleted file mode 100644 index fac1df282bff..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupSamples.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * 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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupSamples.java deleted file mode 100644 index c6cd5a84dad2..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupSamples.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListSamples.java deleted file mode 100644 index 719ee4c0759e..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetSamples.java deleted file mode 100644 index 029bb1887014..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * 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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListSamples.java deleted file mode 100644 index 1f302665b563..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** - * 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); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksUpdateSamples.java deleted file mode 100644 index 5e2605e238fb..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksUpdateSamples.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -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/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteWithResponseMockTests.java index dc99c3d7feda..e1c6d4335fdb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteWithResponseMockTests.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.generated; @@ -29,7 +29,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.analyticsItems() - .deleteWithResponse("exfdeqvhpsylk", "shk", ItemScopePath.MYANALYTICS_ITEMS, "f", "bmxzjrgywwpg", + .deleteWithResponse("bvpa", "akkud", ItemScopePath.ANALYTICS_ITEMS, "xgwjplmagstcyoh", "fkyrk", com.azure.core.util.Context.NONE); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetWithResponseMockTests.java index 9c0ab61ac2aa..0027d91990d1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetWithResponseMockTests.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.generated; @@ -24,7 +24,7 @@ public final class AnalyticsItemsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"Id\":\"ihebwtsw\",\"Name\":\"uwfmduragegizvc\",\"Content\":\"elisdjub\",\"Version\":\"bqigkx\",\"Scope\":\"user\",\"Type\":\"recent\",\"TimeCreated\":\"akgacyrcmjdm\",\"TimeModified\":\"of\",\"Properties\":{\"functionAlias\":\"uhrylniofr\"}}"; + = "{\"Id\":\"gxxlxsffgcvizq\",\"Name\":\"wlvwlyoupf\",\"Content\":\"bkjubdyhgkfmins\",\"Version\":\"wzf\",\"Scope\":\"user\",\"Type\":\"none\",\"TimeCreated\":\"tlahbq\",\"TimeModified\":\"tx\",\"Properties\":{\"functionAlias\":\"ukxit\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,15 +34,15 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationInsightsComponentAnalyticsItem response = manager.analyticsItems() - .getWithResponse("fdbxiqxeiiqbim", "tmwwi", ItemScopePath.ANALYTICS_ITEMS, "ehfqpofvwbc", "lembnkbwvqvxkdi", + .getWithResponse("byowbblgyavutp", "hjoxo", ItemScopePath.ANALYTICS_ITEMS, "msksbp", "mlqoljx", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ihebwtsw", response.id()); - Assertions.assertEquals("uwfmduragegizvc", response.name()); - Assertions.assertEquals("elisdjub", response.content()); + Assertions.assertEquals("gxxlxsffgcvizq", response.id()); + Assertions.assertEquals("wlvwlyoupf", response.name()); + Assertions.assertEquals("bkjubdyhgkfmins", response.content()); Assertions.assertEquals(ItemScope.USER, response.scope()); - Assertions.assertEquals(ItemType.RECENT, response.type()); - Assertions.assertEquals("uhrylniofr", response.properties().functionAlias()); + Assertions.assertEquals(ItemType.NONE, response.type()); + Assertions.assertEquals("ukxit", response.properties().functionAlias()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListWithResponseMockTests.java index 30f569a1e149..99af2fc03698 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListWithResponseMockTests.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.generated; @@ -26,7 +26,7 @@ public final class AnalyticsItemsListWithResponseMockTests { @Test public void testListWithResponse() throws Exception { String responseStr - = "[{\"Id\":\"honqjujeickpz\",\"Name\":\"p\",\"Content\":\"mxelnwcltyjed\",\"Version\":\"xm\",\"Scope\":\"shared\",\"Type\":\"recent\",\"TimeCreated\":\"cazuaw\",\"TimeModified\":\"z\",\"Properties\":{\"functionAlias\":\"amwabzxrvxcushsp\"}},{\"Id\":\"ivmxyasfl\",\"Name\":\"sgzwywakoihknsm\",\"Content\":\"lmljhlnymzotq\",\"Version\":\"yuzcbmqqvxmvw\",\"Scope\":\"shared\",\"Type\":\"query\",\"TimeCreated\":\"onsupeujlz\",\"TimeModified\":\"hcvsqltnzoi\",\"Properties\":{\"functionAlias\":\"xgnxfyqonmpqoxwd\"}}]"; + = "[{\"Id\":\"plhlvnuuepzlrp\",\"Name\":\"zsoldwey\",\"Content\":\"dunvmnnrwrbiorkt\",\"Version\":\"ywjhhgdnhx\",\"Scope\":\"user\",\"Type\":\"recent\",\"TimeCreated\":\"miloxggdufiqndie\",\"TimeModified\":\"ao\",\"Properties\":{\"functionAlias\":\"hvcyyysfg\"}},{\"Id\":\"tcubiipuipwoqonm\",\"Name\":\"jeknizshq\",\"Content\":\"impevf\",\"Version\":\"b\",\"Scope\":\"shared\",\"Type\":\"query\",\"TimeCreated\":\"ywdxsmic\",\"TimeModified\":\"rwfscjfnynszquj\",\"Properties\":{\"functionAlias\":\"voqyt\"}}]"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,15 +36,15 @@ public void testListWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); List response = manager.analyticsItems() - .listWithResponse("wjutifdwfmv", "gorqjbttzh", ItemScopePath.MYANALYTICS_ITEMS, ItemScope.SHARED, - ItemTypeParameter.QUERY, false, com.azure.core.util.Context.NONE) + .listWithResponse("rxgibbd", "xconfozauors", ItemScopePath.MYANALYTICS_ITEMS, ItemScope.SHARED, + ItemTypeParameter.RECENT, false, com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("honqjujeickpz", response.get(0).id()); - Assertions.assertEquals("p", response.get(0).name()); - Assertions.assertEquals("mxelnwcltyjed", response.get(0).content()); - Assertions.assertEquals(ItemScope.SHARED, response.get(0).scope()); + Assertions.assertEquals("plhlvnuuepzlrp", response.get(0).id()); + Assertions.assertEquals("zsoldwey", response.get(0).name()); + Assertions.assertEquals("dunvmnnrwrbiorkt", response.get(0).content()); + Assertions.assertEquals(ItemScope.USER, response.get(0).scope()); Assertions.assertEquals(ItemType.RECENT, response.get(0).type()); - Assertions.assertEquals("amwabzxrvxcushsp", response.get(0).properties().functionAlias()); + Assertions.assertEquals("hvcyyysfg", response.get(0).properties().functionAlias()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutWithResponseMockTests.java index 5c5767b572e0..b896c027f3ac 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutWithResponseMockTests.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.generated; @@ -26,7 +26,7 @@ public final class AnalyticsItemsPutWithResponseMockTests { @Test public void testPutWithResponse() throws Exception { String responseStr - = "{\"Id\":\"w\",\"Name\":\"wl\",\"Content\":\"jwetnpsihcla\",\"Version\":\"va\",\"Scope\":\"shared\",\"Type\":\"recent\",\"TimeCreated\":\"qqwzt\",\"TimeModified\":\"w\",\"Properties\":{\"functionAlias\":\"hcxwaxfewzjk\"}}"; + = "{\"Id\":\"ligovibrxkpm\",\"Name\":\"azur\",\"Content\":\"cbgoor\",\"Version\":\"eoybfhjxakvvjgs\",\"Scope\":\"shared\",\"Type\":\"none\",\"TimeCreated\":\"mywwtkgkxnyed\",\"TimeModified\":\"gyvudtjuewbc\",\"Properties\":{\"functionAlias\":\"uuwhcjyxcc\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,24 +35,23 @@ public void testPutWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ApplicationInsightsComponentAnalyticsItem response - = manager.analyticsItems() - .putWithResponse("gbzjedmstkv", "l", ItemScopePath.MYANALYTICS_ITEMS, - new ApplicationInsightsComponentAnalyticsItemInner().withId("c") - .withName("iznk") - .withContent("f") - .withScope(ItemScope.SHARED) - .withType(ItemType.QUERY) - .withProperties(new ApplicationInsightsComponentAnalyticsItemProperties() - .withFunctionAlias("pfbcunezzcez")), - true, com.azure.core.util.Context.NONE) - .getValue(); + ApplicationInsightsComponentAnalyticsItem response = manager.analyticsItems() + .putWithResponse("m", "tg", ItemScopePath.MYANALYTICS_ITEMS, + new ApplicationInsightsComponentAnalyticsItemInner().withId("x") + .withName("n") + .withContent("xcpjuisavokqdzf") + .withScope(ItemScope.USER) + .withType(ItemType.QUERY) + .withProperties( + new ApplicationInsightsComponentAnalyticsItemProperties().withFunctionAlias("vscx")), + true, com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("w", response.id()); - Assertions.assertEquals("wl", response.name()); - Assertions.assertEquals("jwetnpsihcla", response.content()); + Assertions.assertEquals("ligovibrxkpm", response.id()); + Assertions.assertEquals("azur", response.name()); + Assertions.assertEquals("cbgoor", response.content()); Assertions.assertEquals(ItemScope.SHARED, response.scope()); - Assertions.assertEquals(ItemType.RECENT, response.type()); - Assertions.assertEquals("hcxwaxfewzjk", response.properties().functionAlias()); + Assertions.assertEquals(ItemType.NONE, response.type()); + Assertions.assertEquals("uuwhcjyxcc", response.properties().functionAlias()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationInnerTests.java index 1abdf3de07b2..0a500b5904c8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationInnerTests.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.generated; @@ -13,30 +13,30 @@ public final class AnnotationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AnnotationInner model = BinaryData.fromString( - "{\"AnnotationName\":\"eg\",\"Category\":\"wmfdatscmdvpjhul\",\"EventTime\":\"2021-11-19T18:36:28Z\",\"Id\":\"mkjozkrwf\",\"Properties\":\"iodjp\",\"RelatedAnnotation\":\"w\"}") + "{\"AnnotationName\":\"ynl\",\"Category\":\"huopxodlqiynto\",\"EventTime\":\"2021-01-16T08:56:29Z\",\"Id\":\"leosjswsrms\",\"Properties\":\"zrpzb\",\"RelatedAnnotation\":\"ckqqzqioxiysui\"}") .toObject(AnnotationInner.class); - Assertions.assertEquals("eg", model.annotationName()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T18:36:28Z"), model.eventTime()); - Assertions.assertEquals("mkjozkrwf", model.id()); - Assertions.assertEquals("iodjp", model.properties()); - Assertions.assertEquals("w", model.relatedAnnotation()); + Assertions.assertEquals("ynl", model.annotationName()); + Assertions.assertEquals("huopxodlqiynto", model.category()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-16T08:56:29Z"), model.eventTime()); + Assertions.assertEquals("leosjswsrms", model.id()); + Assertions.assertEquals("zrpzb", model.properties()); + Assertions.assertEquals("ckqqzqioxiysui", model.relatedAnnotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AnnotationInner model = new AnnotationInner().withAnnotationName("eg") - .withCategory("wmfdatscmdvpjhul") - .withEventTime(OffsetDateTime.parse("2021-11-19T18:36:28Z")) - .withId("mkjozkrwf") - .withProperties("iodjp") - .withRelatedAnnotation("w"); + AnnotationInner model = new AnnotationInner().withAnnotationName("ynl") + .withCategory("huopxodlqiynto") + .withEventTime(OffsetDateTime.parse("2021-01-16T08:56:29Z")) + .withId("leosjswsrms") + .withProperties("zrpzb") + .withRelatedAnnotation("ckqqzqioxiysui"); model = BinaryData.fromObject(model).toObject(AnnotationInner.class); - Assertions.assertEquals("eg", model.annotationName()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T18:36:28Z"), model.eventTime()); - Assertions.assertEquals("mkjozkrwf", model.id()); - Assertions.assertEquals("iodjp", model.properties()); - Assertions.assertEquals("w", model.relatedAnnotation()); + Assertions.assertEquals("ynl", model.annotationName()); + Assertions.assertEquals("huopxodlqiynto", model.category()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-16T08:56:29Z"), model.eventTime()); + Assertions.assertEquals("leosjswsrms", model.id()); + Assertions.assertEquals("zrpzb", model.properties()); + Assertions.assertEquals("ckqqzqioxiysui", model.relatedAnnotation()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateWithResponseMockTests.java index cd69f931ad94..4287a741106d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateWithResponseMockTests.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.generated; @@ -23,7 +23,7 @@ public final class AnnotationsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "[{\"AnnotationName\":\"nnrwrbiork\",\"Category\":\"lywjhh\",\"EventTime\":\"2021-11-16T09:40:09Z\",\"Id\":\"xmsivfomiloxggdu\",\"Properties\":\"q\",\"RelatedAnnotation\":\"ieuzaofjchvcyyy\"},{\"AnnotationName\":\"gdotcubiipuipwo\",\"Category\":\"nmacj\",\"EventTime\":\"2021-08-08T02:00:14Z\",\"Id\":\"zshq\",\"Properties\":\"impevf\",\"RelatedAnnotation\":\"b\"}]"; + = "[{\"AnnotationName\":\"ulapzwyrp\",\"Category\":\"gtqxep\",\"EventTime\":\"2021-01-31T07:44:20Z\",\"Id\":\"fuajly\",\"Properties\":\"lvofqzhvfcibyfmo\",\"RelatedAnnotation\":\"xrkjpvdw\"},{\"AnnotationName\":\"zwiivwzjbhyzs\",\"Category\":\"rkambt\",\"EventTime\":\"2021-03-11T10:38:35Z\",\"Id\":\"vmnvu\",\"Properties\":\"qvldspastjbkkd\",\"RelatedAnnotation\":\"lves\"}]"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,21 +33,21 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); List response = manager.annotations() - .createWithResponse("nnbj", "rxgibbd", - new AnnotationInner().withAnnotationName("confozauors") - .withCategory("okwbqplh") - .withEventTime(OffsetDateTime.parse("2021-05-19T05:27:01Z")) - .withId("uepzl") - .withProperties("hw") - .withRelatedAnnotation("oldweyuqdu"), + .createWithResponse("qbmfpjbabwidf", "xsspuunnoxyhk", + new AnnotationInner().withAnnotationName("qddrihpfhoqcaae") + .withCategory("aomdjvlpjxx") + .withEventTime(OffsetDateTime.parse("2021-09-17T03:37:19Z")) + .withId("msgeivsiykzk") + .withProperties("cjdx") + .withRelatedAnnotation("bzo"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("nnrwrbiork", response.get(0).annotationName()); - Assertions.assertEquals("lywjhh", response.get(0).category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-16T09:40:09Z"), response.get(0).eventTime()); - Assertions.assertEquals("xmsivfomiloxggdu", response.get(0).id()); - Assertions.assertEquals("q", response.get(0).properties()); - Assertions.assertEquals("ieuzaofjchvcyyy", response.get(0).relatedAnnotation()); + Assertions.assertEquals("ulapzwyrp", response.get(0).annotationName()); + Assertions.assertEquals("gtqxep", response.get(0).category()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-31T07:44:20Z"), response.get(0).eventTime()); + Assertions.assertEquals("fuajly", response.get(0).id()); + Assertions.assertEquals("lvofqzhvfcibyfmo", response.get(0).properties()); + Assertions.assertEquals("xrkjpvdw", response.get(0).relatedAnnotation()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteWithResponseMockTests.java index f2f1122192e3..8829a9ace13f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteWithResponseMockTests.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.generated; @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.annotations() - .deleteWithResponse("rrilbywdxsmic", "wrwfscjfnyns", "qujizdvo", com.azure.core.util.Context.NONE); + .deleteWithResponse("mjlxrrilozapeewc", "pxlktwkuziycsl", "vu", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetWithResponseMockTests.java index bcfc55cfc851..9d05b0b053ad 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetWithResponseMockTests.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.generated; @@ -22,7 +22,7 @@ public final class AnnotationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "[{\"AnnotationName\":\"ksbpimlqoljx\",\"Category\":\"gxxlxsffgcvizq\",\"EventTime\":\"2021-03-28T18:15:03Z\",\"Id\":\"vwlyoup\",\"Properties\":\"fbkjubdyhgkfmi\",\"RelatedAnnotation\":\"g\"},{\"AnnotationName\":\"zfttsttktlahb\",\"Category\":\"ctxtgzukxi\",\"EventTime\":\"2021-11-11T23:01:44Z\",\"Id\":\"tg\",\"Properties\":\"q\",\"RelatedAnnotation\":\"rnxrxcpj\"}]"; + = "[{\"AnnotationName\":\"eevt\",\"Category\":\"pryu\",\"EventTime\":\"2021-08-29T21:00:59Z\",\"Id\":\"tpzdmovzvfvaawzq\",\"Properties\":\"f\",\"RelatedAnnotation\":\"z\"},{\"AnnotationName\":\"iglaecx\",\"Category\":\"t\",\"EventTime\":\"2021-07-02T18:02Z\",\"Id\":\"pvz\",\"Properties\":\"qtmldgxo\",\"RelatedAnnotation\":\"irclnpk\"},{\"AnnotationName\":\"ayzri\",\"Category\":\"hya\",\"EventTime\":\"2021-08-19T05:01:13Z\",\"Id\":\"lboxqvkjl\",\"Properties\":\"ho\",\"RelatedAnnotation\":\"ynhdwdigum\"}]"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); List response = manager.annotations() - .getWithResponse("ytibyow", "blgyavutpthj", "xoi", com.azure.core.util.Context.NONE) + .getWithResponse("uztcktyhjtqed", "gzulwmmrqzzr", "jvpglydzgk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ksbpimlqoljx", response.get(0).annotationName()); - Assertions.assertEquals("gxxlxsffgcvizq", response.get(0).category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-28T18:15:03Z"), response.get(0).eventTime()); - Assertions.assertEquals("vwlyoup", response.get(0).id()); - Assertions.assertEquals("fbkjubdyhgkfmi", response.get(0).properties()); - Assertions.assertEquals("g", response.get(0).relatedAnnotation()); + Assertions.assertEquals("eevt", response.get(0).annotationName()); + Assertions.assertEquals("pryu", response.get(0).category()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T21:00:59Z"), response.get(0).eventTime()); + Assertions.assertEquals("tpzdmovzvfvaawzq", response.get(0).id()); + Assertions.assertEquals("f", response.get(0).properties()); + Assertions.assertEquals("z", response.get(0).relatedAnnotation()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListMockTests.java index 1dde03b6f743..f2a72627fca5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListMockTests.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.generated; @@ -22,7 +22,7 @@ public final class AnnotationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"AnnotationName\":\"sutujba\",\"Category\":\"juohminyflnorw\",\"EventTime\":\"2021-02-09T18:43:47Z\",\"Id\":\"wpklvxw\",\"Properties\":\"gdxpg\",\"RelatedAnnotation\":\"chisze\"}]}"; + = "{\"value\":[{\"AnnotationName\":\"dwvvba\",\"Category\":\"lllchpodb\",\"EventTime\":\"2021-04-02T13:31:14Z\",\"Id\":\"rdnhfuku\",\"Properties\":\"jcswsmys\",\"RelatedAnnotation\":\"luqypfcvlerch\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.annotations() - .list("adraufactkahzo", "ajjziuxxpshne", "kulfg", "lqubkwdlen", com.azure.core.util.Context.NONE); + .list("bdgiogsjk", "nwqjnoba", "yhddvia", "egfnmntfpmvmemfn", com.azure.core.util.Context.NONE); - Assertions.assertEquals("sutujba", response.iterator().next().annotationName()); - Assertions.assertEquals("juohminyflnorw", response.iterator().next().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T18:43:47Z"), response.iterator().next().eventTime()); - Assertions.assertEquals("wpklvxw", response.iterator().next().id()); - Assertions.assertEquals("gdxpg", response.iterator().next().properties()); - Assertions.assertEquals("chisze", response.iterator().next().relatedAnnotation()); + Assertions.assertEquals("dwvvba", response.iterator().next().annotationName()); + Assertions.assertEquals("lllchpodb", response.iterator().next().category()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-02T13:31:14Z"), response.iterator().next().eventTime()); + Assertions.assertEquals("rdnhfuku", response.iterator().next().id()); + Assertions.assertEquals("jcswsmys", response.iterator().next().properties()); + Assertions.assertEquals("luqypfcvlerch", response.iterator().next().relatedAnnotation()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListResultTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListResultTests.java index 23e73ae403bf..39ee143e321a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListResultTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListResultTests.java @@ -1,23 +1,19 @@ // 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.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.AnnotationsListResult; +import com.azure.resourcemanager.applicationinsights.implementation.models.AnnotationsListResult; +import org.junit.jupiter.api.Assertions; public final class AnnotationsListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AnnotationsListResult model = BinaryData.fromString( - "{\"value\":[{\"AnnotationName\":\"emkkvnipjox\",\"Category\":\"nchgej\",\"EventTime\":\"2021-10-02T19:32:19Z\",\"Id\":\"mailzydehojw\",\"Properties\":\"huxinpmqnj\",\"RelatedAnnotation\":\"wixjsprozvcp\"}]}") + "{\"value\":[{\"AnnotationName\":\"dqrhzoymib\",\"Category\":\"qyib\",\"EventTime\":\"2021-04-13T12:13:43Z\",\"Id\":\"luszdtmhrkwof\",\"Properties\":\"voqacpiexpbt\",\"RelatedAnnotation\":\"wbwo\"},{\"AnnotationName\":\"washr\",\"Category\":\"tkcnqxwb\",\"EventTime\":\"2021-11-17T19:43:56Z\",\"Id\":\"lpiujwaa\",\"Properties\":\"pqiiobyuqe\",\"RelatedAnnotation\":\"qlpqwcciuq\"},{\"AnnotationName\":\"dbutauvfbtkuwhh\",\"Category\":\"ykojoxafnndlpic\",\"EventTime\":\"2021-09-25T08:27:56Z\",\"Id\":\"mkcdyhbpkkpwdre\",\"Properties\":\"ovvqfovljxywsu\",\"RelatedAnnotation\":\"yrs\"},{\"AnnotationName\":\"sytgadgvraea\",\"Category\":\"e\",\"EventTime\":\"2021-08-22T21:19:43Z\",\"Id\":\"rrwlquuijfqkace\",\"Properties\":\"ipfpubji\",\"RelatedAnnotation\":\"wifto\"}],\"nextLink\":\"kvpuvksgplsaknyn\"}") .toObject(AnnotationsListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AnnotationsListResult model = new AnnotationsListResult(); - model = BinaryData.fromObject(model).toObject(AnnotationsListResult.class); + Assertions.assertEquals("kvpuvksgplsaknyn", model.nextLink()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeyRequestTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeyRequestTests.java index 00f0c5cd9169..9c5fab4e99ff 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeyRequestTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeyRequestTests.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.generated; @@ -13,21 +13,21 @@ public final class ApiKeyRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApiKeyRequest model = BinaryData.fromString( - "{\"name\":\"fsinzgvfcjrwzoxx\",\"linkedReadProperties\":[\"elluwfziton\",\"eqfpj\",\"jlxofpdvhpfxxyp\",\"ninmayhuyb\"],\"linkedWriteProperties\":[\"odepoogin\",\"vamih\"]}") + "{\"name\":\"d\",\"linkedReadProperties\":[\"syocogjltdtbnnha\",\"oocrkvcikhnv\"],\"linkedWriteProperties\":[\"qgxqquezikyw\"]}") .toObject(ApiKeyRequest.class); - Assertions.assertEquals("fsinzgvfcjrwzoxx", model.name()); - Assertions.assertEquals("elluwfziton", model.linkedReadProperties().get(0)); - Assertions.assertEquals("odepoogin", model.linkedWriteProperties().get(0)); + Assertions.assertEquals("d", model.name()); + Assertions.assertEquals("syocogjltdtbnnha", model.linkedReadProperties().get(0)); + Assertions.assertEquals("qgxqquezikyw", model.linkedWriteProperties().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApiKeyRequest model = new ApiKeyRequest().withName("fsinzgvfcjrwzoxx") - .withLinkedReadProperties(Arrays.asList("elluwfziton", "eqfpj", "jlxofpdvhpfxxyp", "ninmayhuyb")) - .withLinkedWriteProperties(Arrays.asList("odepoogin", "vamih")); + ApiKeyRequest model = new ApiKeyRequest().withName("d") + .withLinkedReadProperties(Arrays.asList("syocogjltdtbnnha", "oocrkvcikhnv")) + .withLinkedWriteProperties(Arrays.asList("qgxqquezikyw")); model = BinaryData.fromObject(model).toObject(ApiKeyRequest.class); - Assertions.assertEquals("fsinzgvfcjrwzoxx", model.name()); - Assertions.assertEquals("elluwfziton", model.linkedReadProperties().get(0)); - Assertions.assertEquals("odepoogin", model.linkedWriteProperties().get(0)); + Assertions.assertEquals("d", model.name()); + Assertions.assertEquals("syocogjltdtbnnha", model.linkedReadProperties().get(0)); + Assertions.assertEquals("qgxqquezikyw", model.linkedWriteProperties().get(0)); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAnalyticsItemInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAnalyticsItemInnerTests.java index 2cfbd46e98a4..d25505a0418f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAnalyticsItemInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAnalyticsItemInnerTests.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.generated; @@ -15,31 +15,31 @@ public final class ApplicationInsightsComponentAnalyticsItemInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentAnalyticsItemInner model = BinaryData.fromString( - "{\"Id\":\"oklyaxuconuq\",\"Name\":\"fkbey\",\"Content\":\"wrmjmwvvjektc\",\"Version\":\"enhwlrs\",\"Scope\":\"user\",\"Type\":\"query\",\"TimeCreated\":\"v\",\"TimeModified\":\"dqgbiqylihkaetc\",\"Properties\":{\"functionAlias\":\"fcivfsnkym\"}}") + "{\"Id\":\"smond\",\"Name\":\"quxvypomgkop\",\"Content\":\"hojvpajqgxysmocm\",\"Version\":\"fqvm\",\"Scope\":\"shared\",\"Type\":\"query\",\"TimeCreated\":\"pvhelxprg\",\"TimeModified\":\"atddc\",\"Properties\":{\"functionAlias\":\"cuejrjxgci\"}}") .toObject(ApplicationInsightsComponentAnalyticsItemInner.class); - Assertions.assertEquals("oklyaxuconuq", model.id()); - Assertions.assertEquals("fkbey", model.name()); - Assertions.assertEquals("wrmjmwvvjektc", model.content()); - Assertions.assertEquals(ItemScope.USER, model.scope()); + Assertions.assertEquals("smond", model.id()); + Assertions.assertEquals("quxvypomgkop", model.name()); + Assertions.assertEquals("hojvpajqgxysmocm", model.content()); + Assertions.assertEquals(ItemScope.SHARED, model.scope()); Assertions.assertEquals(ItemType.QUERY, model.type()); - Assertions.assertEquals("fcivfsnkym", model.properties().functionAlias()); + Assertions.assertEquals("cuejrjxgci", model.properties().functionAlias()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationInsightsComponentAnalyticsItemInner model = new ApplicationInsightsComponentAnalyticsItemInner() - .withId("oklyaxuconuq") - .withName("fkbey") - .withContent("wrmjmwvvjektc") - .withScope(ItemScope.USER) + .withId("smond") + .withName("quxvypomgkop") + .withContent("hojvpajqgxysmocm") + .withScope(ItemScope.SHARED) .withType(ItemType.QUERY) - .withProperties(new ApplicationInsightsComponentAnalyticsItemProperties().withFunctionAlias("fcivfsnkym")); + .withProperties(new ApplicationInsightsComponentAnalyticsItemProperties().withFunctionAlias("cuejrjxgci")); model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentAnalyticsItemInner.class); - Assertions.assertEquals("oklyaxuconuq", model.id()); - Assertions.assertEquals("fkbey", model.name()); - Assertions.assertEquals("wrmjmwvvjektc", model.content()); - Assertions.assertEquals(ItemScope.USER, model.scope()); + Assertions.assertEquals("smond", model.id()); + Assertions.assertEquals("quxvypomgkop", model.name()); + Assertions.assertEquals("hojvpajqgxysmocm", model.content()); + Assertions.assertEquals(ItemScope.SHARED, model.scope()); Assertions.assertEquals(ItemType.QUERY, model.type()); - Assertions.assertEquals("fcivfsnkym", model.properties().functionAlias()); + Assertions.assertEquals("cuejrjxgci", model.properties().functionAlias()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAnalyticsItemPropertiesTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAnalyticsItemPropertiesTests.java index 4f95283520f8..7d2c9f4a217b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAnalyticsItemPropertiesTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAnalyticsItemPropertiesTests.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.generated; @@ -11,17 +11,16 @@ public final class ApplicationInsightsComponentAnalyticsItemPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationInsightsComponentAnalyticsItemProperties model - = BinaryData.fromString("{\"functionAlias\":\"tqhjfbebrjcx\"}") - .toObject(ApplicationInsightsComponentAnalyticsItemProperties.class); - Assertions.assertEquals("tqhjfbebrjcx", model.functionAlias()); + ApplicationInsightsComponentAnalyticsItemProperties model = BinaryData.fromString("{\"functionAlias\":\"brh\"}") + .toObject(ApplicationInsightsComponentAnalyticsItemProperties.class); + Assertions.assertEquals("brh", model.functionAlias()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationInsightsComponentAnalyticsItemProperties model - = new ApplicationInsightsComponentAnalyticsItemProperties().withFunctionAlias("tqhjfbebrjcx"); + = new ApplicationInsightsComponentAnalyticsItemProperties().withFunctionAlias("brh"); model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentAnalyticsItemProperties.class); - Assertions.assertEquals("tqhjfbebrjcx", model.functionAlias()); + Assertions.assertEquals("brh", model.functionAlias()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAvailableFeaturesInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAvailableFeaturesInnerTests.java index 89000ecfef09..c0d59117b324 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAvailableFeaturesInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAvailableFeaturesInnerTests.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.generated; @@ -11,14 +11,7 @@ public final class ApplicationInsightsComponentAvailableFeaturesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentAvailableFeaturesInner model = BinaryData.fromString( - "{\"Result\":[{\"FeatureName\":\"pwcukjfkgiawxk\",\"MeterId\":\"ypl\",\"MeterRateFrequency\":\"kbasyypn\",\"ResouceId\":\"hsgcbacphejkot\",\"IsHidden\":false,\"Capabilities\":[{\"Name\":\"l\",\"Description\":\"dlikwyqkgfgibma\",\"Value\":\"akeqs\",\"Unit\":\"yb\",\"MeterId\":\"qedqytbciqfoufl\",\"MeterRateFrequency\":\"nkzsmodmglou\"},{\"Name\":\"b\",\"Description\":\"tmut\",\"Value\":\"qktapspwgcuert\",\"Unit\":\"kdosvqw\",\"MeterId\":\"mdgbbjfdd\",\"MeterRateFrequency\":\"bmbexppbhtqqro\"},{\"Name\":\"p\",\"Description\":\"s\",\"Value\":\"gbquxigj\",\"Unit\":\"gzjaoyfhrtxilne\",\"MeterId\":\"ujysvle\",\"MeterRateFrequency\":\"vfqawrlyxwjkcpr\"}],\"Title\":\"wbxgjvt\",\"IsMainFeature\":false,\"SupportedAddonFeatures\":\"sszdnru\"},{\"FeatureName\":\"guhmuouqfpr\",\"MeterId\":\"wbnguitnwui\",\"MeterRateFrequency\":\"a\",\"ResouceId\":\"ufizuckyf\",\"IsHidden\":true,\"Capabilities\":[{\"Name\":\"fvzwdzuhty\",\"Description\":\"isdkfthwxmnteiw\",\"Value\":\"pvkmijcmmxdcuf\",\"Unit\":\"srp\",\"MeterId\":\"zidnsezcxtbzsgfy\",\"MeterRateFrequency\":\"sne\"}],\"Title\":\"dwzjeiach\",\"IsMainFeature\":false,\"SupportedAddonFeatures\":\"flnrosfqpteehzz\"}]}") + "{\"Result\":[{\"FeatureName\":\"ygaeqidbqfatpxl\",\"MeterId\":\"xcyjmoadsuvarmy\",\"MeterRateFrequency\":\"mjsjqb\",\"ResouceId\":\"hyxxrwlycoduhpk\",\"IsHidden\":false,\"Capabilities\":[{\"Name\":\"re\",\"Description\":\"ajxq\",\"Value\":\"jhkycub\",\"Unit\":\"dgssofwqmzqal\",\"MeterId\":\"mnjijpxacqqudf\",\"MeterRateFrequency\":\"yxbaaabjyvayf\"},{\"Name\":\"m\",\"Description\":\"rtuzqogs\",\"Value\":\"nevfdnw\",\"Unit\":\"mewzsyyc\",\"MeterId\":\"zsoibjudpfrxtr\",\"MeterRateFrequency\":\"zvaytdwkqbr\"},{\"Name\":\"bpaxhexiilivpdt\",\"Description\":\"r\",\"Value\":\"d\",\"Unit\":\"axoruzfgsquy\",\"MeterId\":\"rxxle\",\"MeterRateFrequency\":\"ramxjezwlwnw\"},{\"Name\":\"qlcvydy\",\"Description\":\"tdooaoj\",\"Value\":\"iodkooebwnujhem\",\"Unit\":\"bvdkcrodtjin\",\"MeterId\":\"jlfltkacjvefkdlf\",\"MeterRateFrequency\":\"kggkfpa\"}],\"Title\":\"owpulpq\",\"IsMainFeature\":true,\"SupportedAddonFeatures\":\"s\"},{\"FeatureName\":\"k\",\"MeterId\":\"nsj\",\"MeterRateFrequency\":\"vti\",\"ResouceId\":\"xsdszuempsb\",\"IsHidden\":false,\"Capabilities\":[{\"Name\":\"yvpnqicvinvkjj\",\"Description\":\"xrbuukzclew\",\"Value\":\"mlwpazt\",\"Unit\":\"ofncckwyfzqwhxxb\",\"MeterId\":\"qa\",\"MeterRateFrequency\":\"feqztppriol\"},{\"Name\":\"rjaltolmncw\",\"Description\":\"bqwcsdbnwdcf\",\"Value\":\"cqdpfuv\",\"Unit\":\"sbjjc\",\"MeterId\":\"vxb\",\"MeterRateFrequency\":\"vudutncor\"},{\"Name\":\"lxqtvcofudfl\",\"Description\":\"gj\",\"Value\":\"gdknnqv\",\"Unit\":\"znqntoru\",\"MeterId\":\"gsahmkycgrauw\",\"MeterRateFrequency\":\"etaebu\"},{\"Name\":\"vdmovsmzlxwabm\",\"Description\":\"efkifr\",\"Value\":\"puqujmqlgkfbtn\",\"Unit\":\"aongbj\",\"MeterId\":\"tujitcjedft\",\"MeterRateFrequency\":\"ae\"}],\"Title\":\"ojvdcpzfoqo\",\"IsMainFeature\":false,\"SupportedAddonFeatures\":\"bxarzgszufoxci\"},{\"FeatureName\":\"p\",\"MeterId\":\"oamciodh\",\"MeterRateFrequency\":\"azxkhnzbonlwnto\",\"ResouceId\":\"okdwb\",\"IsHidden\":true,\"Capabilities\":[{\"Name\":\"cmrvexzt\",\"Description\":\"t\",\"Value\":\"sfraoyzko\",\"Unit\":\"tlmngu\",\"MeterId\":\"wqaldsyu\",\"MeterRateFrequency\":\"imerqfobwyznk\"}],\"Title\":\"kutwpf\",\"IsMainFeature\":false,\"SupportedAddonFeatures\":\"m\"}]}") .toObject(ApplicationInsightsComponentAvailableFeaturesInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentAvailableFeaturesInner model - = new ApplicationInsightsComponentAvailableFeaturesInner(); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentAvailableFeaturesInner.class); - } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentBillingFeaturesInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentBillingFeaturesInnerTests.java index 661d63979604..c2b9e8ce800e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentBillingFeaturesInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentBillingFeaturesInnerTests.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.generated; @@ -14,28 +14,28 @@ public final class ApplicationInsightsComponentBillingFeaturesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentBillingFeaturesInner model = BinaryData.fromString( - "{\"DataVolumeCap\":{\"Cap\":39.254265,\"ResetTime\":955992549,\"WarningThreshold\":1066142513,\"StopSendNotificationWhenHitThreshold\":false,\"StopSendNotificationWhenHitCap\":false,\"MaxHistoryCap\":74.08714},\"CurrentBillingFeatures\":[\"njbiksqrglssain\",\"p\",\"wnzlljfmppeeb\",\"mgxsab\"]}") + "{\"DataVolumeCap\":{\"Cap\":64.810646,\"ResetTime\":1554656942,\"WarningThreshold\":261614569,\"StopSendNotificationWhenHitThreshold\":true,\"StopSendNotificationWhenHitCap\":false,\"MaxHistoryCap\":41.899403},\"CurrentBillingFeatures\":[\"wmszkk\"]}") .toObject(ApplicationInsightsComponentBillingFeaturesInner.class); - Assertions.assertEquals(39.254265F, model.dataVolumeCap().cap()); - Assertions.assertEquals(1066142513, model.dataVolumeCap().warningThreshold()); - Assertions.assertEquals(false, model.dataVolumeCap().stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(false, model.dataVolumeCap().stopSendNotificationWhenHitCap()); - Assertions.assertEquals("njbiksqrglssain", model.currentBillingFeatures().get(0)); + Assertions.assertEquals(64.810646F, model.dataVolumeCap().cap()); + Assertions.assertEquals(261614569, model.dataVolumeCap().warningThreshold()); + Assertions.assertTrue(model.dataVolumeCap().stopSendNotificationWhenHitThreshold()); + Assertions.assertFalse(model.dataVolumeCap().stopSendNotificationWhenHitCap()); + Assertions.assertEquals("wmszkk", model.currentBillingFeatures().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationInsightsComponentBillingFeaturesInner model = new ApplicationInsightsComponentBillingFeaturesInner() - .withDataVolumeCap(new ApplicationInsightsComponentDataVolumeCap().withCap(39.254265F) - .withWarningThreshold(1066142513) - .withStopSendNotificationWhenHitThreshold(false) + .withDataVolumeCap(new ApplicationInsightsComponentDataVolumeCap().withCap(64.810646F) + .withWarningThreshold(261614569) + .withStopSendNotificationWhenHitThreshold(true) .withStopSendNotificationWhenHitCap(false)) - .withCurrentBillingFeatures(Arrays.asList("njbiksqrglssain", "p", "wnzlljfmppeeb", "mgxsab")); + .withCurrentBillingFeatures(Arrays.asList("wmszkk")); model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentBillingFeaturesInner.class); - Assertions.assertEquals(39.254265F, model.dataVolumeCap().cap()); - Assertions.assertEquals(1066142513, model.dataVolumeCap().warningThreshold()); - Assertions.assertEquals(false, model.dataVolumeCap().stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(false, model.dataVolumeCap().stopSendNotificationWhenHitCap()); - Assertions.assertEquals("njbiksqrglssain", model.currentBillingFeatures().get(0)); + Assertions.assertEquals(64.810646F, model.dataVolumeCap().cap()); + Assertions.assertEquals(261614569, model.dataVolumeCap().warningThreshold()); + Assertions.assertTrue(model.dataVolumeCap().stopSendNotificationWhenHitThreshold()); + Assertions.assertFalse(model.dataVolumeCap().stopSendNotificationWhenHitCap()); + Assertions.assertEquals("wmszkk", model.currentBillingFeatures().get(0)); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentDataVolumeCapTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentDataVolumeCapTests.java index 6a254cf9e1b2..6433fb66010f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentDataVolumeCapTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentDataVolumeCapTests.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.generated; @@ -12,25 +12,25 @@ public final class ApplicationInsightsComponentDataVolumeCapTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentDataVolumeCap model = BinaryData.fromString( - "{\"Cap\":79.06951,\"ResetTime\":1982194402,\"WarningThreshold\":922988316,\"StopSendNotificationWhenHitThreshold\":false,\"StopSendNotificationWhenHitCap\":true,\"MaxHistoryCap\":45.168953}") + "{\"Cap\":49.808086,\"ResetTime\":272856491,\"WarningThreshold\":1631223460,\"StopSendNotificationWhenHitThreshold\":false,\"StopSendNotificationWhenHitCap\":false,\"MaxHistoryCap\":47.328133}") .toObject(ApplicationInsightsComponentDataVolumeCap.class); - Assertions.assertEquals(79.06951F, model.cap()); - Assertions.assertEquals(922988316, model.warningThreshold()); - Assertions.assertEquals(false, model.stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(true, model.stopSendNotificationWhenHitCap()); + Assertions.assertEquals(49.808086F, model.cap()); + Assertions.assertEquals(1631223460, model.warningThreshold()); + Assertions.assertFalse(model.stopSendNotificationWhenHitThreshold()); + Assertions.assertFalse(model.stopSendNotificationWhenHitCap()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationInsightsComponentDataVolumeCap model - = new ApplicationInsightsComponentDataVolumeCap().withCap(79.06951F) - .withWarningThreshold(922988316) + = new ApplicationInsightsComponentDataVolumeCap().withCap(49.808086F) + .withWarningThreshold(1631223460) .withStopSendNotificationWhenHitThreshold(false) - .withStopSendNotificationWhenHitCap(true); + .withStopSendNotificationWhenHitCap(false); model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentDataVolumeCap.class); - Assertions.assertEquals(79.06951F, model.cap()); - Assertions.assertEquals(922988316, model.warningThreshold()); - Assertions.assertEquals(false, model.stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(true, model.stopSendNotificationWhenHitCap()); + Assertions.assertEquals(49.808086F, model.cap()); + Assertions.assertEquals(1631223460, model.warningThreshold()); + Assertions.assertFalse(model.stopSendNotificationWhenHitThreshold()); + Assertions.assertFalse(model.stopSendNotificationWhenHitCap()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentExportRequestTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentExportRequestTests.java index 29e77f950667..a85bf057b8be 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentExportRequestTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentExportRequestTests.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.generated; @@ -12,40 +12,40 @@ public final class ApplicationInsightsComponentExportRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentExportRequest model = BinaryData.fromString( - "{\"RecordTypes\":\"evcciqihnhun\",\"DestinationType\":\"wjzrnfygxgisp\",\"DestinationAddress\":\"vtz\",\"IsEnabled\":\"ufubl\",\"NotificationQueueEnabled\":\"fxqeof\",\"NotificationQueueUri\":\"e\",\"DestinationStorageSubscriptionId\":\"hqjbasvmsmj\",\"DestinationStorageLocationId\":\"lngsntnbybkzgcwr\",\"DestinationAccountId\":\"lxxwrljdouskc\"}") + "{\"RecordTypes\":\"jzkzi\",\"DestinationType\":\"vvcnayr\",\"DestinationAddress\":\"rnxxmueed\",\"IsEnabled\":\"rdvstkwqqtch\",\"NotificationQueueEnabled\":\"lmfmtdaay\",\"NotificationQueueUri\":\"v\",\"DestinationStorageSubscriptionId\":\"gpiohgwxrtfudxe\",\"DestinationStorageLocationId\":\"gyqagvrvmnpkuk\",\"DestinationAccountId\":\"i\"}") .toObject(ApplicationInsightsComponentExportRequest.class); - Assertions.assertEquals("evcciqihnhun", model.recordTypes()); - Assertions.assertEquals("wjzrnfygxgisp", model.destinationType()); - Assertions.assertEquals("vtz", model.destinationAddress()); - Assertions.assertEquals("ufubl", model.isEnabled()); - Assertions.assertEquals("fxqeof", model.notificationQueueEnabled()); - Assertions.assertEquals("e", model.notificationQueueUri()); - Assertions.assertEquals("hqjbasvmsmj", model.destinationStorageSubscriptionId()); - Assertions.assertEquals("lngsntnbybkzgcwr", model.destinationStorageLocationId()); - Assertions.assertEquals("lxxwrljdouskc", model.destinationAccountId()); + Assertions.assertEquals("jzkzi", model.recordTypes()); + Assertions.assertEquals("vvcnayr", model.destinationType()); + Assertions.assertEquals("rnxxmueed", model.destinationAddress()); + Assertions.assertEquals("rdvstkwqqtch", model.isEnabled()); + Assertions.assertEquals("lmfmtdaay", model.notificationQueueEnabled()); + Assertions.assertEquals("v", model.notificationQueueUri()); + Assertions.assertEquals("gpiohgwxrtfudxe", model.destinationStorageSubscriptionId()); + Assertions.assertEquals("gyqagvrvmnpkuk", model.destinationStorageLocationId()); + Assertions.assertEquals("i", model.destinationAccountId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationInsightsComponentExportRequest model - = new ApplicationInsightsComponentExportRequest().withRecordTypes("evcciqihnhun") - .withDestinationType("wjzrnfygxgisp") - .withDestinationAddress("vtz") - .withIsEnabled("ufubl") - .withNotificationQueueEnabled("fxqeof") - .withNotificationQueueUri("e") - .withDestinationStorageSubscriptionId("hqjbasvmsmj") - .withDestinationStorageLocationId("lngsntnbybkzgcwr") - .withDestinationAccountId("lxxwrljdouskc"); + = new ApplicationInsightsComponentExportRequest().withRecordTypes("jzkzi") + .withDestinationType("vvcnayr") + .withDestinationAddress("rnxxmueed") + .withIsEnabled("rdvstkwqqtch") + .withNotificationQueueEnabled("lmfmtdaay") + .withNotificationQueueUri("v") + .withDestinationStorageSubscriptionId("gpiohgwxrtfudxe") + .withDestinationStorageLocationId("gyqagvrvmnpkuk") + .withDestinationAccountId("i"); model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentExportRequest.class); - Assertions.assertEquals("evcciqihnhun", model.recordTypes()); - Assertions.assertEquals("wjzrnfygxgisp", model.destinationType()); - Assertions.assertEquals("vtz", model.destinationAddress()); - Assertions.assertEquals("ufubl", model.isEnabled()); - Assertions.assertEquals("fxqeof", model.notificationQueueEnabled()); - Assertions.assertEquals("e", model.notificationQueueUri()); - Assertions.assertEquals("hqjbasvmsmj", model.destinationStorageSubscriptionId()); - Assertions.assertEquals("lngsntnbybkzgcwr", model.destinationStorageLocationId()); - Assertions.assertEquals("lxxwrljdouskc", model.destinationAccountId()); + Assertions.assertEquals("jzkzi", model.recordTypes()); + Assertions.assertEquals("vvcnayr", model.destinationType()); + Assertions.assertEquals("rnxxmueed", model.destinationAddress()); + Assertions.assertEquals("rdvstkwqqtch", model.isEnabled()); + Assertions.assertEquals("lmfmtdaay", model.notificationQueueEnabled()); + Assertions.assertEquals("v", model.notificationQueueUri()); + Assertions.assertEquals("gpiohgwxrtfudxe", model.destinationStorageSubscriptionId()); + Assertions.assertEquals("gyqagvrvmnpkuk", model.destinationStorageLocationId()); + Assertions.assertEquals("i", model.destinationAccountId()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFavoriteInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFavoriteInnerTests.java index ad5ae813fc6f..5c282d2877ed 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFavoriteInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFavoriteInnerTests.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.generated; @@ -14,36 +14,37 @@ public final class ApplicationInsightsComponentFavoriteInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentFavoriteInner model = BinaryData.fromString( - "{\"Name\":\"v\",\"Config\":\"dgwdslfhot\",\"Version\":\"cynpwlbjnp\",\"FavoriteId\":\"cftadeh\",\"FavoriteType\":\"shared\",\"SourceType\":\"yfsoppu\",\"TimeModified\":\"esnzwde\",\"Tags\":[\"vorxzdmohct\"],\"Category\":\"vudwx\",\"IsGeneratedFromTemplate\":false,\"UserId\":\"vo\"}") + "{\"Name\":\"clzedqbcvh\",\"Config\":\"h\",\"Version\":\"odqkdlwwqfb\",\"FavoriteId\":\"lkxt\",\"FavoriteType\":\"user\",\"SourceType\":\"smlmbtxhwgfwsrta\",\"TimeModified\":\"oezbrhubsk\",\"Tags\":[\"ygo\"],\"Category\":\"kkqfqjbvle\",\"IsGeneratedFromTemplate\":true,\"UserId\":\"luiqtqzfavyvnqq\"}") .toObject(ApplicationInsightsComponentFavoriteInner.class); - Assertions.assertEquals("v", model.name()); - Assertions.assertEquals("dgwdslfhot", model.config()); - Assertions.assertEquals("cynpwlbjnp", model.version()); - Assertions.assertEquals(FavoriteType.SHARED, model.favoriteType()); - Assertions.assertEquals("yfsoppu", model.sourceType()); - Assertions.assertEquals("vorxzdmohct", model.tags().get(0)); - Assertions.assertEquals("vudwx", model.category()); - Assertions.assertEquals(false, model.isGeneratedFromTemplate()); + Assertions.assertEquals("clzedqbcvh", model.name()); + Assertions.assertEquals("h", model.config()); + Assertions.assertEquals("odqkdlwwqfb", model.version()); + Assertions.assertEquals(FavoriteType.USER, model.favoriteType()); + Assertions.assertEquals("smlmbtxhwgfwsrta", model.sourceType()); + Assertions.assertEquals("ygo", model.tags().get(0)); + Assertions.assertEquals("kkqfqjbvle", model.category()); + Assertions.assertTrue(model.isGeneratedFromTemplate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationInsightsComponentFavoriteInner model = new ApplicationInsightsComponentFavoriteInner().withName("v") - .withConfig("dgwdslfhot") - .withVersion("cynpwlbjnp") - .withFavoriteType(FavoriteType.SHARED) - .withSourceType("yfsoppu") - .withTags(Arrays.asList("vorxzdmohct")) - .withCategory("vudwx") - .withIsGeneratedFromTemplate(false); + ApplicationInsightsComponentFavoriteInner model + = new ApplicationInsightsComponentFavoriteInner().withName("clzedqbcvh") + .withConfig("h") + .withVersion("odqkdlwwqfb") + .withFavoriteType(FavoriteType.USER) + .withSourceType("smlmbtxhwgfwsrta") + .withTags(Arrays.asList("ygo")) + .withCategory("kkqfqjbvle") + .withIsGeneratedFromTemplate(true); model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentFavoriteInner.class); - Assertions.assertEquals("v", model.name()); - Assertions.assertEquals("dgwdslfhot", model.config()); - Assertions.assertEquals("cynpwlbjnp", model.version()); - Assertions.assertEquals(FavoriteType.SHARED, model.favoriteType()); - Assertions.assertEquals("yfsoppu", model.sourceType()); - Assertions.assertEquals("vorxzdmohct", model.tags().get(0)); - Assertions.assertEquals("vudwx", model.category()); - Assertions.assertEquals(false, model.isGeneratedFromTemplate()); + Assertions.assertEquals("clzedqbcvh", model.name()); + Assertions.assertEquals("h", model.config()); + Assertions.assertEquals("odqkdlwwqfb", model.version()); + Assertions.assertEquals(FavoriteType.USER, model.favoriteType()); + Assertions.assertEquals("smlmbtxhwgfwsrta", model.sourceType()); + Assertions.assertEquals("ygo", model.tags().get(0)); + Assertions.assertEquals("kkqfqjbvle", model.category()); + Assertions.assertTrue(model.isGeneratedFromTemplate()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureCapabilitiesInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureCapabilitiesInnerTests.java index 69ad6a07f523..36aa69a1a749 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureCapabilitiesInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureCapabilitiesInnerTests.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.generated; @@ -11,14 +11,7 @@ public final class ApplicationInsightsComponentFeatureCapabilitiesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentFeatureCapabilitiesInner model = BinaryData.fromString( - "{\"SupportExportData\":false,\"BurstThrottlePolicy\":\"tjelt\",\"MetadataClass\":\"ldhugjzzdatqxh\",\"LiveStreamMetrics\":true,\"ApplicationMap\":false,\"WorkItemIntegration\":true,\"PowerBIIntegration\":true,\"OpenSchema\":true,\"ProactiveDetection\":false,\"AnalyticsIntegration\":true,\"MultipleStepWebTest\":false,\"ApiAccessLevel\":\"kao\",\"TrackingType\":\"yiftyhxhuro\",\"DailyCap\":63.022675,\"DailyCapResetTime\":81.88607,\"ThrottleRate\":95.32984}") + "{\"SupportExportData\":true,\"BurstThrottlePolicy\":\"kl\",\"MetadataClass\":\"xbjhwuaanozjosph\",\"LiveStreamMetrics\":false,\"ApplicationMap\":false,\"WorkItemIntegration\":true,\"PowerBIIntegration\":false,\"OpenSchema\":true,\"ProactiveDetection\":true,\"AnalyticsIntegration\":false,\"MultipleStepWebTest\":true,\"ApiAccessLevel\":\"osytxitcskfckt\",\"TrackingType\":\"miekkezzikhlyfjh\",\"DailyCap\":18.868702,\"DailyCapResetTime\":67.63438,\"ThrottleRate\":63.00553}") .toObject(ApplicationInsightsComponentFeatureCapabilitiesInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentFeatureCapabilitiesInner model - = new ApplicationInsightsComponentFeatureCapabilitiesInner(); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentFeatureCapabilitiesInner.class); - } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureCapabilityTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureCapabilityTests.java index f7f301eb38a1..c39a970c1e7c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureCapabilityTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureCapabilityTests.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.generated; @@ -11,13 +11,7 @@ public final class ApplicationInsightsComponentFeatureCapabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentFeatureCapability model = BinaryData.fromString( - "{\"Name\":\"jionpimexgstxgc\",\"Description\":\"dg\",\"Value\":\"ajrmvdjwzrlovmc\",\"Unit\":\"hijco\",\"MeterId\":\"ctbzaq\",\"MeterRateFrequency\":\"sycbkbfk\"}") + "{\"Name\":\"ytguslf\",\"Description\":\"dcygqukyhejhz\",\"Value\":\"xgfpelolppv\",\"Unit\":\"r\",\"MeterId\":\"vu\",\"MeterRateFrequency\":\"raehtwdwrft\"}") .toObject(ApplicationInsightsComponentFeatureCapability.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentFeatureCapability model = new ApplicationInsightsComponentFeatureCapability(); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentFeatureCapability.class); - } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureTests.java index 7d014af84608..7b0c3f1e85e5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureTests.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.generated; @@ -11,13 +11,7 @@ public final class ApplicationInsightsComponentFeatureTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentFeature model = BinaryData.fromString( - "{\"FeatureName\":\"pyqr\",\"MeterId\":\"z\",\"MeterRateFrequency\":\"pvswjdkirso\",\"ResouceId\":\"qxhcrmn\",\"IsHidden\":true,\"Capabilities\":[{\"Name\":\"whdsoifiyip\",\"Description\":\"sqwpgrjb\",\"Value\":\"orcjxvsnby\",\"Unit\":\"abnmocpcyshu\",\"MeterId\":\"afbljjgpbtoqcjmk\",\"MeterRateFrequency\":\"a\"},{\"Name\":\"qidtqajzyu\",\"Description\":\"kudjkrlkhb\",\"Value\":\"fepgzgq\",\"Unit\":\"zloc\",\"MeterId\":\"c\",\"MeterRateFrequency\":\"ierhhbcsglummaj\"}],\"Title\":\"aodxo\",\"IsMainFeature\":true,\"SupportedAddonFeatures\":\"xkqpxo\"}") + "{\"FeatureName\":\"skdsnfdsdoakg\",\"MeterId\":\"lmkk\",\"MeterRateFrequency\":\"vdlhewpusdsttwv\",\"ResouceId\":\"vbbejdcng\",\"IsHidden\":false,\"Capabilities\":[{\"Name\":\"ufgmjzrwrdg\",\"Description\":\"wae\",\"Value\":\"uzkopbminrfd\",\"Unit\":\"yuhhziu\",\"MeterId\":\"fozbhdmsmlmzqhof\",\"MeterRateFrequency\":\"maequiahxicslfa\"},{\"Name\":\"z\",\"Description\":\"yylhalnswhccsp\",\"Value\":\"aivwitqscywu\",\"Unit\":\"woluhczbwemhair\",\"MeterId\":\"rgzdwmsweyp\",\"MeterRateFrequency\":\"dxggicccnxqhuexm\"}],\"Title\":\"tlstvlzywem\",\"IsMainFeature\":true,\"SupportedAddonFeatures\":\"csdtclusiypbs\"}") .toObject(ApplicationInsightsComponentFeature.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentFeature model = new ApplicationInsightsComponentFeature(); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentFeature.class); - } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentProactiveDetectionConfigurationInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentProactiveDetectionConfigurationInnerTests.java index 6993344ad9e3..edb84503a2ec 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentProactiveDetectionConfigurationInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentProactiveDetectionConfigurationInnerTests.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.generated; @@ -14,54 +14,54 @@ public final class ApplicationInsightsComponentProactiveDetectionConfigurationIn @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentProactiveDetectionConfigurationInner model = BinaryData.fromString( - "{\"name\":\"kdkexxp\",\"enabled\":false,\"sendEmailsToSubscriptionOwners\":true,\"customEmails\":[\"c\"],\"lastUpdatedTime\":\"pg\",\"ruleDefinitions\":{\"Name\":\"ocjjxhvpmouexh\",\"DisplayName\":\"xibqeojnx\",\"Description\":\"zvddntwndeicbtwn\",\"HelpUrl\":\"aoqvuh\",\"IsHidden\":true,\"IsEnabledByDefault\":false,\"IsInPreview\":false,\"SupportsEmailNotifications\":true}}") + "{\"name\":\"iby\",\"enabled\":false,\"sendEmailsToSubscriptionOwners\":true,\"customEmails\":[\"hfwpracstwit\",\"khevxccedc\",\"nmdyodnwzxl\",\"jc\"],\"lastUpdatedTime\":\"hlt\",\"ruleDefinitions\":{\"Name\":\"cxnavv\",\"DisplayName\":\"qiby\",\"Description\":\"nyowxwlmdjrkvfg\",\"HelpUrl\":\"fvpdbo\",\"IsHidden\":true,\"IsEnabledByDefault\":false,\"IsInPreview\":false,\"SupportsEmailNotifications\":true}}") .toObject(ApplicationInsightsComponentProactiveDetectionConfigurationInner.class); - Assertions.assertEquals("kdkexxp", model.name()); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(true, model.sendEmailsToSubscriptionOwners()); - Assertions.assertEquals("c", model.customEmails().get(0)); - Assertions.assertEquals("pg", model.lastUpdatedTime()); - Assertions.assertEquals("ocjjxhvpmouexh", model.ruleDefinitions().name()); - Assertions.assertEquals("xibqeojnx", model.ruleDefinitions().displayName()); - Assertions.assertEquals("zvddntwndeicbtwn", model.ruleDefinitions().description()); - Assertions.assertEquals("aoqvuh", model.ruleDefinitions().helpUrl()); - Assertions.assertEquals(true, model.ruleDefinitions().isHidden()); - Assertions.assertEquals(false, model.ruleDefinitions().isEnabledByDefault()); - Assertions.assertEquals(false, model.ruleDefinitions().isInPreview()); - Assertions.assertEquals(true, model.ruleDefinitions().supportsEmailNotifications()); + Assertions.assertEquals("iby", model.name()); + Assertions.assertFalse(model.enabled()); + Assertions.assertTrue(model.sendEmailsToSubscriptionOwners()); + Assertions.assertEquals("hfwpracstwit", model.customEmails().get(0)); + Assertions.assertEquals("hlt", model.lastUpdatedTime()); + Assertions.assertEquals("cxnavv", model.ruleDefinitions().name()); + Assertions.assertEquals("qiby", model.ruleDefinitions().displayName()); + Assertions.assertEquals("nyowxwlmdjrkvfg", model.ruleDefinitions().description()); + Assertions.assertEquals("fvpdbo", model.ruleDefinitions().helpUrl()); + Assertions.assertTrue(model.ruleDefinitions().isHidden()); + Assertions.assertFalse(model.ruleDefinitions().isEnabledByDefault()); + Assertions.assertFalse(model.ruleDefinitions().isInPreview()); + Assertions.assertTrue(model.ruleDefinitions().supportsEmailNotifications()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationInsightsComponentProactiveDetectionConfigurationInner model - = new ApplicationInsightsComponentProactiveDetectionConfigurationInner().withName("kdkexxp") + = new ApplicationInsightsComponentProactiveDetectionConfigurationInner().withName("iby") .withEnabled(false) .withSendEmailsToSubscriptionOwners(true) - .withCustomEmails(Arrays.asList("c")) - .withLastUpdatedTime("pg") - .withRuleDefinitions(new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions() - .withName("ocjjxhvpmouexh") - .withDisplayName("xibqeojnx") - .withDescription("zvddntwndeicbtwn") - .withHelpUrl("aoqvuh") - .withIsHidden(true) - .withIsEnabledByDefault(false) - .withIsInPreview(false) - .withSupportsEmailNotifications(true)); + .withCustomEmails(Arrays.asList("hfwpracstwit", "khevxccedc", "nmdyodnwzxl", "jc")) + .withLastUpdatedTime("hlt") + .withRuleDefinitions( + new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions().withName("cxnavv") + .withDisplayName("qiby") + .withDescription("nyowxwlmdjrkvfg") + .withHelpUrl("fvpdbo") + .withIsHidden(true) + .withIsEnabledByDefault(false) + .withIsInPreview(false) + .withSupportsEmailNotifications(true)); model = BinaryData.fromObject(model) .toObject(ApplicationInsightsComponentProactiveDetectionConfigurationInner.class); - Assertions.assertEquals("kdkexxp", model.name()); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(true, model.sendEmailsToSubscriptionOwners()); - Assertions.assertEquals("c", model.customEmails().get(0)); - Assertions.assertEquals("pg", model.lastUpdatedTime()); - Assertions.assertEquals("ocjjxhvpmouexh", model.ruleDefinitions().name()); - Assertions.assertEquals("xibqeojnx", model.ruleDefinitions().displayName()); - Assertions.assertEquals("zvddntwndeicbtwn", model.ruleDefinitions().description()); - Assertions.assertEquals("aoqvuh", model.ruleDefinitions().helpUrl()); - Assertions.assertEquals(true, model.ruleDefinitions().isHidden()); - Assertions.assertEquals(false, model.ruleDefinitions().isEnabledByDefault()); - Assertions.assertEquals(false, model.ruleDefinitions().isInPreview()); - Assertions.assertEquals(true, model.ruleDefinitions().supportsEmailNotifications()); + Assertions.assertEquals("iby", model.name()); + Assertions.assertFalse(model.enabled()); + Assertions.assertTrue(model.sendEmailsToSubscriptionOwners()); + Assertions.assertEquals("hfwpracstwit", model.customEmails().get(0)); + Assertions.assertEquals("hlt", model.lastUpdatedTime()); + Assertions.assertEquals("cxnavv", model.ruleDefinitions().name()); + Assertions.assertEquals("qiby", model.ruleDefinitions().displayName()); + Assertions.assertEquals("nyowxwlmdjrkvfg", model.ruleDefinitions().description()); + Assertions.assertEquals("fvpdbo", model.ruleDefinitions().helpUrl()); + Assertions.assertTrue(model.ruleDefinitions().isHidden()); + Assertions.assertFalse(model.ruleDefinitions().isEnabledByDefault()); + Assertions.assertFalse(model.ruleDefinitions().isInPreview()); + Assertions.assertTrue(model.ruleDefinitions().supportsEmailNotifications()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitionsTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitionsTests.java index 30f526b6c89b..21f89d38a874 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitionsTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitionsTests.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.generated; @@ -12,38 +12,38 @@ public final class ApplicationInsightsComponentProactiveDetectionConfigurationRu @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions model = BinaryData.fromString( - "{\"Name\":\"lmjthjq\",\"DisplayName\":\"pyeicxm\",\"Description\":\"iwqvhkh\",\"HelpUrl\":\"uigdtopbobjog\",\"IsHidden\":false,\"IsEnabledByDefault\":false,\"IsInPreview\":false,\"SupportsEmailNotifications\":true}") + "{\"Name\":\"krribdeibqi\",\"DisplayName\":\"kghv\",\"Description\":\"dzwmkrefajpj\",\"HelpUrl\":\"wkqnyhg\",\"IsHidden\":false,\"IsEnabledByDefault\":true,\"IsInPreview\":false,\"SupportsEmailNotifications\":false}") .toObject(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.class); - Assertions.assertEquals("lmjthjq", model.name()); - Assertions.assertEquals("pyeicxm", model.displayName()); - Assertions.assertEquals("iwqvhkh", model.description()); - Assertions.assertEquals("uigdtopbobjog", model.helpUrl()); - Assertions.assertEquals(false, model.isHidden()); - Assertions.assertEquals(false, model.isEnabledByDefault()); - Assertions.assertEquals(false, model.isInPreview()); - Assertions.assertEquals(true, model.supportsEmailNotifications()); + Assertions.assertEquals("krribdeibqi", model.name()); + Assertions.assertEquals("kghv", model.displayName()); + Assertions.assertEquals("dzwmkrefajpj", model.description()); + Assertions.assertEquals("wkqnyhg", model.helpUrl()); + Assertions.assertFalse(model.isHidden()); + Assertions.assertTrue(model.isEnabledByDefault()); + Assertions.assertFalse(model.isInPreview()); + Assertions.assertFalse(model.supportsEmailNotifications()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions model - = new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions().withName("lmjthjq") - .withDisplayName("pyeicxm") - .withDescription("iwqvhkh") - .withHelpUrl("uigdtopbobjog") + = new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions().withName("krribdeibqi") + .withDisplayName("kghv") + .withDescription("dzwmkrefajpj") + .withHelpUrl("wkqnyhg") .withIsHidden(false) - .withIsEnabledByDefault(false) + .withIsEnabledByDefault(true) .withIsInPreview(false) - .withSupportsEmailNotifications(true); + .withSupportsEmailNotifications(false); model = BinaryData.fromObject(model) .toObject(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.class); - Assertions.assertEquals("lmjthjq", model.name()); - Assertions.assertEquals("pyeicxm", model.displayName()); - Assertions.assertEquals("iwqvhkh", model.description()); - Assertions.assertEquals("uigdtopbobjog", model.helpUrl()); - Assertions.assertEquals(false, model.isHidden()); - Assertions.assertEquals(false, model.isEnabledByDefault()); - Assertions.assertEquals(false, model.isInPreview()); - Assertions.assertEquals(true, model.supportsEmailNotifications()); + Assertions.assertEquals("krribdeibqi", model.name()); + Assertions.assertEquals("kghv", model.displayName()); + Assertions.assertEquals("dzwmkrefajpj", model.description()); + Assertions.assertEquals("wkqnyhg", model.helpUrl()); + Assertions.assertFalse(model.isHidden()); + Assertions.assertTrue(model.isEnabledByDefault()); + Assertions.assertFalse(model.isInPreview()); + Assertions.assertFalse(model.supportsEmailNotifications()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentQuotaStatusInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentQuotaStatusInnerTests.java index 76147afe85d0..a2af864ed2be 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentQuotaStatusInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentQuotaStatusInnerTests.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.generated; @@ -11,13 +11,7 @@ public final class ApplicationInsightsComponentQuotaStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentQuotaStatusInner model = BinaryData - .fromString("{\"AppId\":\"zevndhkrwpdappds\",\"ShouldBeThrottled\":true,\"ExpirationTime\":\"wrwjfeu\"}") + .fromString("{\"AppId\":\"wneaiv\",\"ShouldBeThrottled\":true,\"ExpirationTime\":\"elpcirelsfeaenwa\"}") .toObject(ApplicationInsightsComponentQuotaStatusInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentQuotaStatusInner model = new ApplicationInsightsComponentQuotaStatusInner(); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentQuotaStatusInner.class); - } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentWebTestLocationInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentWebTestLocationInnerTests.java index f2dd033c3d32..18cdac26afa7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentWebTestLocationInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentWebTestLocationInnerTests.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.generated; @@ -11,13 +11,7 @@ public final class ApplicationInsightsComponentWebTestLocationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsComponentWebTestLocationInner model - = BinaryData.fromString("{\"DisplayName\":\"jrefovgmkqsle\",\"Tag\":\"vxyqjpkcattpngjc\"}") + = BinaryData.fromString("{\"DisplayName\":\"vewzcj\",\"Tag\":\"m\"}") .toObject(ApplicationInsightsComponentWebTestLocationInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentWebTestLocationInner model = new ApplicationInsightsComponentWebTestLocationInner(); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentWebTestLocationInner.class); - } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsWebTestLocationsListResultTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsWebTestLocationsListResultTests.java index fd8e7bc19147..d8fbd481e411 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsWebTestLocationsListResultTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsWebTestLocationsListResultTests.java @@ -1,29 +1,19 @@ // 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.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsWebTestLocationsListResult; -import java.util.Arrays; +import com.azure.resourcemanager.applicationinsights.implementation.models.ApplicationInsightsWebTestLocationsListResult; +import org.junit.jupiter.api.Assertions; public final class ApplicationInsightsWebTestLocationsListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInsightsWebTestLocationsListResult model = BinaryData.fromString( - "{\"value\":[{\"DisplayName\":\"jjugwdkcglhslaz\",\"Tag\":\"yggdtjixh\"},{\"DisplayName\":\"uofqwe\",\"Tag\":\"hmenevfyexfwhybc\"},{\"DisplayName\":\"vyvdcs\",\"Tag\":\"ynnaam\"},{\"DisplayName\":\"ctehfiqscjey\",\"Tag\":\"hezrkgq\"}]}") + "{\"value\":[{\"DisplayName\":\"kq\",\"Tag\":\"qgzsles\"},{\"DisplayName\":\"bhernntiew\",\"Tag\":\"cv\"},{\"DisplayName\":\"uwrbehwagoh\",\"Tag\":\"f\"},{\"DisplayName\":\"mrqemvvhmx\",\"Tag\":\"rjfut\"}],\"nextLink\":\"oe\"}") .toObject(ApplicationInsightsWebTestLocationsListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsWebTestLocationsListResult model = new ApplicationInsightsWebTestLocationsListResult() - .withValue(Arrays.asList(new ApplicationInsightsComponentWebTestLocationInner(), - new ApplicationInsightsComponentWebTestLocationInner(), - new ApplicationInsightsComponentWebTestLocationInner(), - new ApplicationInsightsComponentWebTestLocationInner())); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsWebTestLocationsListResult.class); + Assertions.assertEquals("oe", model.nextLink()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetWithResponseMockTests.java index 6ce854fb0da2..c91c758ce6cc 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetWithResponseMockTests.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.generated; @@ -20,7 +20,7 @@ public final class ComponentAvailableFeaturesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"Result\":[{\"FeatureName\":\"fukiscvwmzhw\",\"MeterId\":\"efaxvxilc\",\"MeterRateFrequency\":\"gnhnzeyq\",\"ResouceId\":\"jjfzqlqhycavo\",\"IsHidden\":true,\"Capabilities\":[{\"Name\":\"ee\",\"Description\":\"ieknl\",\"Value\":\"riaa\",\"Unit\":\"uagydwqfbylyrf\",\"MeterId\":\"agt\",\"MeterRateFrequency\":\"jocqwogfnzjvusf\"},{\"Name\":\"dmozu\",\"Description\":\"lfsbtkadpysow\",\"Value\":\"tgkbugrjqctojc\",\"Unit\":\"sofieypefojyqd\",\"MeterId\":\"u\",\"MeterRateFrequency\":\"cp\"}],\"Title\":\"wkhihihlhzdsqt\",\"IsMainFeature\":false,\"SupportedAddonFeatures\":\"gnowcjhfgmveca\"}]}"; + = "{\"Result\":[{\"FeatureName\":\"guwpi\",\"MeterId\":\"ajc\",\"MeterRateFrequency\":\"m\",\"ResouceId\":\"hfcf\",\"IsHidden\":false,\"Capabilities\":[{\"Name\":\"neuvyinzqod\",\"Description\":\"pgshoxgsgbpfgz\",\"Value\":\"tx\",\"Unit\":\"flbqvgaq\",\"MeterId\":\"gafcqu\",\"MeterRateFrequency\":\"dvetnws\"}],\"Title\":\"utnw\",\"IsMainFeature\":true,\"SupportedAddonFeatures\":\"cvuzhyrmewipmve\"},{\"FeatureName\":\"xukuqgsj\",\"MeterId\":\"undxgketw\",\"MeterRateFrequency\":\"hzjhf\",\"ResouceId\":\"hvvmuvgpmun\",\"IsHidden\":false,\"Capabilities\":[{\"Name\":\"hfbuzjyihsasbhud\",\"Description\":\"ohyuemslynsq\",\"Value\":\"pfoobr\",\"Unit\":\"tyms\",\"MeterId\":\"ygqdnfwqzdz\",\"MeterRateFrequency\":\"ilaxhn\"},{\"Name\":\"qlyvijo\",\"Description\":\"iv\",\"Value\":\"oyzunbixxr\",\"Unit\":\"kvcpwpgclr\",\"MeterId\":\"vtsoxf\",\"MeterRateFrequency\":\"enxpmyyefr\"}],\"Title\":\"pdnqqskawaoqvmmb\",\"IsMainFeature\":false,\"SupportedAddonFeatures\":\"rtql\"},{\"FeatureName\":\"megni\",\"MeterId\":\"vkxlz\",\"MeterRateFrequency\":\"drf\",\"ResouceId\":\"cealzxwh\",\"IsHidden\":true,\"Capabilities\":[{\"Name\":\"oyqhlwig\",\"Description\":\"vbkbxgomf\",\"Value\":\"uwasqvd\",\"Unit\":\"y\",\"MeterId\":\"uxakjsqzhzbezk\",\"MeterRateFrequency\":\"msidxasicddyvv\"}],\"Title\":\"kgfmocwahpq\",\"IsMainFeature\":true,\"SupportedAddonFeatures\":\"eaahhvjhhn\"},{\"FeatureName\":\"zybbj\",\"MeterId\":\"dj\",\"MeterRateFrequency\":\"yxkyxvx\",\"ResouceId\":\"blbjedn\",\"IsHidden\":true,\"Capabilities\":[{\"Name\":\"uaulxunsm\",\"Description\":\"nkppxynen\",\"Value\":\"vxei\",\"Unit\":\"gwklnsr\",\"MeterId\":\"feycxcktp\",\"MeterRateFrequency\":\"merteeammxqiek\"},{\"Name\":\"zddrt\",\"Description\":\"doj\",\"Value\":\"xv\",\"Unit\":\"refdee\",\"MeterId\":\"ecuijpxtxs\",\"MeterRateFrequency\":\"prtujwsawdd\"}],\"Title\":\"babxvitit\",\"IsMainFeature\":true,\"SupportedAddonFeatures\":\"exavoxt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationInsightsComponentAvailableFeatures response = manager.componentAvailableFeatures() - .getWithResponse("ydvfvfcjnae", "isrvhm", com.azure.core.util.Context.NONE) + .getWithResponse("xtgqscjavftjuh", "qaz", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetWithResponseMockTests.java index fd5de177b2d7..8e63f4124eb2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetWithResponseMockTests.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.generated; @@ -21,7 +21,7 @@ public final class ComponentCurrentBillingFeaturesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"DataVolumeCap\":{\"Cap\":92.44658,\"ResetTime\":520694685,\"WarningThreshold\":1829917026,\"StopSendNotificationWhenHitThreshold\":true,\"StopSendNotificationWhenHitCap\":true,\"MaxHistoryCap\":53.99011},\"CurrentBillingFeatures\":[\"jazysdzhezwwvaiq\"]}"; + = "{\"DataVolumeCap\":{\"Cap\":45.474182,\"ResetTime\":1594209666,\"WarningThreshold\":1579170685,\"StopSendNotificationWhenHitThreshold\":false,\"StopSendNotificationWhenHitCap\":false,\"MaxHistoryCap\":85.73181},\"CurrentBillingFeatures\":[\"jsto\"]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationInsightsComponentBillingFeatures response = manager.componentCurrentBillingFeatures() - .getWithResponse("khyawfvjlboxqv", "jlmxhomdynhd", com.azure.core.util.Context.NONE) + .getWithResponse("vnh", "abrqnkkzj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(92.44658F, response.dataVolumeCap().cap()); - Assertions.assertEquals(1829917026, response.dataVolumeCap().warningThreshold()); - Assertions.assertEquals(true, response.dataVolumeCap().stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(true, response.dataVolumeCap().stopSendNotificationWhenHitCap()); - Assertions.assertEquals("jazysdzhezwwvaiq", response.currentBillingFeatures().get(0)); + Assertions.assertEquals(45.474182F, response.dataVolumeCap().cap()); + Assertions.assertEquals(1579170685, response.dataVolumeCap().warningThreshold()); + Assertions.assertFalse(response.dataVolumeCap().stopSendNotificationWhenHitThreshold()); + Assertions.assertFalse(response.dataVolumeCap().stopSendNotificationWhenHitCap()); + Assertions.assertEquals("jsto", response.currentBillingFeatures().get(0)); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateWithResponseMockTests.java index d34093a354e9..0666974939cd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateWithResponseMockTests.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.generated; @@ -24,7 +24,7 @@ public final class ComponentCurrentBillingFeaturesUpdateWithResponseMockTests { @Test public void testUpdateWithResponse() throws Exception { String responseStr - = "{\"DataVolumeCap\":{\"Cap\":6.710392,\"ResetTime\":1752603485,\"WarningThreshold\":41953991,\"StopSendNotificationWhenHitThreshold\":true,\"StopSendNotificationWhenHitCap\":false,\"MaxHistoryCap\":25.37542},\"CurrentBillingFeatures\":[\"i\",\"hzvhxnkomtkubo\"]}"; + = "{\"DataVolumeCap\":{\"Cap\":64.7494,\"ResetTime\":1128673192,\"WarningThreshold\":1329889118,\"StopSendNotificationWhenHitThreshold\":true,\"StopSendNotificationWhenHitCap\":true,\"MaxHistoryCap\":64.314156},\"CurrentBillingFeatures\":[\"kb\"]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,20 +34,20 @@ public void testUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationInsightsComponentBillingFeatures response = manager.componentCurrentBillingFeatures() - .updateWithResponse("uvvfonkp", "hqyikvy", + .updateWithResponse("beitpkx", "tmo", new ApplicationInsightsComponentBillingFeaturesInner() - .withDataVolumeCap(new ApplicationInsightsComponentDataVolumeCap().withCap(71.17668F) - .withWarningThreshold(1578594338) - .withStopSendNotificationWhenHitThreshold(true) + .withDataVolumeCap(new ApplicationInsightsComponentDataVolumeCap().withCap(86.65244F) + .withWarningThreshold(2138880865) + .withStopSendNotificationWhenHitThreshold(false) .withStopSendNotificationWhenHitCap(true)) - .withCurrentBillingFeatures(Arrays.asList("jfybvpoekrsgsgb")), + .withCurrentBillingFeatures(Arrays.asList("maqxzhemjyh")), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(6.710392F, response.dataVolumeCap().cap()); - Assertions.assertEquals(41953991, response.dataVolumeCap().warningThreshold()); - Assertions.assertEquals(true, response.dataVolumeCap().stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(false, response.dataVolumeCap().stopSendNotificationWhenHitCap()); - Assertions.assertEquals("i", response.currentBillingFeatures().get(0)); + Assertions.assertEquals(64.7494F, response.dataVolumeCap().cap()); + Assertions.assertEquals(1329889118, response.dataVolumeCap().warningThreshold()); + Assertions.assertTrue(response.dataVolumeCap().stopSendNotificationWhenHitThreshold()); + Assertions.assertTrue(response.dataVolumeCap().stopSendNotificationWhenHitCap()); + Assertions.assertEquals("kb", response.currentBillingFeatures().get(0)); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetWithResponseMockTests.java index c2ba3889a6b4..ee6fd6a627a0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetWithResponseMockTests.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.generated; @@ -20,7 +20,7 @@ public final class ComponentFeatureCapabilitiesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"SupportExportData\":false,\"BurstThrottlePolicy\":\"hocxvdfffwafqrou\",\"MetadataClass\":\"spave\",\"LiveStreamMetrics\":false,\"ApplicationMap\":false,\"WorkItemIntegration\":false,\"PowerBIIntegration\":false,\"OpenSchema\":false,\"ProactiveDetection\":true,\"AnalyticsIntegration\":true,\"MultipleStepWebTest\":true,\"ApiAccessLevel\":\"moy\",\"TrackingType\":\"dyuib\",\"DailyCap\":13.8623295,\"DailyCapResetTime\":64.25693,\"ThrottleRate\":39.80005}"; + = "{\"SupportExportData\":false,\"BurstThrottlePolicy\":\"swpchwahfbousn\",\"MetadataClass\":\"pgfewetwlyx\",\"LiveStreamMetrics\":false,\"ApplicationMap\":false,\"WorkItemIntegration\":false,\"PowerBIIntegration\":false,\"OpenSchema\":false,\"ProactiveDetection\":false,\"AnalyticsIntegration\":true,\"MultipleStepWebTest\":true,\"ApiAccessLevel\":\"f\",\"TrackingType\":\"cporxvxcjz\",\"DailyCap\":38.4237,\"DailyCapResetTime\":62.733852,\"ThrottleRate\":60.352264}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationInsightsComponentFeatureCapabilities response = manager.componentFeatureCapabilities() - .getWithResponse("brn", "suxmpraf", com.azure.core.util.Context.NONE) + .getWithResponse("aomylwea", "ulcsethwwnpj", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsInnerTests.java index af4df875e897..5d1947e0e658 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsInnerTests.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.generated; @@ -12,16 +12,16 @@ public final class ComponentLinkedStorageAccountsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComponentLinkedStorageAccountsInner model = BinaryData.fromString( - "{\"properties\":{\"linkedStorageAccount\":\"okixrjqcir\"},\"id\":\"zpfrla\",\"name\":\"szrnwo\",\"type\":\"indfpwpjyl\"}") + "{\"properties\":{\"linkedStorageAccount\":\"lazszrn\"},\"id\":\"iin\",\"name\":\"fpwpjylwbt\",\"type\":\"h\"}") .toObject(ComponentLinkedStorageAccountsInner.class); - Assertions.assertEquals("okixrjqcir", model.linkedStorageAccount()); + Assertions.assertEquals("lazszrn", model.linkedStorageAccount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ComponentLinkedStorageAccountsInner model - = new ComponentLinkedStorageAccountsInner().withLinkedStorageAccount("okixrjqcir"); + = new ComponentLinkedStorageAccountsInner().withLinkedStorageAccount("lazszrn"); model = BinaryData.fromObject(model).toObject(ComponentLinkedStorageAccountsInner.class); - Assertions.assertEquals("okixrjqcir", model.linkedStorageAccount()); + Assertions.assertEquals("lazszrn", model.linkedStorageAccount()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationsCreateAndUpdateWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationsCreateAndUpdateWithResponseMockTests.java deleted file mode 100644 index 0a51183d2af8..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationsCreateAndUpdateWithResponseMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts; -import com.azure.resourcemanager.applicationinsights.models.StorageType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentLinkedStorageAccountsOperationsCreateAndUpdateWithResponseMockTests { - @Test - public void testCreateAndUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"linkedStorageAccount\":\"gjc\"},\"id\":\"gguxhemlwyw\",\"name\":\"eeczgfbu\",\"type\":\"klelssxb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ComponentLinkedStorageAccounts response = manager.componentLinkedStorageAccountsOperations() - .define(StorageType.SERVICE_PROFILER) - .withExistingComponent("ytwvczcswkacve", "yfdvlvhbwrnfxtgd") - .withLinkedStorageAccount("hehnmnaoya") - .create(); - - Assertions.assertEquals("gjc", response.linkedStorageAccount()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationsDeleteWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationsDeleteWithResponseMockTests.java deleted file mode 100644 index 539b78d21811..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.StorageType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentLinkedStorageAccountsOperationsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.componentLinkedStorageAccountsOperations() - .deleteWithResponse("aztb", "snsqowxwcoml", StorageType.SERVICE_PROFILER, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationsGetWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationsGetWithResponseMockTests.java deleted file mode 100644 index 780e1d173e61..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationsGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts; -import com.azure.resourcemanager.applicationinsights.models.StorageType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentLinkedStorageAccountsOperationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"linkedStorageAccount\":\"rhpw\"},\"id\":\"gddeimaw\",\"name\":\"o\",\"type\":\"gkkumuikjcj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ComponentLinkedStorageAccounts response = manager.componentLinkedStorageAccountsOperations() - .getWithResponse("rkmdyom", "xfbvfb", StorageType.SERVICE_PROFILER, com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rhpw", response.linkedStorageAccount()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsPatchTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsPatchTests.java index a98534cdc16f..977254e3d528 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsPatchTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsPatchTests.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.generated; @@ -12,16 +12,16 @@ public final class ComponentLinkedStorageAccountsPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComponentLinkedStorageAccountsPatch model - = BinaryData.fromString("{\"properties\":{\"linkedStorageAccount\":\"bgofeljag\"}}") + = BinaryData.fromString("{\"properties\":{\"linkedStorageAccount\":\"szfjvfbgofelja\"}}") .toObject(ComponentLinkedStorageAccountsPatch.class); - Assertions.assertEquals("bgofeljag", model.linkedStorageAccount()); + Assertions.assertEquals("szfjvfbgofelja", model.linkedStorageAccount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ComponentLinkedStorageAccountsPatch model - = new ComponentLinkedStorageAccountsPatch().withLinkedStorageAccount("bgofeljag"); + = new ComponentLinkedStorageAccountsPatch().withLinkedStorageAccount("szfjvfbgofelja"); model = BinaryData.fromObject(model).toObject(ComponentLinkedStorageAccountsPatch.class); - Assertions.assertEquals("bgofeljag", model.linkedStorageAccount()); + Assertions.assertEquals("szfjvfbgofelja", model.linkedStorageAccount()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentPurgeResponseInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentPurgeResponseInnerTests.java index e32d7d6741bd..e3c7f9a4f471 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentPurgeResponseInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentPurgeResponseInnerTests.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.generated; @@ -12,14 +12,7 @@ public final class ComponentPurgeResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComponentPurgeResponseInner model - = BinaryData.fromString("{\"operationId\":\"zw\"}").toObject(ComponentPurgeResponseInner.class); - Assertions.assertEquals("zw", model.operationId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentPurgeResponseInner model = new ComponentPurgeResponseInner().withOperationId("zw"); - model = BinaryData.fromObject(model).toObject(ComponentPurgeResponseInner.class); - Assertions.assertEquals("zw", model.operationId()); + = BinaryData.fromString("{\"operationId\":\"uhbxvvy\"}").toObject(ComponentPurgeResponseInner.class); + Assertions.assertEquals("uhbxvvy", model.operationId()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentPurgeStatusResponseInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentPurgeStatusResponseInnerTests.java index 7e98e65a272f..47be898918a8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentPurgeStatusResponseInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentPurgeStatusResponseInnerTests.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.generated; @@ -13,15 +13,7 @@ public final class ComponentPurgeStatusResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComponentPurgeStatusResponseInner model - = BinaryData.fromString("{\"status\":\"pending\"}").toObject(ComponentPurgeStatusResponseInner.class); - Assertions.assertEquals(PurgeState.PENDING, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentPurgeStatusResponseInner model - = new ComponentPurgeStatusResponseInner().withStatus(PurgeState.PENDING); - model = BinaryData.fromObject(model).toObject(ComponentPurgeStatusResponseInner.class); - Assertions.assertEquals(PurgeState.PENDING, model.status()); + = BinaryData.fromString("{\"status\":\"completed\"}").toObject(ComponentPurgeStatusResponseInner.class); + Assertions.assertEquals(PurgeState.COMPLETED, model.status()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetWithResponseMockTests.java index 9018d8ed8554..17d4ccdc5805 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetWithResponseMockTests.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.generated; @@ -19,7 +19,7 @@ public final class ComponentQuotaStatusGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - String responseStr = "{\"AppId\":\"lfkqojpy\",\"ShouldBeThrottled\":false,\"ExpirationTime\":\"rdcnifmzzsdy\"}"; + String responseStr = "{\"AppId\":\"alhsnvkc\",\"ShouldBeThrottled\":false,\"ExpirationTime\":\"rpoaimlnwi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,7 +29,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationInsightsComponentQuotaStatus response = manager.componentQuotaStatus() - .getWithResponse("ppnvdxz", "hihfrbbcevqagtlt", com.azure.core.util.Context.NONE) + .getWithResponse("wpfaj", "jwltlwtjjgu", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteByResourceGroupWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteByResourceGroupWithResponseMockTests.java index 6526c7a7b404..91a4aec5ae0c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteByResourceGroupWithResponseMockTests.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.generated; @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.components() - .deleteByResourceGroupWithResponse("ojmsvpkjprvkwc", "zqljyxgtczh", com.azure.core.util.Context.NONE); + .deleteByResourceGroupWithResponse("cmjkavlgorbmftpm", "tzfjltf", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusWithResponseMockTests.java index 9e3d792993d1..813a38020e61 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusWithResponseMockTests.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.generated; @@ -31,7 +31,7 @@ public void testGetPurgeStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ComponentPurgeStatusResponse response = manager.components() - .getPurgeStatusWithResponse("qjbvleorfmlu", "qtqzfavyv", "qqybarye", com.azure.core.util.Context.NONE) + .getPurgeStatusWithResponse("hlb", "pbzpcpiljhahz", "echndbnwieholew", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(PurgeState.PENDING, response.status()); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsResourceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsResourceTests.java index 1fde72f88ce9..f41887d50fd2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsResourceTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsResourceTests.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.generated; @@ -14,18 +14,19 @@ public final class ComponentsResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComponentsResource model = BinaryData.fromString( - "{\"location\":\"usarhmofc\",\"tags\":{\"rkdtmlxh\":\"my\"},\"id\":\"kuksjtxukcdm\",\"name\":\"arcryuanzwuxzdxt\",\"type\":\"yrlhmwhfpmrqobm\"}") + "{\"id\":\"xdigrjg\",\"name\":\"fzdm\",\"type\":\"qtfihwhbotzinga\",\"location\":\"vppho\",\"tags\":{\"nwcvtbvkayhmtnv\":\"zudphqamvdkfw\",\"zcjaesgvvsccy\":\"qiatkzwpcnp\"}}") .toObject(ComponentsResource.class); - Assertions.assertEquals("usarhmofc", model.location()); - Assertions.assertEquals("my", model.tags().get("rkdtmlxh")); + Assertions.assertEquals("vppho", model.location()); + Assertions.assertEquals("zudphqamvdkfw", model.tags().get("nwcvtbvkayhmtnv")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ComponentsResource model = new ComponentsResource().withLocation("usarhmofc").withTags(mapOf("rkdtmlxh", "my")); + ComponentsResource model = new ComponentsResource().withLocation("vppho") + .withTags(mapOf("nwcvtbvkayhmtnv", "zudphqamvdkfw", "zcjaesgvvsccy", "qiatkzwpcnp")); model = BinaryData.fromObject(model).toObject(ComponentsResource.class); - Assertions.assertEquals("usarhmofc", model.location()); - Assertions.assertEquals("my", model.tags().get("rkdtmlxh")); + Assertions.assertEquals("vppho", model.location()); + Assertions.assertEquals("zudphqamvdkfw", model.tags().get("nwcvtbvkayhmtnv")); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookInnerErrorTraceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookInnerErrorTraceTests.java index b1db778f7fde..60b1026893ff 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookInnerErrorTraceTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookInnerErrorTraceTests.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.generated; @@ -11,12 +11,6 @@ public final class DeletedWorkbookInnerErrorTraceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeletedWorkbookInnerErrorTrace model - = BinaryData.fromString("{\"trace\":[\"nbaeqphchqn\"]}").toObject(DeletedWorkbookInnerErrorTrace.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeletedWorkbookInnerErrorTrace model = new DeletedWorkbookInnerErrorTrace(); - model = BinaryData.fromObject(model).toObject(DeletedWorkbookInnerErrorTrace.class); + = BinaryData.fromString("{\"trace\":[\"ibthostgktstvd\"]}").toObject(DeletedWorkbookInnerErrorTrace.class); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookInnerTests.java index ffc09ae1994f..ebe30a9ea4ea 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookInnerTests.java @@ -1,76 +1,31 @@ // 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.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.applicationinsights.fluent.models.DeletedWorkbookInner; import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class DeletedWorkbookInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeletedWorkbookInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"cbihwqk\",\"serializedData\":\"fdntwjchrdgoih\",\"version\":\"mwctondzjluudfd\",\"timeModified\":\"2021-09-17T07:55:34Z\",\"category\":\"gytsbwtovv\",\"tags\":[\"einqf\",\"ufxqknpirgnepttw\",\"msniffc\"],\"userId\":\"qnrojlpijnkrxfrd\",\"sourceId\":\"c\",\"storageUri\":\"tizzronasxif\",\"description\":\"zq\",\"revision\":\"hftwesgog\"},\"kind\":\"shared\",\"etag\":\"nnxk\",\"location\":\"gnyhmossxkkg\",\"tags\":{\"hqxvcxgfrpdsofbs\":\"rghxjb\",\"z\":\"rnsvbuswd\",\"rtkfawnopq\":\"ybycnunvj\",\"x\":\"ikyzirtxdy\"},\"id\":\"ejnt\",\"name\":\"sewgioilqukr\",\"type\":\"dxtqmieoxo\"}") + "{\"properties\":{\"displayName\":\"ovjzhpjbibgjmfx\",\"serializedData\":\"mv\",\"version\":\"luyovwxnbkfezzx\",\"timeModified\":\"2021-06-16T15:34:06Z\",\"category\":\"hwzdgirujbz\",\"tags\":[\"vzzbtdcq\",\"pniyujviyl\",\"dshf\"],\"userId\":\"n\",\"sourceId\":\"gy\",\"storageUri\":\"rymsgaojfmw\",\"description\":\"otmrfhir\",\"revision\":\"ymoxoftpipiwyczu\"},\"kind\":\"shared\",\"etag\":\"pqjlihhyusps\",\"location\":\"sdvlmfwdgzxulucv\",\"tags\":{\"zvxurisjnhny\":\"rsre\",\"hu\":\"xifqjzgxm\",\"cesutrgjupauut\":\"lw\",\"qg\":\"woqhihe\"},\"id\":\"zpnfqntcypsxj\",\"name\":\"foimwkslircizjxv\",\"type\":\"dfcea\"}") .toObject(DeletedWorkbookInner.class); - Assertions.assertEquals("gnyhmossxkkg", model.location()); - Assertions.assertEquals("rghxjb", model.tags().get("hqxvcxgfrpdsofbs")); + Assertions.assertEquals("sdvlmfwdgzxulucv", model.location()); + Assertions.assertEquals("rsre", model.tags().get("zvxurisjnhny")); Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("nnxk", model.etag()); - Assertions.assertEquals("cbihwqk", model.displayName()); - Assertions.assertEquals("fdntwjchrdgoih", model.serializedData()); - Assertions.assertEquals("mwctondzjluudfd", model.version()); - Assertions.assertEquals("gytsbwtovv", model.category()); - Assertions.assertEquals("einqf", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("c", model.sourceId()); - Assertions.assertEquals("tizzronasxif", model.storageUri()); - Assertions.assertEquals("zq", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeletedWorkbookInner model = new DeletedWorkbookInner().withLocation("gnyhmossxkkg") - .withTags( - mapOf("hqxvcxgfrpdsofbs", "rghxjb", "z", "rnsvbuswd", "rtkfawnopq", "ybycnunvj", "x", "ikyzirtxdy")) - .withKind(WorkbookSharedTypeKind.SHARED) - .withEtag("nnxk") - .withDisplayName("cbihwqk") - .withSerializedData("fdntwjchrdgoih") - .withVersion("mwctondzjluudfd") - .withCategory("gytsbwtovv") - .withTagsPropertiesTags(Arrays.asList("einqf", "ufxqknpirgnepttw", "msniffc")) - .withSourceId("c") - .withStorageUri("tizzronasxif") - .withDescription("zq"); - model = BinaryData.fromObject(model).toObject(DeletedWorkbookInner.class); - Assertions.assertEquals("gnyhmossxkkg", model.location()); - Assertions.assertEquals("rghxjb", model.tags().get("hqxvcxgfrpdsofbs")); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("nnxk", model.etag()); - Assertions.assertEquals("cbihwqk", model.displayName()); - Assertions.assertEquals("fdntwjchrdgoih", model.serializedData()); - Assertions.assertEquals("mwctondzjluudfd", model.version()); - Assertions.assertEquals("gytsbwtovv", model.category()); - Assertions.assertEquals("einqf", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("c", model.sourceId()); - Assertions.assertEquals("tizzronasxif", model.storageUri()); - Assertions.assertEquals("zq", model.description()); - } - - // 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; + Assertions.assertEquals("pqjlihhyusps", model.etag()); + Assertions.assertEquals("ovjzhpjbibgjmfx", model.displayName()); + Assertions.assertEquals("mv", model.serializedData()); + Assertions.assertEquals("luyovwxnbkfezzx", model.version()); + Assertions.assertEquals("hwzdgirujbz", model.category()); + Assertions.assertEquals("vzzbtdcq", model.tagsPropertiesTags().get(0)); + Assertions.assertEquals("gy", model.sourceId()); + Assertions.assertEquals("rymsgaojfmw", model.storageUri()); + Assertions.assertEquals("otmrfhir", model.description()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookPropertiesTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookPropertiesTests.java index 28d5a960d1de..6cac95dd4768 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookPropertiesTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookPropertiesTests.java @@ -1,48 +1,26 @@ // 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.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.applicationinsights.fluent.models.DeletedWorkbookProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class DeletedWorkbookPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeletedWorkbookProperties model = BinaryData.fromString( - "{\"displayName\":\"ggufhyaomtb\",\"serializedData\":\"hhavgrvkffovjz\",\"version\":\"jbibg\",\"timeModified\":\"2021-05-29T05:16:16Z\",\"category\":\"xumvfcluyovw\",\"tags\":[\"kfezzxscyhwz\",\"g\",\"rujbzbomvzzbtdc\",\"vp\"],\"userId\":\"yujviylwdshfssn\",\"sourceId\":\"gy\",\"storageUri\":\"rymsgaojfmw\",\"description\":\"otmrfhir\",\"revision\":\"ymoxoftpipiwyczu\"}") + "{\"displayName\":\"novqfzge\",\"serializedData\":\"jdftuljltd\",\"version\":\"eamtmcz\",\"timeModified\":\"2020-12-22T05:25Z\",\"category\":\"ejwcwwqiok\",\"tags\":[\"xmojmsvpkjp\"],\"userId\":\"kwcf\",\"sourceId\":\"ljyxgtczhe\",\"storageUri\":\"bsdshmkxmaehvbbx\",\"description\":\"iplt\",\"revision\":\"htba\"}") .toObject(DeletedWorkbookProperties.class); - Assertions.assertEquals("ggufhyaomtb", model.displayName()); - Assertions.assertEquals("hhavgrvkffovjz", model.serializedData()); - Assertions.assertEquals("jbibg", model.version()); - Assertions.assertEquals("xumvfcluyovw", model.category()); - Assertions.assertEquals("kfezzxscyhwz", model.tags().get(0)); - Assertions.assertEquals("gy", model.sourceId()); - Assertions.assertEquals("rymsgaojfmw", model.storageUri()); - Assertions.assertEquals("otmrfhir", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeletedWorkbookProperties model = new DeletedWorkbookProperties().withDisplayName("ggufhyaomtb") - .withSerializedData("hhavgrvkffovjz") - .withVersion("jbibg") - .withCategory("xumvfcluyovw") - .withTags(Arrays.asList("kfezzxscyhwz", "g", "rujbzbomvzzbtdc", "vp")) - .withSourceId("gy") - .withStorageUri("rymsgaojfmw") - .withDescription("otmrfhir"); - model = BinaryData.fromObject(model).toObject(DeletedWorkbookProperties.class); - Assertions.assertEquals("ggufhyaomtb", model.displayName()); - Assertions.assertEquals("hhavgrvkffovjz", model.serializedData()); - Assertions.assertEquals("jbibg", model.version()); - Assertions.assertEquals("xumvfcluyovw", model.category()); - Assertions.assertEquals("kfezzxscyhwz", model.tags().get(0)); - Assertions.assertEquals("gy", model.sourceId()); - Assertions.assertEquals("rymsgaojfmw", model.storageUri()); - Assertions.assertEquals("otmrfhir", model.description()); + Assertions.assertEquals("novqfzge", model.displayName()); + Assertions.assertEquals("jdftuljltd", model.serializedData()); + Assertions.assertEquals("eamtmcz", model.version()); + Assertions.assertEquals("ejwcwwqiok", model.category()); + Assertions.assertEquals("xmojmsvpkjp", model.tags().get(0)); + Assertions.assertEquals("ljyxgtczhe", model.sourceId()); + Assertions.assertEquals("bsdshmkxmaehvbbx", model.storageUri()); + Assertions.assertEquals("iplt", model.description()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookResourceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookResourceTests.java index 33e507439b5f..a9f68eaf3b7a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookResourceTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbookResourceTests.java @@ -1,50 +1,23 @@ // 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.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.applicationinsights.models.DeletedWorkbookResource; import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class DeletedWorkbookResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeletedWorkbookResource model = BinaryData.fromString( - "{\"kind\":\"shared\",\"etag\":\"pqjlihhyusps\",\"location\":\"sdvlmfwdgzxulucv\",\"tags\":{\"zvxurisjnhny\":\"rsre\",\"hu\":\"xifqjzgxm\",\"cesutrgjupauut\":\"lw\",\"qg\":\"woqhihe\"},\"id\":\"zpnfqntcypsxj\",\"name\":\"foimwkslircizjxv\",\"type\":\"dfcea\"}") + "{\"kind\":\"shared\",\"etag\":\"vygdyft\",\"location\":\"rtwnawjslbi\",\"tags\":{\"qphchqnrnrpxehuw\":\"jgcyztsfmznba\",\"bydvkhbejdz\":\"ykqgaifmvik\"},\"id\":\"xcv\",\"name\":\"srhnjivo\",\"type\":\"v\"}") .toObject(DeletedWorkbookResource.class); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.location()); - Assertions.assertEquals("rsre", model.tags().get("zvxurisjnhny")); + Assertions.assertEquals("rtwnawjslbi", model.location()); + Assertions.assertEquals("jgcyztsfmznba", model.tags().get("qphchqnrnrpxehuw")); Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("pqjlihhyusps", model.etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeletedWorkbookResource model = new DeletedWorkbookResource().withLocation("sdvlmfwdgzxulucv") - .withTags(mapOf("zvxurisjnhny", "rsre", "hu", "xifqjzgxm", "cesutrgjupauut", "lw", "qg", "woqhihe")) - .withKind(WorkbookSharedTypeKind.SHARED) - .withEtag("pqjlihhyusps"); - model = BinaryData.fromObject(model).toObject(DeletedWorkbookResource.class); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.location()); - Assertions.assertEquals("rsre", model.tags().get("zvxurisjnhny")); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("pqjlihhyusps", model.etag()); - } - - // 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; + Assertions.assertEquals("vygdyft", model.etag()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbooksListMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbooksListMockTests.java deleted file mode 100644 index 1aae5180b947..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbooksListMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.DeletedWorkbook; -import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DeletedWorkbooksListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"zujksrlsmdes\",\"serializedData\":\"plpvm\",\"version\":\"doewbidyvt\",\"timeModified\":\"2021-03-16T10:14:22Z\",\"category\":\"xvgpiude\",\"tags\":[\"sxze\",\"paxwkufyk\"],\"userId\":\"uhxep\",\"sourceId\":\"utznabaobns\",\"storageUri\":\"jdjltymkmvgui\",\"description\":\"wartspphkixkykxd\",\"revision\":\"j\"},\"kind\":\"shared\",\"etag\":\"ucfx\",\"location\":\"kkflrmymyincqlhr\",\"tags\":{\"iiiovgqcgxuugq\":\"sl\",\"e\":\"ctotiowlx\",\"wphqlkccuzgygqw\":\"dptjgwdtgukranb\",\"lwgniiprglvawu\":\"hoi\"},\"id\":\"z\",\"name\":\"ufypiv\",\"type\":\"sbbjpmcu\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.deletedWorkbooks().list(CategoryType.TSG, Arrays.asList("c"), com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kkflrmymyincqlhr", response.iterator().next().location()); - Assertions.assertEquals("sl", response.iterator().next().tags().get("iiiovgqcgxuugq")); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.iterator().next().kind()); - Assertions.assertEquals("ucfx", response.iterator().next().etag()); - Assertions.assertEquals("zujksrlsmdes", response.iterator().next().displayName()); - Assertions.assertEquals("plpvm", response.iterator().next().serializedData()); - Assertions.assertEquals("doewbidyvt", response.iterator().next().version()); - Assertions.assertEquals("xvgpiude", response.iterator().next().category()); - Assertions.assertEquals("sxze", response.iterator().next().tagsPropertiesTags().get(0)); - Assertions.assertEquals("utznabaobns", response.iterator().next().sourceId()); - Assertions.assertEquals("jdjltymkmvgui", response.iterator().next().storageUri()); - Assertions.assertEquals("wartspphkixkykxd", response.iterator().next().description()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbooksListResultTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbooksListResultTests.java index 61d4830614a2..b0aaf0a9c350 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbooksListResultTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/DeletedWorkbooksListResultTests.java @@ -1,26 +1,19 @@ // 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.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.DeletedWorkbooksListResult; +import com.azure.resourcemanager.applicationinsights.implementation.models.DeletedWorkbooksListResult; import org.junit.jupiter.api.Assertions; public final class DeletedWorkbooksListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeletedWorkbooksListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"hldvriii\",\"serializedData\":\"jnalghf\",\"version\":\"tvsexsowuel\",\"timeModified\":\"2021-11-06T19:32:24Z\",\"category\":\"hahhxvrhmzkwpj\",\"tags\":[\"spughftqsxhq\",\"ujxukndxd\",\"grjguufzd\",\"syqtfi\"],\"userId\":\"hbotzingamvppho\",\"sourceId\":\"qzudphq\",\"storageUri\":\"vdkfwynwcvtbvk\",\"description\":\"hmtnvy\",\"revision\":\"atkzwpcnpw\"},\"kind\":\"shared\",\"etag\":\"esgvvsccyaj\",\"location\":\"qfhwyg\",\"tags\":{\"semdwzrmu\":\"dnkfx\",\"qvpsvuoymg\":\"apfcqdpsq\",\"rypqlmfeo\":\"celve\"},\"id\":\"erqwkyhkobopg\",\"name\":\"edkowepbqpcrfk\",\"type\":\"wccsnjvcdwxlpqek\"},{\"properties\":{\"displayName\":\"nkhtjsyingw\",\"serializedData\":\"qatmtdhtmdvy\",\"version\":\"ikdgszywkbir\",\"timeModified\":\"2021-03-20T05:32:50Z\",\"category\":\"zh\",\"tags\":[\"joqrvqqaatj\"],\"userId\":\"rv\",\"sourceId\":\"upmfiibfg\",\"storageUri\":\"ioolvrwxkvtkkgll\",\"description\":\"jygvjayvbl\",\"revision\":\"vkzuhbxvvyhgso\"},\"kind\":\"shared\",\"etag\":\"qufegxuvwzfbn\",\"location\":\"mctlpdngitv\",\"tags\":{\"jejveg\":\"hrixkwmy\",\"eaxhcexdrrvqahqk\":\"hbpnaixexccbd\",\"hyjsvfycx\":\"htpwij\",\"t\":\"bfvoowvrv\"},\"id\":\"jqppyostronzmy\",\"name\":\"gfipnsxk\",\"type\":\"cwaekrrjre\"},{\"properties\":{\"displayName\":\"xt\",\"serializedData\":\"gumhjglikkxws\",\"version\":\"lbqpvuzlmvfelf\",\"timeModified\":\"2021-11-09T20:34:51Z\",\"category\":\"plcrpwjxeznoig\",\"tags\":[\"jwmwkpnbs\",\"zejjoqk\",\"gfhsxttaugzxn\",\"aa\"],\"userId\":\"xdtnkdmkqjjlw\",\"sourceId\":\"nvrk\",\"storageUri\":\"ou\",\"description\":\"bre\",\"revision\":\"aays\"},\"kind\":\"shared\",\"etag\":\"qtnqtt\",\"location\":\"lwfffi\",\"tags\":{\"tmmjihyeozph\":\"jpqqmted\",\"qncygupkvi\":\"wau\",\"hfstotxhojujbyp\":\"mdscwxqupev\",\"xyfwnylrcool\":\"lmcuvhixb\"},\"id\":\"ttpkiwkkbnujrywv\",\"name\":\"y\",\"type\":\"bfpncurdo\"}],\"nextLink\":\"iithtywu\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"byrqufeg\",\"serializedData\":\"uvwzfbnh\",\"version\":\"ctlpdngitvgb\",\"timeModified\":\"2021-02-28T20:17:33Z\",\"category\":\"ixkwmyijejveg\",\"tags\":[\"pna\",\"xexccbdreaxhcexd\",\"rvqahqkghtpwi\",\"nhyjsv\"],\"userId\":\"cxzbfvoowvr\",\"sourceId\":\"t\",\"storageUri\":\"qp\",\"description\":\"ostronz\",\"revision\":\"hgfipnsxkmcw\"},\"kind\":\"shared\",\"etag\":\"rjreafxts\",\"location\":\"mhjglikkxwslolb\",\"tags\":{\"felfktg\":\"uzlm\",\"xeznoi\":\"lcrpw\"},\"id\":\"brnjwmw\",\"name\":\"pn\",\"type\":\"saz\"},{\"properties\":{\"displayName\":\"joqkagfhsxt\",\"serializedData\":\"augzxnfaazpxdtn\",\"version\":\"mkqjj\",\"timeModified\":\"2020-12-21T21:02:08Z\",\"category\":\"envrkpyouaibrebq\",\"tags\":[\"sj\",\"ixqtn\",\"ttezlw\",\"ffiakp\"],\"userId\":\"qqmtedltmmji\",\"sourceId\":\"eozphv\",\"storageUri\":\"uyqncygupkvipmd\",\"description\":\"wx\",\"revision\":\"pevzhfst\"},\"kind\":\"shared\",\"etag\":\"ojujbyp\",\"location\":\"mc\",\"tags\":{\"fw\":\"ixbjx\",\"coolsttpkiwkkb\":\"yl\",\"fpncurdo\":\"ujrywvtyl\"},\"id\":\"wiithtywub\",\"name\":\"cbihwqk\",\"type\":\"fdntwjchrdgoih\"},{\"properties\":{\"displayName\":\"mwctondzjluudfd\",\"serializedData\":\"wggytsbwtovvt\",\"version\":\"einqf\",\"timeModified\":\"2021-05-10T20:16:44Z\",\"category\":\"x\",\"tags\":[\"pirgnepttwq\",\"sniffc\",\"mqnrojlpijnkr\"],\"userId\":\"rddh\",\"sourceId\":\"atiz\",\"storageUri\":\"onasxifto\",\"description\":\"yzhftwesgogczh\",\"revision\":\"nxkrlgnyhmossxkk\"},\"kind\":\"shared\",\"etag\":\"rghxjb\",\"location\":\"qxvcxgfrpdsofb\",\"tags\":{\"yybyc\":\"nsvbuswdv\",\"ikyzirtxdy\":\"unvjsrtkfawnopq\",\"ejnt\":\"x\"},\"id\":\"sewgioilqukr\",\"name\":\"dxtqmieoxo\",\"type\":\"ggufhyaomtb\"}],\"nextLink\":\"havgrvk\"}") .toObject(DeletedWorkbooksListResult.class); - Assertions.assertEquals("iithtywu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeletedWorkbooksListResult model = new DeletedWorkbooksListResult().withNextLink("iithtywu"); - model = BinaryData.fromObject(model).toObject(DeletedWorkbooksListResult.class); - Assertions.assertEquals("iithtywu", model.nextLink()); + Assertions.assertEquals("havgrvk", model.nextLink()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddWithResponseMockTests.java index 576148ec91a5..c9c116e6b890 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddWithResponseMockTests.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.generated; @@ -24,7 +24,7 @@ public final class FavoritesAddWithResponseMockTests { @Test public void testAddWithResponse() throws Exception { String responseStr - = "{\"Name\":\"uodxesza\",\"Config\":\"elawumu\",\"Version\":\"lzkwrrwoy\",\"FavoriteId\":\"ucwyhahno\",\"FavoriteType\":\"user\",\"SourceType\":\"ywuhpsvfuur\",\"TimeModified\":\"lwexxwl\",\"Tags\":[\"iexzsrzpge\",\"q\",\"yb\",\"wwpgdakchzyvlixq\"],\"Category\":\"kcxk\",\"IsGeneratedFromTemplate\":false,\"UserId\":\"xmysuxswqrntv\"}"; + = "{\"Name\":\"bqigkx\",\"Config\":\"sazgakgacyrcmj\",\"Version\":\"spofapvuhry\",\"FavoriteId\":\"iofrzgbzjedmstk\",\"FavoriteType\":\"shared\",\"SourceType\":\"xbcuiiznkt\",\"TimeModified\":\"ansnvp\",\"Tags\":[\"mik\",\"stbz\"],\"Category\":\"iwbuqny\",\"IsGeneratedFromTemplate\":true,\"UserId\":\"fy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,25 +34,25 @@ public void testAddWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationInsightsComponentFavorite response = manager.favorites() - .addWithResponse("jtszcof", "zehtdhgb", "k", - new ApplicationInsightsComponentFavoriteInner().withName("eljeamurvzmlovua") - .withConfig("shcxlpmjerbdk") - .withVersion("vidizozsdb") - .withFavoriteType(FavoriteType.USER) - .withSourceType("n") - .withTags(Arrays.asList("v", "qjctzenkeif", "zhmkdasvflyh", "xcudchxgsr")) - .withCategory("ldforobwj") + .addWithResponse("cvsql", "nzoibgsxgnx", "yqo", + new ApplicationInsightsComponentFavoriteInner().withName("p") + .withConfig("xwdofdb") + .withVersion("qxeiiqbimhtmwwi") + .withFavoriteType(FavoriteType.SHARED) + .withSourceType("b") + .withTags(Arrays.asList("heb", "tswbzuwfmd")) + .withCategory("agegiz") .withIsGeneratedFromTemplate(true), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("uodxesza", response.name()); - Assertions.assertEquals("elawumu", response.config()); - Assertions.assertEquals("lzkwrrwoy", response.version()); - Assertions.assertEquals(FavoriteType.USER, response.favoriteType()); - Assertions.assertEquals("ywuhpsvfuur", response.sourceType()); - Assertions.assertEquals("iexzsrzpge", response.tags().get(0)); - Assertions.assertEquals("kcxk", response.category()); - Assertions.assertEquals(false, response.isGeneratedFromTemplate()); + Assertions.assertEquals("bqigkx", response.name()); + Assertions.assertEquals("sazgakgacyrcmj", response.config()); + Assertions.assertEquals("spofapvuhry", response.version()); + Assertions.assertEquals(FavoriteType.SHARED, response.favoriteType()); + Assertions.assertEquals("xbcuiiznkt", response.sourceType()); + Assertions.assertEquals("mik", response.tags().get(0)); + Assertions.assertEquals("iwbuqny", response.category()); + Assertions.assertTrue(response.isGeneratedFromTemplate()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteWithResponseMockTests.java index 26f8946c5726..481e7187f9eb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteWithResponseMockTests.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.generated; @@ -27,7 +27,8 @@ public void testDeleteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.favorites().deleteWithResponse("i", "etnluankrrfx", "eebtijvacvb", com.azure.core.util.Context.NONE); + manager.favorites() + .deleteWithResponse("brqbsmswzi", "gfuhokzrusw", "vhczznvfby", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetWithResponseMockTests.java index b8df033892f2..2fe15d3791a5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetWithResponseMockTests.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.generated; @@ -22,7 +22,7 @@ public final class FavoritesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"Name\":\"heioqa\",\"Config\":\"v\",\"Version\":\"ufuqyrx\",\"FavoriteId\":\"lcgqlsismj\",\"FavoriteType\":\"shared\",\"SourceType\":\"dgamquhiosrsj\",\"TimeModified\":\"vfcdisyirn\",\"Tags\":[\"czexrxzbujrtrhqv\"],\"Category\":\"evkh\",\"IsGeneratedFromTemplate\":true,\"UserId\":\"zonzlrpiqywnc\"}"; + = "{\"Name\":\"zuawxtzxpuamwa\",\"Config\":\"xrvxcushsphai\",\"Version\":\"xyasflvgsgzw\",\"FavoriteId\":\"akoi\",\"FavoriteType\":\"shared\",\"SourceType\":\"mjblmljhlny\",\"TimeModified\":\"otqyry\",\"Tags\":[\"bmqqvxmvw\"],\"Category\":\"tayx\",\"IsGeneratedFromTemplate\":false,\"UserId\":\"peujlzqn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationInsightsComponentFavorite response = manager.favorites() - .getWithResponse("zaapmudqmeqwi", "pibudqwyxebeybpm", "znrtffyaqit", com.azure.core.util.Context.NONE) + .getWithResponse("pmxelnwcltyje", "ex", "mlfmkqs", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("heioqa", response.name()); - Assertions.assertEquals("v", response.config()); - Assertions.assertEquals("ufuqyrx", response.version()); + Assertions.assertEquals("zuawxtzxpuamwa", response.name()); + Assertions.assertEquals("xrvxcushsphai", response.config()); + Assertions.assertEquals("xyasflvgsgzw", response.version()); Assertions.assertEquals(FavoriteType.SHARED, response.favoriteType()); - Assertions.assertEquals("dgamquhiosrsj", response.sourceType()); - Assertions.assertEquals("czexrxzbujrtrhqv", response.tags().get(0)); - Assertions.assertEquals("evkh", response.category()); - Assertions.assertEquals(true, response.isGeneratedFromTemplate()); + Assertions.assertEquals("mjblmljhlny", response.sourceType()); + Assertions.assertEquals("bmqqvxmvw", response.tags().get(0)); + Assertions.assertEquals("tayx", response.category()); + Assertions.assertFalse(response.isGeneratedFromTemplate()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListWithResponseMockTests.java index 09aff4620508..3bb7c60a4181 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListWithResponseMockTests.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.generated; @@ -25,7 +25,7 @@ public final class FavoritesListWithResponseMockTests { @Test public void testListWithResponse() throws Exception { String responseStr - = "[{\"Name\":\"g\",\"Config\":\"whryvycytdcl\",\"Version\":\"ccknfnwmbtmvp\",\"FavoriteId\":\"jdhttzaefedxi\",\"FavoriteType\":\"user\",\"SourceType\":\"phkmcrjdqnsdfz\",\"TimeModified\":\"gtgkylkdghr\",\"Tags\":[\"utlwxezwzhok\",\"bwnhhtql\",\"ehgpp\",\"pifhpfeoajvgcxtx\"],\"Category\":\"sheafid\",\"IsGeneratedFromTemplate\":true,\"UserId\":\"sr\"},{\"Name\":\"mks\",\"Config\":\"h\",\"Version\":\"ftxfkf\",\"FavoriteId\":\"gpr\",\"FavoriteType\":\"user\",\"SourceType\":\"llu\",\"TimeModified\":\"iqtgdqoh\",\"Tags\":[\"sldrizetpwbral\",\"libph\",\"qzmiza\",\"a\"],\"Category\":\"nkjpdnjzha\",\"IsGeneratedFromTemplate\":false,\"UserId\":\"hjlmu\"},{\"Name\":\"xprimrsop\",\"Config\":\"ecj\",\"Version\":\"islstv\",\"FavoriteId\":\"ylw\",\"FavoriteType\":\"shared\",\"SourceType\":\"umweoohguufuzboy\",\"TimeModified\":\"thwtzol\",\"Tags\":[\"mwmdxmebwjscjpa\",\"lxveabfqx\",\"mwmqtibx\"],\"Category\":\"jddtvqct\",\"IsGeneratedFromTemplate\":false,\"UserId\":\"jaeukmrsieekpn\"}]"; + = "[{\"Name\":\"dqxtbjwgnyf\",\"Config\":\"fzsvtuikzh\",\"Version\":\"qglcfhmlrqryxynq\",\"FavoriteId\":\"rd\",\"FavoriteType\":\"shared\",\"SourceType\":\"wxznptgoei\",\"TimeModified\":\"b\",\"Tags\":[\"fhvfsl\",\"vntjlrigjk\"],\"Category\":\"yrio\",\"IsGeneratedFromTemplate\":false,\"UserId\":\"dsxwaab\"},{\"Name\":\"ifrygzn\",\"Config\":\"axri\",\"Version\":\"zob\",\"FavoriteId\":\"pxl\",\"FavoriteType\":\"user\",\"SourceType\":\"elxieixynllxecw\",\"TimeModified\":\"ojphslhc\",\"Tags\":[\"u\",\"i\",\"dwfmvigorqjb\",\"tzh\"],\"Category\":\"glka\",\"IsGeneratedFromTemplate\":true,\"UserId\":\"qjujeickpzvcp\"}]"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,17 +35,17 @@ public void testListWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); List response = manager.favorites() - .listWithResponse("roylaxxu", "cdisd", FavoriteType.SHARED, FavoriteSourceType.RETENTION, true, - Arrays.asList("b"), com.azure.core.util.Context.NONE) + .listWithResponse("p", "dsdaultxijjumf", FavoriteType.SHARED, FavoriteSourceType.SEGMENTATION, false, + Arrays.asList("lnqnmcjn"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("g", response.get(0).name()); - Assertions.assertEquals("whryvycytdcl", response.get(0).config()); - Assertions.assertEquals("ccknfnwmbtmvp", response.get(0).version()); - Assertions.assertEquals(FavoriteType.USER, response.get(0).favoriteType()); - Assertions.assertEquals("phkmcrjdqnsdfz", response.get(0).sourceType()); - Assertions.assertEquals("utlwxezwzhok", response.get(0).tags().get(0)); - Assertions.assertEquals("sheafid", response.get(0).category()); - Assertions.assertEquals(true, response.get(0).isGeneratedFromTemplate()); + Assertions.assertEquals("dqxtbjwgnyf", response.get(0).name()); + Assertions.assertEquals("fzsvtuikzh", response.get(0).config()); + Assertions.assertEquals("qglcfhmlrqryxynq", response.get(0).version()); + Assertions.assertEquals(FavoriteType.SHARED, response.get(0).favoriteType()); + Assertions.assertEquals("wxznptgoei", response.get(0).sourceType()); + Assertions.assertEquals("fhvfsl", response.get(0).tags().get(0)); + Assertions.assertEquals("yrio", response.get(0).category()); + Assertions.assertFalse(response.get(0).isGeneratedFromTemplate()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateWithResponseMockTests.java index 69e3ebd856a2..05b08c1934a4 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateWithResponseMockTests.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.generated; @@ -24,7 +24,7 @@ public final class FavoritesUpdateWithResponseMockTests { @Test public void testUpdateWithResponse() throws Exception { String responseStr - = "{\"Name\":\"ruzslzoj\",\"Config\":\"ctfnmdxotng\",\"Version\":\"gugey\",\"FavoriteId\":\"hgrky\",\"FavoriteType\":\"shared\",\"SourceType\":\"bsnmfpph\",\"TimeModified\":\"eevy\",\"Tags\":[\"sgzfczbg\"],\"Category\":\"fgbegl\",\"IsGeneratedFromTemplate\":true,\"UserId\":\"o\"}"; + = "{\"Name\":\"zjgehkfkim\",\"Config\":\"ixokffqyin\",\"Version\":\"qepqwhixmon\",\"FavoriteId\":\"shiy\",\"FavoriteType\":\"shared\",\"SourceType\":\"lfcldu\",\"TimeModified\":\"birdsvuwcobiegs\",\"Tags\":[\"inwjizcilngh\",\"shejjtbxqm\"],\"Category\":\"uxlxqzvners\",\"IsGeneratedFromTemplate\":true,\"UserId\":\"crwnamikz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,25 +34,25 @@ public void testUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationInsightsComponentFavorite response = manager.favorites() - .updateWithResponse("wijpsttexoqqpwc", "yufmhruncuwmq", "pkcdqzhlct", - new ApplicationInsightsComponentFavoriteInner().withName("unqndyfpchrqb") - .withConfig("jrcg") - .withVersion("ydcwboxjumv") + .updateWithResponse("sgcrpfbcunezzce", "elfwy", "wl", + new ApplicationInsightsComponentFavoriteInner().withName("jwetnpsihcla") + .withConfig("va") + .withVersion("pt") .withFavoriteType(FavoriteType.SHARED) - .withSourceType("ubrjtl") - .withTags(Arrays.asList("l", "z")) - .withCategory("sccbiuimzd") + .withSourceType("kchcxwa") + .withTags(Arrays.asList("hpsylkksh", "bffmbmxz", "rgywwp", "jx")) + .withCategory("ptfujgicgaaoept") .withIsGeneratedFromTemplate(true), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ruzslzoj", response.name()); - Assertions.assertEquals("ctfnmdxotng", response.config()); - Assertions.assertEquals("gugey", response.version()); + Assertions.assertEquals("zjgehkfkim", response.name()); + Assertions.assertEquals("ixokffqyin", response.config()); + Assertions.assertEquals("qepqwhixmon", response.version()); Assertions.assertEquals(FavoriteType.SHARED, response.favoriteType()); - Assertions.assertEquals("bsnmfpph", response.sourceType()); - Assertions.assertEquals("sgzfczbg", response.tags().get(0)); - Assertions.assertEquals("fgbegl", response.category()); - Assertions.assertEquals(true, response.isGeneratedFromTemplate()); + Assertions.assertEquals("lfcldu", response.sourceType()); + Assertions.assertEquals("inwjizcilngh", response.tags().get(0)); + Assertions.assertEquals("uxlxqzvners", response.category()); + Assertions.assertTrue(response.isGeneratedFromTemplate()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/InnerErrorTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/InnerErrorTests.java index be485ef5de3b..4dc39a448a3e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/InnerErrorTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/InnerErrorTests.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.generated; @@ -12,18 +12,10 @@ public final class InnerErrorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - InnerError model = BinaryData.fromString("{\"diagnosticcontext\":\"cr\",\"time\":\"2021-02-13T07:50:35Z\"}") - .toObject(InnerError.class); - Assertions.assertEquals("cr", model.diagnosticcontext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T07:50:35Z"), model.time()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { InnerError model - = new InnerError().withDiagnosticcontext("cr").withTime(OffsetDateTime.parse("2021-02-13T07:50:35Z")); - model = BinaryData.fromObject(model).toObject(InnerError.class); - Assertions.assertEquals("cr", model.diagnosticcontext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T07:50:35Z"), model.time()); + = BinaryData.fromString("{\"diagnosticcontext\":\"dpumnzgmw\",\"time\":\"2021-05-04T13:21:35Z\"}") + .toObject(InnerError.class); + Assertions.assertEquals("dpumnzgmw", model.diagnosticcontext()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T13:21:35Z"), model.time()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/LinkedStorageAccountsPropertiesTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/LinkedStorageAccountsPropertiesTests.java index d2f42b3f9191..1264e72c1d62 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/LinkedStorageAccountsPropertiesTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/LinkedStorageAccountsPropertiesTests.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.generated; @@ -11,16 +11,15 @@ public final class LinkedStorageAccountsPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LinkedStorageAccountsProperties model = BinaryData.fromString("{\"linkedStorageAccount\":\"tlhflsjcdhszf\"}") + LinkedStorageAccountsProperties model = BinaryData.fromString("{\"linkedStorageAccount\":\"sj\"}") .toObject(LinkedStorageAccountsProperties.class); - Assertions.assertEquals("tlhflsjcdhszf", model.linkedStorageAccount()); + Assertions.assertEquals("sj", model.linkedStorageAccount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LinkedStorageAccountsProperties model - = new LinkedStorageAccountsProperties().withLinkedStorageAccount("tlhflsjcdhszf"); + LinkedStorageAccountsProperties model = new LinkedStorageAccountsProperties().withLinkedStorageAccount("sj"); model = BinaryData.fromObject(model).toObject(LinkedStorageAccountsProperties.class); - Assertions.assertEquals("tlhflsjcdhszf", model.linkedStorageAccount()); + Assertions.assertEquals("sj", model.linkedStorageAccount()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ManagedServiceIdentityTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ManagedServiceIdentityTests.java index cfa5fe6bfbd5..e9f979a67daa 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ManagedServiceIdentityTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ManagedServiceIdentityTests.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.generated; @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"f94f7f78-8bc0-49ee-95bb-364091325d95\",\"tenantId\":\"5074633e-6bd1-48e1-bc7f-7a81ab0f681a\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ykhevxccedcpnmdy\":{\"principalId\":\"07b1cc53-97ea-4a81-bbf1-e18b4e51d4ba\",\"clientId\":\"72109b87-89c6-405b-9324-23373ca46d9c\"}}}") + "{\"principalId\":\"fiyipjxsqwpgrj\",\"tenantId\":\"norcjxvsnbyxqab\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"jmkljavbqidtqajz\":{\"principalId\":\"cyshurzafbljjgp\",\"clientId\":\"oq\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); } @@ -24,7 +24,7 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("ykhevxccedcpnmdy", new UserAssignedIdentity())); + .withUserAssignedIdentities(mapOf("jmkljavbqidtqajz", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationDisplayTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationDisplayTests.java index 36cd65116213..9fd5224c5e71 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationDisplayTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationDisplayTests.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.generated; @@ -12,20 +12,10 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model - = BinaryData.fromString("{\"provider\":\"kx\",\"resource\":\"skpbhenbtkcxywn\",\"operation\":\"nrs\"}") + = BinaryData.fromString("{\"provider\":\"krwpdap\",\"resource\":\"sbdkvwr\",\"operation\":\"feusnhut\"}") .toObject(OperationDisplay.class); - Assertions.assertEquals("kx", model.provider()); - Assertions.assertEquals("skpbhenbtkcxywn", model.resource()); - Assertions.assertEquals("nrs", model.operation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model - = new OperationDisplay().withProvider("kx").withResource("skpbhenbtkcxywn").withOperation("nrs"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("kx", model.provider()); - Assertions.assertEquals("skpbhenbtkcxywn", model.resource()); - Assertions.assertEquals("nrs", model.operation()); + Assertions.assertEquals("krwpdap", model.provider()); + Assertions.assertEquals("sbdkvwr", model.resource()); + Assertions.assertEquals("feusnhut", model.operation()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationInnerTests.java index 663445afc5bc..7f6b7ecb7021 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationInnerTests.java @@ -1,34 +1,22 @@ // 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.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner; -import com.azure.resourcemanager.applicationinsights.models.OperationDisplay; import org.junit.jupiter.api.Assertions; public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"butr\",\"display\":{\"provider\":\"na\",\"resource\":\"mhjrunmpxttdbhr\",\"operation\":\"l\"}}") + "{\"name\":\"jbiksqrglssai\",\"display\":{\"provider\":\"jwnzlljfmp\",\"resource\":\"ebvmgxsabkyqd\",\"operation\":\"jitcjczdzevn\"}}") .toObject(OperationInner.class); - Assertions.assertEquals("butr", model.name()); - Assertions.assertEquals("na", model.display().provider()); - Assertions.assertEquals("mhjrunmpxttdbhr", model.display().resource()); - Assertions.assertEquals("l", model.display().operation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withName("butr") - .withDisplay(new OperationDisplay().withProvider("na").withResource("mhjrunmpxttdbhr").withOperation("l")); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("butr", model.name()); - Assertions.assertEquals("na", model.display().provider()); - Assertions.assertEquals("mhjrunmpxttdbhr", model.display().resource()); - Assertions.assertEquals("l", model.display().operation()); + Assertions.assertEquals("jbiksqrglssai", model.name()); + Assertions.assertEquals("jwnzlljfmp", model.display().provider()); + Assertions.assertEquals("ebvmgxsabkyqd", model.display().resource()); + Assertions.assertEquals("jitcjczdzevn", model.display().operation()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationListResultTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationListResultTests.java index 23fd9b41673c..113cfe9f14a5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationListResultTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationListResultTests.java @@ -1,50 +1,23 @@ // 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.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner; -import com.azure.resourcemanager.applicationinsights.models.OperationDisplay; -import com.azure.resourcemanager.applicationinsights.models.OperationListResult; -import java.util.Arrays; +import com.azure.resourcemanager.applicationinsights.implementation.models.OperationListResult; import org.junit.jupiter.api.Assertions; public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"wutttxfvjrbi\",\"display\":{\"provider\":\"xepcyvahfn\",\"resource\":\"kyqxjvuujqgidokg\",\"operation\":\"jyoxgvclt\"}},{\"name\":\"sncghkjeszz\",\"display\":{\"provider\":\"jhtxfvgxbfsmxne\",\"resource\":\"pvecxgodeb\",\"operation\":\"kk\"}},{\"name\":\"mpukgriw\",\"display\":{\"provider\":\"lfbxzpuzycisp\",\"resource\":\"zahmgkbrpyydhibn\",\"operation\":\"qkpikadrgvtqagnb\"}}],\"nextLink\":\"nhijggmebfsi\"}") + "{\"value\":[{\"name\":\"bbkpodep\",\"display\":{\"provider\":\"inuvamiheogn\",\"resource\":\"xzxtheo\",\"operation\":\"si\"}},{\"name\":\"evcciqihnhun\",\"display\":{\"provider\":\"jzrnf\",\"resource\":\"xgispemvtzfkufu\",\"operation\":\"jofxqe\"}},{\"name\":\"jaeq\",\"display\":{\"provider\":\"jbasvmsmjqulngs\",\"resource\":\"nbybkzgcwrwcl\",\"operation\":\"wrljdouskc\"}}],\"nextLink\":\"kocrcjdkwtnhx\"}") .toObject(OperationListResult.class); - Assertions.assertEquals("wutttxfvjrbi", model.value().get(0).name()); - Assertions.assertEquals("xepcyvahfn", model.value().get(0).display().provider()); - Assertions.assertEquals("kyqxjvuujqgidokg", model.value().get(0).display().resource()); - Assertions.assertEquals("jyoxgvclt", model.value().get(0).display().operation()); - Assertions.assertEquals("nhijggmebfsi", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult().withValue(Arrays.asList( - new OperationInner().withName("wutttxfvjrbi") - .withDisplay(new OperationDisplay().withProvider("xepcyvahfn") - .withResource("kyqxjvuujqgidokg") - .withOperation("jyoxgvclt")), - new OperationInner().withName("sncghkjeszz") - .withDisplay(new OperationDisplay().withProvider("jhtxfvgxbfsmxne") - .withResource("pvecxgodeb") - .withOperation("kk")), - new OperationInner().withName("mpukgriw") - .withDisplay(new OperationDisplay().withProvider("lfbxzpuzycisp") - .withResource("zahmgkbrpyydhibn") - .withOperation("qkpikadrgvtqagnb")))) - .withNextLink("nhijggmebfsi"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("wutttxfvjrbi", model.value().get(0).name()); - Assertions.assertEquals("xepcyvahfn", model.value().get(0).display().provider()); - Assertions.assertEquals("kyqxjvuujqgidokg", model.value().get(0).display().resource()); - Assertions.assertEquals("jyoxgvclt", model.value().get(0).display().operation()); - Assertions.assertEquals("nhijggmebfsi", model.nextLink()); + Assertions.assertEquals("bbkpodep", model.value().get(0).name()); + Assertions.assertEquals("inuvamiheogn", model.value().get(0).display().provider()); + Assertions.assertEquals("xzxtheo", model.value().get(0).display().resource()); + Assertions.assertEquals("si", model.value().get(0).display().operation()); + Assertions.assertEquals("kocrcjdkwtnhx", model.nextLink()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/PrivateLinkScopedResourceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/PrivateLinkScopedResourceTests.java index 4c75e5dbafb0..c24519be86a9 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/PrivateLinkScopedResourceTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/PrivateLinkScopedResourceTests.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.generated; @@ -11,18 +11,10 @@ public final class PrivateLinkScopedResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkScopedResource model = BinaryData.fromString("{\"ResourceId\":\"deupewnwrei\",\"ScopeId\":\"zyf\"}") - .toObject(PrivateLinkScopedResource.class); - Assertions.assertEquals("deupewnwrei", model.resourceId()); - Assertions.assertEquals("zyf", model.scopeId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { PrivateLinkScopedResource model - = new PrivateLinkScopedResource().withResourceId("deupewnwrei").withScopeId("zyf"); - model = BinaryData.fromObject(model).toObject(PrivateLinkScopedResource.class); - Assertions.assertEquals("deupewnwrei", model.resourceId()); - Assertions.assertEquals("zyf", model.scopeId()); + = BinaryData.fromString("{\"ResourceId\":\"uoymgccelvezry\",\"ScopeId\":\"lmfeokerq\"}") + .toObject(PrivateLinkScopedResource.class); + Assertions.assertEquals("uoymgccelvezry", model.resourceId()); + Assertions.assertEquals("lmfeokerq", model.scopeId()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetWithResponseMockTests.java index 53c8d52a2784..6fc975827f6a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetWithResponseMockTests.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.generated; @@ -21,7 +21,7 @@ public final class ProactiveDetectionConfigurationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"name\":\"gncxykxhdj\",\"enabled\":false,\"sendEmailsToSubscriptionOwners\":true,\"customEmails\":[\"x\",\"h\",\"cporxvxcjz\"],\"lastUpdatedTime\":\"izxfpxt\",\"ruleDefinitions\":{\"Name\":\"cja\",\"DisplayName\":\"t\",\"Description\":\"hdqazkmtgguwp\",\"HelpUrl\":\"r\",\"IsHidden\":false,\"IsEnabledByDefault\":true,\"IsInPreview\":true,\"SupportsEmailNotifications\":false}}"; + = "{\"name\":\"xfkfwegprhptill\",\"enabled\":false,\"sendEmailsToSubscriptionOwners\":true,\"customEmails\":[\"dqohmc\",\"sldrizetpwbral\"],\"lastUpdatedTime\":\"ibph\",\"ruleDefinitions\":{\"Name\":\"mizak\",\"DisplayName\":\"ankjpdnjzh\",\"Description\":\"oylhjlmuoyxprimr\",\"HelpUrl\":\"pteecjme\",\"IsHidden\":false,\"IsEnabledByDefault\":false,\"IsInPreview\":false,\"SupportsEmailNotifications\":false}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,21 +32,21 @@ public void testGetWithResponse() throws Exception { ApplicationInsightsComponentProactiveDetectionConfiguration response = manager.proactiveDetectionConfigurations() - .getWithResponse("fb", "usnfepgfewet", "l", com.azure.core.util.Context.NONE) + .getWithResponse("e", "ajvgcxtxjcsheafi", "ltugsresmkssjhoi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gncxykxhdj", response.name()); - Assertions.assertEquals(false, response.enabled()); - Assertions.assertEquals(true, response.sendEmailsToSubscriptionOwners()); - Assertions.assertEquals("x", response.customEmails().get(0)); - Assertions.assertEquals("izxfpxt", response.lastUpdatedTime()); - Assertions.assertEquals("cja", response.ruleDefinitions().name()); - Assertions.assertEquals("t", response.ruleDefinitions().displayName()); - Assertions.assertEquals("hdqazkmtgguwp", response.ruleDefinitions().description()); - Assertions.assertEquals("r", response.ruleDefinitions().helpUrl()); - Assertions.assertEquals(false, response.ruleDefinitions().isHidden()); - Assertions.assertEquals(true, response.ruleDefinitions().isEnabledByDefault()); - Assertions.assertEquals(true, response.ruleDefinitions().isInPreview()); - Assertions.assertEquals(false, response.ruleDefinitions().supportsEmailNotifications()); + Assertions.assertEquals("xfkfwegprhptill", response.name()); + Assertions.assertFalse(response.enabled()); + Assertions.assertTrue(response.sendEmailsToSubscriptionOwners()); + Assertions.assertEquals("dqohmc", response.customEmails().get(0)); + Assertions.assertEquals("ibph", response.lastUpdatedTime()); + Assertions.assertEquals("mizak", response.ruleDefinitions().name()); + Assertions.assertEquals("ankjpdnjzh", response.ruleDefinitions().displayName()); + Assertions.assertEquals("oylhjlmuoyxprimr", response.ruleDefinitions().description()); + Assertions.assertEquals("pteecjme", response.ruleDefinitions().helpUrl()); + Assertions.assertFalse(response.ruleDefinitions().isHidden()); + Assertions.assertFalse(response.ruleDefinitions().isEnabledByDefault()); + Assertions.assertFalse(response.ruleDefinitions().isInPreview()); + Assertions.assertFalse(response.ruleDefinitions().supportsEmailNotifications()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListWithResponseMockTests.java index 7dd585f26202..36a75e8626d1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListWithResponseMockTests.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.generated; @@ -22,7 +22,7 @@ public final class ProactiveDetectionConfigurationsListWithResponseMockTests { @Test public void testListWithResponse() throws Exception { String responseStr - = "[{\"name\":\"wifzmp\",\"enabled\":true,\"sendEmailsToSubscriptionOwners\":true,\"customEmails\":[\"kfxcvhrfs\"],\"lastUpdatedTime\":\"uagrttikteusqc\",\"ruleDefinitions\":{\"Name\":\"yklxubyjaffmmfbl\",\"DisplayName\":\"cuubgq\",\"Description\":\"rtalmet\",\"HelpUrl\":\"wgdsl\",\"IsHidden\":false,\"IsEnabledByDefault\":false,\"IsInPreview\":false,\"SupportsEmailNotifications\":false}},{\"name\":\"z\",\"enabled\":true,\"sendEmailsToSubscriptionOwners\":false,\"customEmails\":[\"utcxapzhy\"],\"lastUpdatedTime\":\"etoge\",\"ruleDefinitions\":{\"Name\":\"xslhvnhlabrqnkk\",\"DisplayName\":\"cjbtrgaehvvib\",\"Description\":\"jj\",\"HelpUrl\":\"oqbeitpkxzt\",\"IsHidden\":false,\"IsEnabledByDefault\":false,\"IsInPreview\":false,\"SupportsEmailNotifications\":false}},{\"name\":\"gfcwqmpimaqxzhem\",\"enabled\":false,\"sendEmailsToSubscriptionOwners\":true,\"customEmails\":[\"swtwkozzwc\",\"lkb\",\"wpfaj\"],\"lastUpdatedTime\":\"wltlwtjjguktalh\",\"ruleDefinitions\":{\"Name\":\"kcdmxzrpoaimln\",\"DisplayName\":\"aaomylweazu\",\"Description\":\"sethwwn\",\"HelpUrl\":\"hlf\",\"IsHidden\":false,\"IsEnabledByDefault\":false,\"IsInPreview\":true,\"SupportsEmailNotifications\":true}}]"; + = "[{\"name\":\"hhxud\",\"enabled\":false,\"sendEmailsToSubscriptionOwners\":false,\"customEmails\":[\"nsiru\"],\"lastUpdatedTime\":\"z\",\"ruleDefinitions\":{\"Name\":\"sckdlp\",\"DisplayName\":\"zrcxfailcfxwmdbo\",\"Description\":\"fgsftufqob\",\"HelpUrl\":\"lnacgcc\",\"IsHidden\":false,\"IsEnabledByDefault\":false,\"IsInPreview\":false,\"SupportsEmailNotifications\":false}},{\"name\":\"tnrzvuljra\",\"enabled\":false,\"sendEmailsToSubscriptionOwners\":false,\"customEmails\":[\"qgukkjqnv\"],\"lastUpdatedTime\":\"oylaxxul\",\"ruleDefinitions\":{\"Name\":\"sdosfjbjsvgjr\",\"DisplayName\":\"r\",\"Description\":\"ycy\",\"HelpUrl\":\"c\",\"IsHidden\":false,\"IsEnabledByDefault\":true,\"IsInPreview\":false,\"SupportsEmailNotifications\":false}},{\"name\":\"mbtmvpdvjdhttzae\",\"enabled\":false,\"sendEmailsToSubscriptionOwners\":true,\"customEmails\":[\"hrphkmcrjdqn\"],\"lastUpdatedTime\":\"fzpbgtgkyl\",\"ruleDefinitions\":{\"Name\":\"hrjeuutlw\",\"DisplayName\":\"z\",\"Description\":\"hokvbwnh\",\"HelpUrl\":\"qlgehg\",\"IsHidden\":true,\"IsEnabledByDefault\":false,\"IsInPreview\":true,\"SupportsEmailNotifications\":false}}]"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,21 +33,21 @@ public void testListWithResponse() throws Exception { List response = manager.proactiveDetectionConfigurations() - .listWithResponse("txmwoteyow", "luqovekqvg", com.azure.core.util.Context.NONE) + .listWithResponse("glecdmdqbwpypq", "gsfjac", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wifzmp", response.get(0).name()); - Assertions.assertEquals(true, response.get(0).enabled()); - Assertions.assertEquals(true, response.get(0).sendEmailsToSubscriptionOwners()); - Assertions.assertEquals("kfxcvhrfs", response.get(0).customEmails().get(0)); - Assertions.assertEquals("uagrttikteusqc", response.get(0).lastUpdatedTime()); - Assertions.assertEquals("yklxubyjaffmmfbl", response.get(0).ruleDefinitions().name()); - Assertions.assertEquals("cuubgq", response.get(0).ruleDefinitions().displayName()); - Assertions.assertEquals("rtalmet", response.get(0).ruleDefinitions().description()); - Assertions.assertEquals("wgdsl", response.get(0).ruleDefinitions().helpUrl()); - Assertions.assertEquals(false, response.get(0).ruleDefinitions().isHidden()); - Assertions.assertEquals(false, response.get(0).ruleDefinitions().isEnabledByDefault()); - Assertions.assertEquals(false, response.get(0).ruleDefinitions().isInPreview()); - Assertions.assertEquals(false, response.get(0).ruleDefinitions().supportsEmailNotifications()); + Assertions.assertEquals("hhxud", response.get(0).name()); + Assertions.assertFalse(response.get(0).enabled()); + Assertions.assertFalse(response.get(0).sendEmailsToSubscriptionOwners()); + Assertions.assertEquals("nsiru", response.get(0).customEmails().get(0)); + Assertions.assertEquals("z", response.get(0).lastUpdatedTime()); + Assertions.assertEquals("sckdlp", response.get(0).ruleDefinitions().name()); + Assertions.assertEquals("zrcxfailcfxwmdbo", response.get(0).ruleDefinitions().displayName()); + Assertions.assertEquals("fgsftufqob", response.get(0).ruleDefinitions().description()); + Assertions.assertEquals("lnacgcc", response.get(0).ruleDefinitions().helpUrl()); + Assertions.assertFalse(response.get(0).ruleDefinitions().isHidden()); + Assertions.assertFalse(response.get(0).ruleDefinitions().isEnabledByDefault()); + Assertions.assertFalse(response.get(0).ruleDefinitions().isInPreview()); + Assertions.assertFalse(response.get(0).ruleDefinitions().supportsEmailNotifications()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateWithResponseMockTests.java index 02f428d0a6c2..ae535eccc595 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateWithResponseMockTests.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.generated; @@ -24,7 +24,7 @@ public final class ProactiveDetectionConfigurationsUpdateWithResponseMockTests { @Test public void testUpdateWithResponse() throws Exception { String responseStr - = "{\"name\":\"zjyi\",\"enabled\":false,\"sendEmailsToSubscriptionOwners\":false,\"customEmails\":[\"dyp\",\"hyuemslyn\",\"qyrp\"],\"lastUpdatedTime\":\"obrltt\",\"ruleDefinitions\":{\"Name\":\"jnygq\",\"DisplayName\":\"fwqzdz\",\"Description\":\"ilaxhn\",\"HelpUrl\":\"qlyvijo\",\"IsHidden\":false,\"IsEnabledByDefault\":true,\"IsInPreview\":true,\"SupportsEmailNotifications\":false}}"; + = "{\"name\":\"mhh\",\"enabled\":true,\"sendEmailsToSubscriptionOwners\":false,\"customEmails\":[\"v\",\"eufuqyrxpdlcgql\",\"ismjqfrddgamqu\"],\"lastUpdatedTime\":\"os\",\"ruleDefinitions\":{\"Name\":\"uivfcdis\",\"DisplayName\":\"rnxzh\",\"Description\":\"exrxzbujrtrhq\",\"HelpUrl\":\"revkhgnlnzo\",\"IsHidden\":true,\"IsEnabledByDefault\":false,\"IsInPreview\":true,\"SupportsEmailNotifications\":true}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,37 +35,37 @@ public void testUpdateWithResponse() throws Exception { ApplicationInsightsComponentProactiveDetectionConfiguration response = manager.proactiveDetectionConfigurations() - .updateWithResponse("f", "fiwrxgkn", "uvyinzqodfvpgs", - new ApplicationInsightsComponentProactiveDetectionConfigurationInner().withName("xgsg") - .withEnabled(true) - .withSendEmailsToSubscriptionOwners(true) - .withCustomEmails(Arrays.asList("tx", "zflbqvg", "qvlgafcqusrdvetn", "sdtutnwlduyc")) - .withLastUpdatedTime("zhyrmewipmve") + .updateWithResponse("lwxdzaum", "eoohguufuzboyj", "thwtzol", + new ApplicationInsightsComponentProactiveDetectionConfigurationInner().withName("emwmdxmebwjs") + .withEnabled(false) + .withSendEmailsToSubscriptionOwners(false) + .withCustomEmails(Arrays.asList("veabfqxnmwmqtib", "yijddtvqcttad")) + .withLastUpdatedTime("aeukm") .withRuleDefinitions( new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions() - .withName("ukuqgsj") - .withDisplayName("undxgketw") - .withDescription("hzjhf") - .withHelpUrl("hvvmuvgpmun") + .withName("eekpndz") + .withDisplayName("pmudqmeqwig") + .withDescription("bu") + .withHelpUrl("wyxebeybpmzz") .withIsHidden(false) .withIsEnabledByDefault(false) - .withIsInPreview(true) + .withIsInPreview(false) .withSupportsEmailNotifications(false)), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zjyi", response.name()); - Assertions.assertEquals(false, response.enabled()); - Assertions.assertEquals(false, response.sendEmailsToSubscriptionOwners()); - Assertions.assertEquals("dyp", response.customEmails().get(0)); - Assertions.assertEquals("obrltt", response.lastUpdatedTime()); - Assertions.assertEquals("jnygq", response.ruleDefinitions().name()); - Assertions.assertEquals("fwqzdz", response.ruleDefinitions().displayName()); - Assertions.assertEquals("ilaxhn", response.ruleDefinitions().description()); - Assertions.assertEquals("qlyvijo", response.ruleDefinitions().helpUrl()); - Assertions.assertEquals(false, response.ruleDefinitions().isHidden()); - Assertions.assertEquals(true, response.ruleDefinitions().isEnabledByDefault()); - Assertions.assertEquals(true, response.ruleDefinitions().isInPreview()); - Assertions.assertEquals(false, response.ruleDefinitions().supportsEmailNotifications()); + Assertions.assertEquals("mhh", response.name()); + Assertions.assertTrue(response.enabled()); + Assertions.assertFalse(response.sendEmailsToSubscriptionOwners()); + Assertions.assertEquals("v", response.customEmails().get(0)); + Assertions.assertEquals("os", response.lastUpdatedTime()); + Assertions.assertEquals("uivfcdis", response.ruleDefinitions().name()); + Assertions.assertEquals("rnxzh", response.ruleDefinitions().displayName()); + Assertions.assertEquals("exrxzbujrtrhq", response.ruleDefinitions().description()); + Assertions.assertEquals("revkhgnlnzo", response.ruleDefinitions().helpUrl()); + Assertions.assertTrue(response.ruleDefinitions().isHidden()); + Assertions.assertFalse(response.ruleDefinitions().isEnabledByDefault()); + Assertions.assertTrue(response.ruleDefinitions().isInPreview()); + Assertions.assertTrue(response.ruleDefinitions().supportsEmailNotifications()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/TagsResourceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/TagsResourceTests.java index 866412475834..384529546f1e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/TagsResourceTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/TagsResourceTests.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.generated; @@ -13,18 +13,18 @@ public final class TagsResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TagsResource model = BinaryData - .fromString("{\"tags\":{\"pzvgnwzsymglzufc\":\"knryrtihfxtij\",\"hdbihan\":\"zk\",\"y\":\"fhfcb\"}}") + TagsResource model = BinaryData.fromString( + "{\"tags\":{\"ejspodmail\":\"pjoxzjnch\",\"yahux\":\"ydehoj\",\"vcputegj\":\"npmqnjaqwixjspro\",\"uuvmkjozkrwfnd\":\"wmfdatscmdvpjhul\"}}") .toObject(TagsResource.class); - Assertions.assertEquals("knryrtihfxtij", model.tags().get("pzvgnwzsymglzufc")); + Assertions.assertEquals("pjoxzjnch", model.tags().get("ejspodmail")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TagsResource model - = new TagsResource().withTags(mapOf("pzvgnwzsymglzufc", "knryrtihfxtij", "hdbihan", "zk", "y", "fhfcb")); + TagsResource model = new TagsResource().withTags(mapOf("ejspodmail", "pjoxzjnch", "yahux", "ydehoj", "vcputegj", + "npmqnjaqwixjspro", "uuvmkjozkrwfnd", "wmfdatscmdvpjhul")); model = BinaryData.fromObject(model).toObject(TagsResource.class); - Assertions.assertEquals("knryrtihfxtij", model.tags().get("pzvgnwzsymglzufc")); + Assertions.assertEquals("pjoxzjnch", model.tags().get("ejspodmail")); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/TrackedResourceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/TrackedResourceTests.java new file mode 100644 index 000000000000..88395492ad69 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/TrackedResourceTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.applicationinsights.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.applicationinsights.models.TrackedResource; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class TrackedResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TrackedResource model = BinaryData.fromString( + "{\"tags\":{\"tkahzo\":\"mguaadraufa\",\"kulfg\":\"ajjziuxxpshne\",\"d\":\"lqubkwdlen\",\"pjuohminyfl\":\"utujba\"},\"location\":\"orwmduvwpklv\",\"id\":\"mygdxpgpqch\",\"name\":\"sze\",\"type\":\"nnbj\"}") + .toObject(TrackedResource.class); + Assertions.assertEquals("mguaadraufa", model.tags().get("tkahzo")); + Assertions.assertEquals("orwmduvwpklv", model.location()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TrackedResource model = new TrackedResource() + .withTags( + mapOf("tkahzo", "mguaadraufa", "kulfg", "ajjziuxxpshne", "d", "lqubkwdlen", "pjuohminyfl", "utujba")) + .withLocation("orwmduvwpklv"); + model = BinaryData.fromObject(model).toObject(TrackedResource.class); + Assertions.assertEquals("mguaadraufa", model.tags().get("tkahzo")); + Assertions.assertEquals("orwmduvwpklv", model.location()); + } + + // 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; + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/UserAssignedIdentityTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/UserAssignedIdentityTests.java index e461cc7e79ce..fc6a88545742 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/UserAssignedIdentityTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/UserAssignedIdentityTests.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.generated; @@ -10,9 +10,8 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"d44380d0-fd31-4716-bc00-15e8af057d28\",\"clientId\":\"8b906726-c480-4f46-a13c-012510983543\"}") - .toObject(UserAssignedIdentity.class); + UserAssignedIdentity model + = BinaryData.fromString("{\"principalId\":\"l\",\"clientId\":\"u\"}").toObject(UserAssignedIdentity.class); } @org.junit.jupiter.api.Test diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestGeolocationTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestGeolocationTests.java index 6cbf0b2497be..ae6baf3ae48f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestGeolocationTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestGeolocationTests.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.generated; @@ -11,14 +11,14 @@ public final class WebTestGeolocationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WebTestGeolocation model = BinaryData.fromString("{\"Id\":\"c\"}").toObject(WebTestGeolocation.class); - Assertions.assertEquals("c", model.location()); + WebTestGeolocation model = BinaryData.fromString("{\"Id\":\"fpikxwczb\"}").toObject(WebTestGeolocation.class); + Assertions.assertEquals("fpikxwczb", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebTestGeolocation model = new WebTestGeolocation().withLocation("c"); + WebTestGeolocation model = new WebTestGeolocation().withLocation("fpikxwczb"); model = BinaryData.fromObject(model).toObject(WebTestGeolocation.class); - Assertions.assertEquals("c", model.location()); + Assertions.assertEquals("fpikxwczb", model.location()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListMockTests.java index 0a293bb60e73..1bac46924205 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListMockTests.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.generated; @@ -20,7 +20,7 @@ public final class WebTestLocationsListMockTests { @Test public void testList() throws Exception { - String responseStr = "{\"value\":[{\"DisplayName\":\"oqltfae\",\"Tag\":\"inmfgvxirp\"}]}"; + String responseStr = "{\"value\":[{\"DisplayName\":\"vnoamldseha\",\"Tag\":\"djh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.webTestLocations().list("qzbqqxlajrnwxa", "evehjkuyxoaf", com.azure.core.util.Context.NONE); + = manager.webTestLocations().list("jsxjwwix", "vumwmxqh", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestPropertiesConfigurationTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestPropertiesConfigurationTests.java index a49cd91bbd69..e4ecc8f52832 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestPropertiesConfigurationTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestPropertiesConfigurationTests.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.generated; @@ -11,15 +11,15 @@ public final class WebTestPropertiesConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WebTestPropertiesConfiguration model - = BinaryData.fromString("{\"WebTest\":\"qjsdpydnfyhxdeo\"}").toObject(WebTestPropertiesConfiguration.class); - Assertions.assertEquals("qjsdpydnfyhxdeo", model.webTest()); + WebTestPropertiesConfiguration model = BinaryData.fromString("{\"WebTest\":\"cnpqxuhivyqniwby\"}") + .toObject(WebTestPropertiesConfiguration.class); + Assertions.assertEquals("cnpqxuhivyqniwby", model.webTest()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebTestPropertiesConfiguration model = new WebTestPropertiesConfiguration().withWebTest("qjsdpydnfyhxdeo"); + WebTestPropertiesConfiguration model = new WebTestPropertiesConfiguration().withWebTest("cnpqxuhivyqniwby"); model = BinaryData.fromObject(model).toObject(WebTestPropertiesConfiguration.class); - Assertions.assertEquals("qjsdpydnfyhxdeo", model.webTest()); + Assertions.assertEquals("cnpqxuhivyqniwby", model.webTest()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestPropertiesValidationRulesContentValidationTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestPropertiesValidationRulesContentValidationTests.java index a3e48c2cf637..36842ae88305 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestPropertiesValidationRulesContentValidationTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestPropertiesValidationRulesContentValidationTests.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.generated; @@ -11,23 +11,23 @@ public final class WebTestPropertiesValidationRulesContentValidationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WebTestPropertiesValidationRulesContentValidation model - = BinaryData.fromString("{\"ContentMatch\":\"pwhonowkg\",\"IgnoreCase\":true,\"PassIfTextFound\":true}") - .toObject(WebTestPropertiesValidationRulesContentValidation.class); - Assertions.assertEquals("pwhonowkg", model.contentMatch()); - Assertions.assertEquals(true, model.ignoreCase()); - Assertions.assertEquals(true, model.passIfTextFound()); + WebTestPropertiesValidationRulesContentValidation model = BinaryData + .fromString("{\"ContentMatch\":\"ryhtnapczwlokjy\",\"IgnoreCase\":true,\"PassIfTextFound\":false}") + .toObject(WebTestPropertiesValidationRulesContentValidation.class); + Assertions.assertEquals("ryhtnapczwlokjy", model.contentMatch()); + Assertions.assertTrue(model.ignoreCase()); + Assertions.assertFalse(model.passIfTextFound()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WebTestPropertiesValidationRulesContentValidation model - = new WebTestPropertiesValidationRulesContentValidation().withContentMatch("pwhonowkg") + = new WebTestPropertiesValidationRulesContentValidation().withContentMatch("ryhtnapczwlokjy") .withIgnoreCase(true) - .withPassIfTextFound(true); + .withPassIfTextFound(false); model = BinaryData.fromObject(model).toObject(WebTestPropertiesValidationRulesContentValidation.class); - Assertions.assertEquals("pwhonowkg", model.contentMatch()); - Assertions.assertEquals(true, model.ignoreCase()); - Assertions.assertEquals(true, model.passIfTextFound()); + Assertions.assertEquals("ryhtnapczwlokjy", model.contentMatch()); + Assertions.assertTrue(model.ignoreCase()); + Assertions.assertFalse(model.passIfTextFound()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteByResourceGroupWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 8f099c7bc5dc..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WebTestsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.webTests() - .deleteByResourceGroupWithResponse("rtle", "pqxbkwvzgnzvdf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebtestsResourceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebtestsResourceTests.java index 3f2c96299a74..2bd6f2c76c5a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebtestsResourceTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebtestsResourceTests.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.generated; @@ -14,19 +14,19 @@ public final class WebtestsResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebtestsResource model = BinaryData.fromString( - "{\"location\":\"kix\",\"tags\":{\"zoqftiyqzrnkcqvy\":\"njeputtmrywn\",\"lsicohoqqnwv\":\"lwh\"},\"id\":\"ryavwhheunmmqh\",\"name\":\"yxzk\",\"type\":\"noc\"}") + "{\"id\":\"btcqq\",\"name\":\"qglhq\",\"type\":\"ufo\",\"location\":\"ojywifsqesa\",\"tags\":{\"glzlhjxrifkwmrv\":\"f\",\"psqucmpoyf\":\"tsizntocipaoua\",\"knygjofjddeq\":\"kfo\"}}") .toObject(WebtestsResource.class); - Assertions.assertEquals("kix", model.location()); - Assertions.assertEquals("njeputtmrywn", model.tags().get("zoqftiyqzrnkcqvy")); + Assertions.assertEquals("ojywifsqesa", model.location()); + Assertions.assertEquals("f", model.tags().get("glzlhjxrifkwmrv")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WebtestsResource model = new WebtestsResource().withLocation("kix") - .withTags(mapOf("zoqftiyqzrnkcqvy", "njeputtmrywn", "lsicohoqqnwv", "lwh")); + WebtestsResource model = new WebtestsResource().withLocation("ojywifsqesa") + .withTags(mapOf("glzlhjxrifkwmrv", "f", "psqucmpoyf", "tsizntocipaoua", "knygjofjddeq", "kfo")); model = BinaryData.fromObject(model).toObject(WebtestsResource.class); - Assertions.assertEquals("kix", model.location()); - Assertions.assertEquals("njeputtmrywn", model.tags().get("zoqftiyqzrnkcqvy")); + Assertions.assertEquals("ojywifsqesa", model.location()); + Assertions.assertEquals("f", model.tags().get("glzlhjxrifkwmrv")); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationInnerTests.java index 3b928364f19e..f9a615f195e7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationInnerTests.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.generated; @@ -12,27 +12,12 @@ public final class WorkItemConfigurationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkItemConfigurationInner model = BinaryData.fromString( - "{\"ConnectorId\":\"vmmcoofs\",\"ConfigDisplayName\":\"zevgb\",\"IsDefault\":true,\"Id\":\"abcypmivk\",\"ConfigProperties\":\"zuvccfwnfnbacfio\"}") + "{\"ConnectorId\":\"t\",\"ConfigDisplayName\":\"gmfpgvmp\",\"IsDefault\":false,\"Id\":\"ltha\",\"ConfigProperties\":\"x\"}") .toObject(WorkItemConfigurationInner.class); - Assertions.assertEquals("vmmcoofs", model.connectorId()); - Assertions.assertEquals("zevgb", model.configDisplayName()); - Assertions.assertEquals(true, model.isDefault()); - Assertions.assertEquals("abcypmivk", model.id()); - Assertions.assertEquals("zuvccfwnfnbacfio", model.configProperties()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkItemConfigurationInner model = new WorkItemConfigurationInner().withConnectorId("vmmcoofs") - .withConfigDisplayName("zevgb") - .withIsDefault(true) - .withId("abcypmivk") - .withConfigProperties("zuvccfwnfnbacfio"); - model = BinaryData.fromObject(model).toObject(WorkItemConfigurationInner.class); - Assertions.assertEquals("vmmcoofs", model.connectorId()); - Assertions.assertEquals("zevgb", model.configDisplayName()); - Assertions.assertEquals(true, model.isDefault()); - Assertions.assertEquals("abcypmivk", model.id()); - Assertions.assertEquals("zuvccfwnfnbacfio", model.configProperties()); + Assertions.assertEquals("t", model.connectorId()); + Assertions.assertEquals("gmfpgvmp", model.configDisplayName()); + Assertions.assertFalse(model.isDefault()); + Assertions.assertEquals("ltha", model.id()); + Assertions.assertEquals("x", model.configProperties()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateWithResponseMockTests.java index bee9d94916de..ca9be79f6381 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateWithResponseMockTests.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.generated; @@ -24,7 +24,7 @@ public final class WorkItemConfigurationsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"ConnectorId\":\"dyvvjskgfmocwahp\",\"ConfigDisplayName\":\"atjeaahh\",\"IsDefault\":true,\"Id\":\"na\",\"ConfigProperties\":\"ybbjjidjksyx\"}"; + = "{\"ConnectorId\":\"drkywuhps\",\"ConfigDisplayName\":\"uurutlwexxwlalni\",\"IsDefault\":true,\"Id\":\"rzpgep\",\"ConfigProperties\":\"yb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,20 +34,20 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkItemConfiguration response = manager.workItemConfigurations() - .createWithResponse("pqfrtqlkz", "egnitg", - new WorkItemCreateConfiguration().withConnectorId("xlzyqd") - .withConnectorDataConfiguration("eg") + .createWithResponse("jerbdkelvidizozs", "bccxjmonfdgn", + new WorkItemCreateConfiguration().withConnectorId("cypuuwwlt") + .withConnectorDataConfiguration("qjctzenkeif") .withValidateOnly(true) - .withWorkItemProperties(mapOf("ansym", "xwh", "omfaj", "yqhlwigdivbkbx", "xakjsqzhzb", - "wasqvdaeyyg", "asi", "zkgimsid")), + .withWorkItemProperties(mapOf("hbxcu", "dasvfl", "boldforobwj", "chxgs", "vacqpbtuodxesz", + "vizbfhfo", "rrwoycqucwyhahn", "bbelawumuaslzk")), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dyvvjskgfmocwahp", response.connectorId()); - Assertions.assertEquals("atjeaahh", response.configDisplayName()); - Assertions.assertEquals(true, response.isDefault()); - Assertions.assertEquals("na", response.id()); - Assertions.assertEquals("ybbjjidjksyx", response.configProperties()); + Assertions.assertEquals("drkywuhps", response.connectorId()); + Assertions.assertEquals("uurutlwexxwlalni", response.configDisplayName()); + Assertions.assertTrue(response.isDefault()); + Assertions.assertEquals("rzpgep", response.id()); + Assertions.assertEquals("yb", response.configProperties()); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteWithResponseMockTests.java index b48e9d14a5b2..3e0f60af71ba 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteWithResponseMockTests.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.generated; @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.workItemConfigurations() - .deleteWithResponse("merteeammxqiek", "kzddrtkgdojbmxva", "refdee", com.azure.core.util.Context.NONE); + .deleteWithResponse("uncuw", "qspkcdqzhlctd", "unqndyfpchrqb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultWithResponseMockTests.java index 8ad609eaa53f..71be242b16c5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultWithResponseMockTests.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.generated; @@ -21,7 +21,7 @@ public final class WorkItemConfigurationsGetDefaultWithResponseMockTests { @Test public void testGetDefaultWithResponse() throws Exception { String responseStr - = "{\"ConnectorId\":\"mjbnk\",\"ConfigDisplayName\":\"xynenl\",\"IsDefault\":false,\"Id\":\"izzgwkln\",\"ConfigProperties\":\"mffeycxcktpi\"}"; + = "{\"ConnectorId\":\"nxm\",\"ConfigDisplayName\":\"uxswqrntvl\",\"IsDefault\":true,\"Id\":\"sttex\",\"ConfigProperties\":\"qpwcyyufmh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testGetDefaultWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkItemConfiguration response = manager.workItemConfigurations() - .getDefaultWithResponse("yxvxevblbjed", "ljlageuaulxu", com.azure.core.util.Context.NONE) + .getDefaultWithResponse("wwpgdakchzyvlixq", "rkcxkj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mjbnk", response.connectorId()); - Assertions.assertEquals("xynenl", response.configDisplayName()); - Assertions.assertEquals(false, response.isDefault()); - Assertions.assertEquals("izzgwkln", response.id()); - Assertions.assertEquals("mffeycxcktpi", response.configProperties()); + Assertions.assertEquals("nxm", response.connectorId()); + Assertions.assertEquals("uxswqrntvl", response.configDisplayName()); + Assertions.assertTrue(response.isDefault()); + Assertions.assertEquals("sttex", response.id()); + Assertions.assertEquals("qpwcyyufmh", response.configProperties()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemWithResponseMockTests.java index 6b4d7ac75d58..1abdeacfeaf5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemWithResponseMockTests.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.generated; @@ -21,7 +21,7 @@ public final class WorkItemConfigurationsGetItemWithResponseMockTests { @Test public void testGetItemWithResponse() throws Exception { String responseStr - = "{\"ConnectorId\":\"sawddjibabxvi\",\"ConfigDisplayName\":\"tvtzeexavoxtfg\",\"IsDefault\":false,\"Id\":\"m\",\"ConfigProperties\":\"bwpypqtgsfjacb\"}"; + = "{\"ConnectorId\":\"uaubrj\",\"ConfigDisplayName\":\"oq\",\"IsDefault\":true,\"Id\":\"jrngif\",\"ConfigProperties\":\"z\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testGetItemWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkItemConfiguration response = manager.workItemConfigurations() - .getItemWithResponse("vecuijpx", "xs", "wprtu", com.azure.core.util.Context.NONE) + .getItemWithResponse("jjrcgegydc", "boxjumvq", "olihrra", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("sawddjibabxvi", response.connectorId()); - Assertions.assertEquals("tvtzeexavoxtfg", response.configDisplayName()); - Assertions.assertEquals(false, response.isDefault()); - Assertions.assertEquals("m", response.id()); - Assertions.assertEquals("bwpypqtgsfjacb", response.configProperties()); + Assertions.assertEquals("uaubrj", response.connectorId()); + Assertions.assertEquals("oq", response.configDisplayName()); + Assertions.assertTrue(response.isDefault()); + Assertions.assertEquals("jrngif", response.id()); + Assertions.assertEquals("z", response.configProperties()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListMockTests.java index 9a4932ff8964..3d693f71f7cd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListMockTests.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.generated; @@ -22,7 +22,7 @@ public final class WorkItemConfigurationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"ConnectorId\":\"clrcivtsox\",\"ConfigDisplayName\":\"kenx\",\"IsDefault\":true,\"Id\":\"efrp\",\"ConfigProperties\":\"dnqqskawaoqvmmb\"}]}"; + = "{\"value\":[{\"ConnectorId\":\"e\",\"ConfigDisplayName\":\"dhgbjkvre\",\"IsDefault\":true,\"Id\":\"murvzm\",\"ConfigProperties\":\"vuanashcxlp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.workItemConfigurations().list("un", "ixxrtikvcpw", com.azure.core.util.Context.NONE); + = manager.workItemConfigurations().list("ncvjts", "cof", com.azure.core.util.Context.NONE); - Assertions.assertEquals("clrcivtsox", response.iterator().next().connectorId()); - Assertions.assertEquals("kenx", response.iterator().next().configDisplayName()); - Assertions.assertEquals(true, response.iterator().next().isDefault()); - Assertions.assertEquals("efrp", response.iterator().next().id()); - Assertions.assertEquals("dnqqskawaoqvmmb", response.iterator().next().configProperties()); + Assertions.assertEquals("e", response.iterator().next().connectorId()); + Assertions.assertEquals("dhgbjkvre", response.iterator().next().configDisplayName()); + Assertions.assertTrue(response.iterator().next().isDefault()); + Assertions.assertEquals("murvzm", response.iterator().next().id()); + Assertions.assertEquals("vuanashcxlp", response.iterator().next().configProperties()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListResultTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListResultTests.java index 7f483f84a7e4..0fa88c22df56 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListResultTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListResultTests.java @@ -1,23 +1,19 @@ // 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.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationsListResult; +import com.azure.resourcemanager.applicationinsights.implementation.models.WorkItemConfigurationsListResult; +import org.junit.jupiter.api.Assertions; public final class WorkItemConfigurationsListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkItemConfigurationsListResult model = BinaryData.fromString( - "{\"value\":[{\"ConnectorId\":\"ayvvtpgvdf\",\"ConfigDisplayName\":\"otkftutqxlngx\",\"IsDefault\":true,\"Id\":\"ugnxkrxdqmi\",\"ConfigProperties\":\"thz\"},{\"ConnectorId\":\"qdrabhjybigehoqf\",\"ConfigDisplayName\":\"wska\",\"IsDefault\":true,\"Id\":\"zlcuiywgqywgndrv\",\"ConfigProperties\":\"hzgpphrcgyncocpe\"}]}") + "{\"value\":[{\"ConnectorId\":\"ab\",\"ConfigDisplayName\":\"systawfsdjp\",\"IsDefault\":false,\"Id\":\"bjxbkzbzk\",\"ConfigProperties\":\"ncj\"},{\"ConnectorId\":\"udurgkakmokz\",\"ConfigDisplayName\":\"jk\",\"IsDefault\":false,\"Id\":\"mouwqlgzrfzeey\",\"ConfigProperties\":\"izikayuhq\"}],\"nextLink\":\"jbsybbqw\"}") .toObject(WorkItemConfigurationsListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkItemConfigurationsListResult model = new WorkItemConfigurationsListResult(); - model = BinaryData.fromObject(model).toObject(WorkItemConfigurationsListResult.class); + Assertions.assertEquals("jbsybbqw", model.nextLink()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemWithResponseMockTests.java index 06f8d9ef1d09..a175620cf7da 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemWithResponseMockTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemWithResponseMockTests.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.generated; @@ -24,7 +24,7 @@ public final class WorkItemConfigurationsUpdateItemWithResponseMockTests { @Test public void testUpdateItemWithResponse() throws Exception { String responseStr - = "{\"ConnectorId\":\"nhxk\",\"ConfigDisplayName\":\"v\",\"IsDefault\":true,\"Id\":\"zvulj\",\"ConfigProperties\":\"aeranokqgukkjqnv\"}"; + = "{\"ConnectorId\":\"xaceve\",\"ConfigDisplayName\":\"kuyxoafg\",\"IsDefault\":false,\"Id\":\"tfaeyl\",\"ConfigProperties\":\"mfgvxirpghriypo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,19 +34,20 @@ public void testUpdateItemWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkItemConfiguration response = manager.workItemConfigurations() - .updateItemWithResponse("lhhxudbxvodhtnsi", "ud", "z", - new WorkItemCreateConfiguration().withConnectorId("es") - .withConnectorDataConfiguration("dlpagzrcxfail") + .updateItemWithResponse("asccbiui", "zdlyjdfqw", "kyoqufdv", + new WorkItemCreateConfiguration().withConnectorId("zslzojhp") + .withConnectorDataConfiguration("fnmdxotn") .withValidateOnly(false) - .withWorkItemProperties(mapOf("lnacgcc", "dboxdfgsftufqobr")), + .withWorkItemProperties(mapOf("bsnmfpph", "geyzihgrkyuiz", "yhyhsgzfczb", "jee", "tnluankrr", + "omfgbeglqgleohib", "qqxlajr", "xeeebtijvacvbmqz")), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("nhxk", response.connectorId()); - Assertions.assertEquals("v", response.configDisplayName()); - Assertions.assertEquals(true, response.isDefault()); - Assertions.assertEquals("zvulj", response.id()); - Assertions.assertEquals("aeranokqgukkjqnv", response.configProperties()); + Assertions.assertEquals("xaceve", response.connectorId()); + Assertions.assertEquals("kuyxoafg", response.configDisplayName()); + Assertions.assertFalse(response.isDefault()); + Assertions.assertEquals("tfaeyl", response.id()); + Assertions.assertEquals("mfgvxirpghriypo", response.configProperties()); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemCreateConfigurationTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemCreateConfigurationTests.java index 3babc0efe8d6..92a57294599f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemCreateConfigurationTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemCreateConfigurationTests.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.generated; @@ -14,26 +14,25 @@ public final class WorkItemCreateConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkItemCreateConfiguration model = BinaryData.fromString( - "{\"ConnectorId\":\"njampm\",\"ConnectorDataConfiguration\":\"nzscxa\",\"ValidateOnly\":false,\"WorkItemProperties\":{\"njeaseipheofloke\":\"hcbonqvpkvlr\",\"enjbdlwtgrhp\":\"y\",\"umasxazjpq\":\"jp\",\"ualhbxxhejj\":\"e\"}}") + "{\"ConnectorId\":\"t\",\"ConnectorDataConfiguration\":\"ib\",\"ValidateOnly\":false,\"WorkItemProperties\":{\"lfzxiavrmbzonoki\":\"ikpzimejza\",\"rgz\":\"rjqc\"}}") .toObject(WorkItemCreateConfiguration.class); - Assertions.assertEquals("njampm", model.connectorId()); - Assertions.assertEquals("nzscxa", model.connectorDataConfiguration()); - Assertions.assertEquals(false, model.validateOnly()); - Assertions.assertEquals("hcbonqvpkvlr", model.workItemProperties().get("njeaseipheofloke")); + Assertions.assertEquals("t", model.connectorId()); + Assertions.assertEquals("ib", model.connectorDataConfiguration()); + Assertions.assertFalse(model.validateOnly()); + Assertions.assertEquals("ikpzimejza", model.workItemProperties().get("lfzxiavrmbzonoki")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkItemCreateConfiguration model = new WorkItemCreateConfiguration().withConnectorId("njampm") - .withConnectorDataConfiguration("nzscxa") + WorkItemCreateConfiguration model = new WorkItemCreateConfiguration().withConnectorId("t") + .withConnectorDataConfiguration("ib") .withValidateOnly(false) - .withWorkItemProperties( - mapOf("njeaseipheofloke", "hcbonqvpkvlr", "enjbdlwtgrhp", "y", "umasxazjpq", "jp", "ualhbxxhejj", "e")); + .withWorkItemProperties(mapOf("lfzxiavrmbzonoki", "ikpzimejza", "rgz", "rjqc")); model = BinaryData.fromObject(model).toObject(WorkItemCreateConfiguration.class); - Assertions.assertEquals("njampm", model.connectorId()); - Assertions.assertEquals("nzscxa", model.connectorDataConfiguration()); - Assertions.assertEquals(false, model.validateOnly()); - Assertions.assertEquals("hcbonqvpkvlr", model.workItemProperties().get("njeaseipheofloke")); + Assertions.assertEquals("t", model.connectorId()); + Assertions.assertEquals("ib", model.connectorDataConfiguration()); + Assertions.assertFalse(model.validateOnly()); + Assertions.assertEquals("ikpzimejza", model.workItemProperties().get("lfzxiavrmbzonoki")); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookInnerErrorTraceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookInnerErrorTraceTests.java index 90b33909669d..803adcd0bfb0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookInnerErrorTraceTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookInnerErrorTraceTests.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.generated; @@ -10,14 +10,7 @@ public final class WorkbookInnerErrorTraceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkbookInnerErrorTrace model - = BinaryData.fromString("{\"trace\":[\"izsjqlhkrr\",\"bdeibqipqk\",\"hvxndzwmkrefajpj\",\"rwkq\"]}") - .toObject(WorkbookInnerErrorTrace.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookInnerErrorTrace model = new WorkbookInnerErrorTrace(); - model = BinaryData.fromObject(model).toObject(WorkbookInnerErrorTrace.class); + WorkbookInnerErrorTrace model = BinaryData.fromString("{\"trace\":[\"dxkqpx\",\"kajionpim\",\"xg\"]}") + .toObject(WorkbookInnerErrorTrace.class); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookInnerTests.java index 73dc7c0f8220..33457bbf6bf0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookInnerTests.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.generated; @@ -19,53 +19,55 @@ public final class WorkbookInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbookInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"etaebu\",\"serializedData\":\"u\",\"version\":\"movsmzlxwabmqoe\",\"timeModified\":\"2021-08-18T18:08:28Z\",\"category\":\"frvtpuqu\",\"tags\":[\"lgkfbt\",\"doaon\"],\"userId\":\"jcntuj\",\"sourceId\":\"c\",\"storageUri\":\"df\",\"description\":\"waezkojvd\",\"revision\":\"zfoqouicybxar\"},\"identity\":{\"principalId\":\"893ebfbf-d4b3-4a1e-8482-7de0e5ae3930\",\"tenantId\":\"abe292d4-0ee8-4a96-bdd1-e344cdd99ad4\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"q\":{\"principalId\":\"dc7ad656-3f61-4a5c-89db-fb0b770ff554\",\"clientId\":\"51c0109a-576a-4290-a2ee-cb31fb4f9793\"}}},\"kind\":\"shared\",\"etag\":\"oamciodh\",\"location\":\"haz\",\"tags\":{\"onlwntoeg\":\"nz\",\"mrv\":\"kdwbwhkszz\"},\"id\":\"xztvbtqgsfraoyzk\",\"name\":\"owtlmnguxawqald\",\"type\":\"yuuximerqfobwyzn\"}") + "{\"properties\":{\"displayName\":\"ltmrldh\",\"serializedData\":\"gjzzdatqxhocdg\",\"version\":\"blgphuticn\",\"timeModified\":\"2021-01-10T02:32:57Z\",\"category\":\"aozwyiftyhxhu\",\"tags\":[\"ftyxolniw\"],\"userId\":\"cukjf\",\"sourceId\":\"iawxklry\",\"storageUri\":\"wckbasyypnd\",\"description\":\"sgcbac\",\"revision\":\"ejk\"},\"identity\":{\"principalId\":\"nqgoulzndli\",\"tenantId\":\"yqkgfg\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ouf\":{\"principalId\":\"gakeqsr\",\"clientId\":\"bzqqedqytbciq\"},\"mutduqktaps\":{\"principalId\":\"mnkzsmod\",\"clientId\":\"lougpbkw\"},\"bbjfddgmbmbexp\":{\"principalId\":\"gcue\",\"clientId\":\"umkdosvqwhbmd\"},\"lgbquxig\":{\"principalId\":\"htqqrolfp\",\"clientId\":\"s\"}}},\"kind\":\"shared\",\"etag\":\"zjaoyfhrtxil\",\"location\":\"rkujy\",\"tags\":{\"fqawrlyxw\":\"eju\"},\"id\":\"kcprbnw\",\"name\":\"xgjvtbv\",\"type\":\"ysszdnrujqguh\"}") .toObject(WorkbookInner.class); - Assertions.assertEquals("haz", model.location()); - Assertions.assertEquals("nz", model.tags().get("onlwntoeg")); + Assertions.assertEquals("rkujy", model.location()); + Assertions.assertEquals("eju", model.tags().get("fqawrlyxw")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("oamciodh", model.etag()); - Assertions.assertEquals("etaebu", model.displayName()); - Assertions.assertEquals("u", model.serializedData()); - Assertions.assertEquals("movsmzlxwabmqoe", model.version()); - Assertions.assertEquals("frvtpuqu", model.category()); - Assertions.assertEquals("lgkfbt", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("c", model.sourceId()); - Assertions.assertEquals("df", model.storageUri()); - Assertions.assertEquals("waezkojvd", model.description()); + Assertions.assertEquals("zjaoyfhrtxil", model.etag()); + Assertions.assertEquals("ltmrldh", model.displayName()); + Assertions.assertEquals("gjzzdatqxhocdg", model.serializedData()); + Assertions.assertEquals("blgphuticn", model.version()); + Assertions.assertEquals("aozwyiftyhxhu", model.category()); + Assertions.assertEquals("ftyxolniw", model.tagsPropertiesTags().get(0)); + Assertions.assertEquals("iawxklry", model.sourceId()); + Assertions.assertEquals("wckbasyypnd", model.storageUri()); + Assertions.assertEquals("sgcbac", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkbookInner model = new WorkbookInner().withLocation("haz") - .withTags(mapOf("onlwntoeg", "nz", "mrv", "kdwbwhkszz")) + WorkbookInner model = new WorkbookInner().withLocation("rkujy") + .withTags(mapOf("fqawrlyxw", "eju")) .withIdentity(new WorkbookResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("q", new UserAssignedIdentity()))) + .withUserAssignedIdentities( + mapOf("ouf", new UserAssignedIdentity(), "mutduqktaps", new UserAssignedIdentity(), + "bbjfddgmbmbexp", new UserAssignedIdentity(), "lgbquxig", new UserAssignedIdentity()))) .withKind(WorkbookSharedTypeKind.SHARED) - .withEtag("oamciodh") - .withDisplayName("etaebu") - .withSerializedData("u") - .withVersion("movsmzlxwabmqoe") - .withCategory("frvtpuqu") - .withTagsPropertiesTags(Arrays.asList("lgkfbt", "doaon")) - .withSourceId("c") - .withStorageUri("df") - .withDescription("waezkojvd"); + .withEtag("zjaoyfhrtxil") + .withDisplayName("ltmrldh") + .withSerializedData("gjzzdatqxhocdg") + .withVersion("blgphuticn") + .withCategory("aozwyiftyhxhu") + .withTagsPropertiesTags(Arrays.asList("ftyxolniw")) + .withSourceId("iawxklry") + .withStorageUri("wckbasyypnd") + .withDescription("sgcbac"); model = BinaryData.fromObject(model).toObject(WorkbookInner.class); - Assertions.assertEquals("haz", model.location()); - Assertions.assertEquals("nz", model.tags().get("onlwntoeg")); + Assertions.assertEquals("rkujy", model.location()); + Assertions.assertEquals("eju", model.tags().get("fqawrlyxw")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("oamciodh", model.etag()); - Assertions.assertEquals("etaebu", model.displayName()); - Assertions.assertEquals("u", model.serializedData()); - Assertions.assertEquals("movsmzlxwabmqoe", model.version()); - Assertions.assertEquals("frvtpuqu", model.category()); - Assertions.assertEquals("lgkfbt", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("c", model.sourceId()); - Assertions.assertEquals("df", model.storageUri()); - Assertions.assertEquals("waezkojvd", model.description()); + Assertions.assertEquals("zjaoyfhrtxil", model.etag()); + Assertions.assertEquals("ltmrldh", model.displayName()); + Assertions.assertEquals("gjzzdatqxhocdg", model.serializedData()); + Assertions.assertEquals("blgphuticn", model.version()); + Assertions.assertEquals("aozwyiftyhxhu", model.category()); + Assertions.assertEquals("ftyxolniw", model.tagsPropertiesTags().get(0)); + Assertions.assertEquals("iawxklry", model.sourceId()); + Assertions.assertEquals("wckbasyypnd", model.storageUri()); + Assertions.assertEquals("sgcbac", model.description()); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookPropertiesTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookPropertiesTests.java index c525db5a1836..9518bba5ad59 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookPropertiesTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookPropertiesTests.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.generated; @@ -13,36 +13,36 @@ public final class WorkbookPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbookProperties model = BinaryData.fromString( - "{\"displayName\":\"bykutw\",\"serializedData\":\"fhpagmhrskdsnf\",\"version\":\"doakgtdlmkkzevdl\",\"timeModified\":\"2021-08-26T23:11Z\",\"category\":\"pusdstt\",\"tags\":[\"gvbbejdcng\",\"qmoa\",\"ufgmjzrwrdg\"],\"userId\":\"wae\",\"sourceId\":\"uzkopbminrfd\",\"storageUri\":\"yuhhziu\",\"description\":\"fozbhdmsmlmzqhof\",\"revision\":\"maequiahxicslfa\"}") + "{\"displayName\":\"uouq\",\"serializedData\":\"prwzwbnguitnwui\",\"version\":\"a\",\"timeModified\":\"2021-01-04T00:59:55Z\",\"category\":\"fizuckyf\",\"tags\":[\"fidfvzw\",\"zuhtymwisdkfthwx\",\"nteiwaopv\"],\"userId\":\"ijcmmx\",\"sourceId\":\"ufufsrp\",\"storageUri\":\"zidnsezcxtbzsgfy\",\"description\":\"sne\",\"revision\":\"dwzjeiach\"}") .toObject(WorkbookProperties.class); - Assertions.assertEquals("bykutw", model.displayName()); - Assertions.assertEquals("fhpagmhrskdsnf", model.serializedData()); - Assertions.assertEquals("doakgtdlmkkzevdl", model.version()); - Assertions.assertEquals("pusdstt", model.category()); - Assertions.assertEquals("gvbbejdcng", model.tags().get(0)); - Assertions.assertEquals("uzkopbminrfd", model.sourceId()); - Assertions.assertEquals("yuhhziu", model.storageUri()); - Assertions.assertEquals("fozbhdmsmlmzqhof", model.description()); + Assertions.assertEquals("uouq", model.displayName()); + Assertions.assertEquals("prwzwbnguitnwui", model.serializedData()); + Assertions.assertEquals("a", model.version()); + Assertions.assertEquals("fizuckyf", model.category()); + Assertions.assertEquals("fidfvzw", model.tags().get(0)); + Assertions.assertEquals("ufufsrp", model.sourceId()); + Assertions.assertEquals("zidnsezcxtbzsgfy", model.storageUri()); + Assertions.assertEquals("sne", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkbookProperties model = new WorkbookProperties().withDisplayName("bykutw") - .withSerializedData("fhpagmhrskdsnf") - .withVersion("doakgtdlmkkzevdl") - .withCategory("pusdstt") - .withTags(Arrays.asList("gvbbejdcng", "qmoa", "ufgmjzrwrdg")) - .withSourceId("uzkopbminrfd") - .withStorageUri("yuhhziu") - .withDescription("fozbhdmsmlmzqhof"); + WorkbookProperties model = new WorkbookProperties().withDisplayName("uouq") + .withSerializedData("prwzwbnguitnwui") + .withVersion("a") + .withCategory("fizuckyf") + .withTags(Arrays.asList("fidfvzw", "zuhtymwisdkfthwx", "nteiwaopv")) + .withSourceId("ufufsrp") + .withStorageUri("zidnsezcxtbzsgfy") + .withDescription("sne"); model = BinaryData.fromObject(model).toObject(WorkbookProperties.class); - Assertions.assertEquals("bykutw", model.displayName()); - Assertions.assertEquals("fhpagmhrskdsnf", model.serializedData()); - Assertions.assertEquals("doakgtdlmkkzevdl", model.version()); - Assertions.assertEquals("pusdstt", model.category()); - Assertions.assertEquals("gvbbejdcng", model.tags().get(0)); - Assertions.assertEquals("uzkopbminrfd", model.sourceId()); - Assertions.assertEquals("yuhhziu", model.storageUri()); - Assertions.assertEquals("fozbhdmsmlmzqhof", model.description()); + Assertions.assertEquals("uouq", model.displayName()); + Assertions.assertEquals("prwzwbnguitnwui", model.serializedData()); + Assertions.assertEquals("a", model.version()); + Assertions.assertEquals("fizuckyf", model.category()); + Assertions.assertEquals("fidfvzw", model.tags().get(0)); + Assertions.assertEquals("ufufsrp", model.sourceId()); + Assertions.assertEquals("zidnsezcxtbzsgfy", model.storageUri()); + Assertions.assertEquals("sne", model.description()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookPropertiesUpdateParametersTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookPropertiesUpdateParametersTests.java index 8d05f1ab07b1..97e99d9a8b95 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookPropertiesUpdateParametersTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookPropertiesUpdateParametersTests.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.generated; @@ -13,31 +13,30 @@ public final class WorkbookPropertiesUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbookPropertiesUpdateParameters model = BinaryData.fromString( - "{\"displayName\":\"eyebizikayuhql\",\"serializedData\":\"bs\",\"category\":\"bqwrvtldgm\",\"tags\":[\"vm\",\"ipaslthaqfxssmwu\",\"wbdsr\",\"zpdrhneu\"],\"description\":\"wqkdwytisibi\",\"revision\":\"gpikpzimejza\"}") + "{\"displayName\":\"ndei\",\"serializedData\":\"twnpzaoqvuhrhcf\",\"category\":\"yd\",\"tags\":[\"mjthjqkwp\",\"eicxmqciwqvhkhi\"],\"description\":\"igdtopbob\",\"revision\":\"ghmewuam\"}") .toObject(WorkbookPropertiesUpdateParameters.class); - Assertions.assertEquals("eyebizikayuhql", model.displayName()); - Assertions.assertEquals("bs", model.serializedData()); - Assertions.assertEquals("bqwrvtldgm", model.category()); - Assertions.assertEquals("vm", model.tags().get(0)); - Assertions.assertEquals("wqkdwytisibi", model.description()); - Assertions.assertEquals("gpikpzimejza", model.revision()); + Assertions.assertEquals("ndei", model.displayName()); + Assertions.assertEquals("twnpzaoqvuhrhcf", model.serializedData()); + Assertions.assertEquals("yd", model.category()); + Assertions.assertEquals("mjthjqkwp", model.tags().get(0)); + Assertions.assertEquals("igdtopbob", model.description()); + Assertions.assertEquals("ghmewuam", model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkbookPropertiesUpdateParameters model - = new WorkbookPropertiesUpdateParameters().withDisplayName("eyebizikayuhql") - .withSerializedData("bs") - .withCategory("bqwrvtldgm") - .withTags(Arrays.asList("vm", "ipaslthaqfxssmwu", "wbdsr", "zpdrhneu")) - .withDescription("wqkdwytisibi") - .withRevision("gpikpzimejza"); + WorkbookPropertiesUpdateParameters model = new WorkbookPropertiesUpdateParameters().withDisplayName("ndei") + .withSerializedData("twnpzaoqvuhrhcf") + .withCategory("yd") + .withTags(Arrays.asList("mjthjqkwp", "eicxmqciwqvhkhi")) + .withDescription("igdtopbob") + .withRevision("ghmewuam"); model = BinaryData.fromObject(model).toObject(WorkbookPropertiesUpdateParameters.class); - Assertions.assertEquals("eyebizikayuhql", model.displayName()); - Assertions.assertEquals("bs", model.serializedData()); - Assertions.assertEquals("bqwrvtldgm", model.category()); - Assertions.assertEquals("vm", model.tags().get(0)); - Assertions.assertEquals("wqkdwytisibi", model.description()); - Assertions.assertEquals("gpikpzimejza", model.revision()); + Assertions.assertEquals("ndei", model.displayName()); + Assertions.assertEquals("twnpzaoqvuhrhcf", model.serializedData()); + Assertions.assertEquals("yd", model.category()); + Assertions.assertEquals("mjthjqkwp", model.tags().get(0)); + Assertions.assertEquals("igdtopbob", model.description()); + Assertions.assertEquals("ghmewuam", model.revision()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookResourceIdentityTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookResourceIdentityTests.java index bdc0f5229b16..608e4390270c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookResourceIdentityTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookResourceIdentityTests.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.generated; @@ -16,7 +16,7 @@ public final class WorkbookResourceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbookResourceIdentity model = BinaryData.fromString( - "{\"principalId\":\"45619ec4-7293-45c1-87ff-088cb1fa4499\",\"tenantId\":\"9b125bbd-432a-428c-9b86-a11cb3ec3fb2\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"raehtwdwrft\":{\"principalId\":\"2e5ca98f-75fe-4bcc-a40b-7cf75db91542\",\"clientId\":\"6977fdcf-f34d-4aa3-a6a9-6d799d95aa1e\"},\"byrcdlbhshfwp\":{\"principalId\":\"29445cb0-9b77-4754-9bc3-d1bec0812758\",\"clientId\":\"749a11f0-74fb-4ff2-8f25-8aabda0bf062\"}}}") + "{\"principalId\":\"osfln\",\"tenantId\":\"sfqpteehz\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"crmnohjtckwhds\":{\"principalId\":\"qrimzinpv\",\"clientId\":\"jdkirsoodqx\"}}}") .toObject(WorkbookResourceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } @@ -25,8 +25,7 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { WorkbookResourceIdentity model = new WorkbookResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("raehtwdwrft", new UserAssignedIdentity(), "byrcdlbhshfwp", new UserAssignedIdentity())); + .withUserAssignedIdentities(mapOf("crmnohjtckwhds", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(WorkbookResourceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookResourceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookResourceTests.java deleted file mode 100644 index 7f0137190ffb..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookResourceTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity; -import com.azure.resourcemanager.applicationinsights.models.WorkbookResource; -import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity; -import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookResource model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"e770d48c-db47-4403-b216-818a292b766a\",\"tenantId\":\"9b606586-35cb-44a7-86f9-43cfe3a8f023\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"alnswhccsphk\":{\"principalId\":\"ddb0172c-723a-40d7-b193-6f3bab193a1c\",\"clientId\":\"7c8aceca-509d-4ad3-9293-5dabeaeb8f0f\"},\"witqscywuggwoluh\":{\"principalId\":\"21402738-76ad-45fd-b5ca-6a0cba734760\",\"clientId\":\"f615bc15-807d-4ccb-8468-201cc3de66f3\"},\"wem\":{\"principalId\":\"2e82b5ad-16be-46b4-9aaf-7db6ab205fd8\",\"clientId\":\"429aa4d0-bc59-46e5-9fc2-2d7373308d7c\"}}},\"kind\":\"shared\",\"etag\":\"sbrgz\",\"location\":\"wmsweypqwd\",\"tags\":{\"qhuexm\":\"icccn\",\"ncsdtclusiyp\":\"ttlstvlzywemhz\",\"ygqukyhejh\":\"sfgytguslfead\"},\"id\":\"isxgfp\",\"name\":\"lolp\",\"type\":\"vk\"}") - .toObject(WorkbookResource.class); - Assertions.assertEquals("wmsweypqwd", model.location()); - Assertions.assertEquals("icccn", model.tags().get("qhuexm")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("sbrgz", model.etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookResource model = new WorkbookResource().withLocation("wmsweypqwd") - .withTags(mapOf("qhuexm", "icccn", "ncsdtclusiyp", "ttlstvlzywemhz", "ygqukyhejh", "sfgytguslfead")) - .withIdentity( - new WorkbookResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("alnswhccsphk", new UserAssignedIdentity(), "witqscywuggwoluh", - new UserAssignedIdentity(), "wem", new UserAssignedIdentity()))) - .withKind(WorkbookSharedTypeKind.SHARED) - .withEtag("sbrgz"); - model = BinaryData.fromObject(model).toObject(WorkbookResource.class); - Assertions.assertEquals("wmsweypqwd", model.location()); - Assertions.assertEquals("icccn", model.tags().get("qhuexm")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("sbrgz", model.etag()); - } - - // 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; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateGalleryTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateGalleryTests.java index 053777e0a74e..43a2b52d1c1f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateGalleryTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateGalleryTests.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.generated; @@ -12,27 +12,27 @@ public final class WorkbookTemplateGalleryTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbookTemplateGallery model = BinaryData.fromString( - "{\"name\":\"kpzksmondjmq\",\"category\":\"vypomgkopkwho\",\"type\":\"pajqgxysm\",\"order\":1907336189,\"resourceType\":\"qfqvmkc\"}") + "{\"name\":\"eualupjmkhf\",\"category\":\"bbcswsrtjri\",\"type\":\"rbpbewtghfgblcg\",\"order\":1261477123,\"resourceType\":\"lvqhjkbegibtnmx\"}") .toObject(WorkbookTemplateGallery.class); - Assertions.assertEquals("kpzksmondjmq", model.name()); - Assertions.assertEquals("vypomgkopkwho", model.category()); - Assertions.assertEquals("pajqgxysm", model.type()); - Assertions.assertEquals(1907336189, model.order()); - Assertions.assertEquals("qfqvmkc", model.resourceType()); + Assertions.assertEquals("eualupjmkhf", model.name()); + Assertions.assertEquals("bbcswsrtjri", model.category()); + Assertions.assertEquals("rbpbewtghfgblcg", model.type()); + Assertions.assertEquals(1261477123, model.order()); + Assertions.assertEquals("lvqhjkbegibtnmx", model.resourceType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkbookTemplateGallery model = new WorkbookTemplateGallery().withName("kpzksmondjmq") - .withCategory("vypomgkopkwho") - .withType("pajqgxysm") - .withOrder(1907336189) - .withResourceType("qfqvmkc"); + WorkbookTemplateGallery model = new WorkbookTemplateGallery().withName("eualupjmkhf") + .withCategory("bbcswsrtjri") + .withType("rbpbewtghfgblcg") + .withOrder(1261477123) + .withResourceType("lvqhjkbegibtnmx"); model = BinaryData.fromObject(model).toObject(WorkbookTemplateGallery.class); - Assertions.assertEquals("kpzksmondjmq", model.name()); - Assertions.assertEquals("vypomgkopkwho", model.category()); - Assertions.assertEquals("pajqgxysm", model.type()); - Assertions.assertEquals(1907336189, model.order()); - Assertions.assertEquals("qfqvmkc", model.resourceType()); + Assertions.assertEquals("eualupjmkhf", model.name()); + Assertions.assertEquals("bbcswsrtjri", model.category()); + Assertions.assertEquals("rbpbewtghfgblcg", model.type()); + Assertions.assertEquals(1261477123, model.order()); + Assertions.assertEquals("lvqhjkbegibtnmx", model.resourceType()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateInnerTests.java index 26dc3ec8b5b0..c386ac9f35b2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateInnerTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateInnerTests.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.generated; @@ -17,76 +17,76 @@ public final class WorkbookTemplateInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbookTemplateInner model = BinaryData.fromString( - "{\"properties\":{\"priority\":1688496747,\"author\":\"eyvjusrtslhspkde\",\"templateData\":\"datamaofmxagkv\",\"galleries\":[{\"name\":\"lmqkrhahvlj\",\"category\":\"haquhcdh\",\"type\":\"ualaexqpvfadmw\",\"order\":448234135,\"resourceType\":\"gvxp\"},{\"name\":\"omzlfmi\",\"category\":\"wbnb\",\"type\":\"ldawkzbaliourqha\",\"order\":30531984,\"resourceType\":\"ashsfwxos\"},{\"name\":\"z\",\"category\":\"ugicjooxdjebw\",\"type\":\"cwwfvovbvme\",\"order\":321338352,\"resourceType\":\"vyhzceuojgjrwj\"}],\"localized\":{\"isk\":[{\"templateData\":\"datawmcdytdxwi\",\"galleries\":[{},{},{}]},{\"templateData\":\"datajawgqwg\",\"galleries\":[{}]}],\"hvylwzbt\":[{\"templateData\":\"datakpycgklwndnhjd\",\"galleries\":[{},{}]}],\"wuwprzqlv\":[{\"templateData\":\"dataujznb\",\"galleries\":[{}]}],\"xzvlvqhjkbegib\":[{\"templateData\":\"datalupj\",\"galleries\":[{},{},{},{}]},{\"templateData\":\"dataxobbcswsrt\",\"galleries\":[{},{},{},{}]},{\"templateData\":\"datalrbpbewtghfgbl\",\"galleries\":[{},{},{}]}]}},\"location\":\"nmxiebwwaloayqc\",\"tags\":{\"gmtsavjcbpwxqpsr\":\"tzjuzgwyzmhtxo\",\"mdyvxqtayriw\":\"nftguvriuhpr\"},\"id\":\"ro\",\"name\":\"qbex\",\"type\":\"mcqibycnojv\"}") + "{\"properties\":{\"priority\":1850668583,\"author\":\"skpbhenbtkcxywn\",\"templateData\":\"\\\"datatnrsyn\\\"\",\"galleries\":[{\"name\":\"dybyxczfclhaa\",\"category\":\"babphlwrqlfk\",\"type\":\"thsu\",\"order\":296949281,\"resourceType\":\"nyyazttbtwwrqpue\"},{\"name\":\"kzywbiex\",\"category\":\"eyueaxibxujwb\",\"type\":\"walm\",\"order\":978941807,\"resourceType\":\"xaepdkzjancuxr\"}],\"localized\":{\"uhxwtctyqiklbbov\":[{\"templateData\":\"\\\"datav\\\"\",\"galleries\":[{},{}]},{\"templateData\":\"\\\"datawd\\\"\",\"galleries\":[{}]},{\"templateData\":\"\\\"datatsdbpgn\\\"\",\"galleries\":[{}]},{\"templateData\":\"\\\"datahpzxbzpfzab\\\"\",\"galleries\":[{}]}],\"sxnkjzkdeslpvlo\":[{\"templateData\":\"\\\"datazbhvgyuguosv\\\"\",\"galleries\":[{},{},{}]},{\"templateData\":\"\\\"datasxqu\\\"\",\"galleries\":[{}]},{\"templateData\":\"\\\"datal\\\"\",\"galleries\":[{},{},{},{}]}],\"hvpesapskrdqm\":[{\"templateData\":\"\\\"datayighxpk\\\"\",\"galleries\":[{}]},{\"templateData\":\"\\\"dataaiuebbaumnyqu\\\"\",\"galleries\":[{}]},{\"templateData\":\"\\\"dataojnabckhsmtxpsie\\\"\",\"galleries\":[{},{},{}]}]}},\"location\":\"jdhtldwkyzxu\",\"tags\":{\"twrupqsxvnm\":\"ncwscwsvlxoto\"},\"id\":\"cykvceo\",\"name\":\"eil\",\"type\":\"vnotyfjfcnj\"}") .toObject(WorkbookTemplateInner.class); - Assertions.assertEquals("nmxiebwwaloayqc", model.location()); - Assertions.assertEquals("tzjuzgwyzmhtxo", model.tags().get("gmtsavjcbpwxqpsr")); - Assertions.assertEquals(1688496747, model.priority()); - Assertions.assertEquals("eyvjusrtslhspkde", model.author()); - Assertions.assertEquals("lmqkrhahvlj", model.galleries().get(0).name()); - Assertions.assertEquals("haquhcdh", model.galleries().get(0).category()); - Assertions.assertEquals("ualaexqpvfadmw", model.galleries().get(0).type()); - Assertions.assertEquals(448234135, model.galleries().get(0).order()); - Assertions.assertEquals("gvxp", model.galleries().get(0).resourceType()); + Assertions.assertEquals("jdhtldwkyzxu", model.location()); + Assertions.assertEquals("ncwscwsvlxoto", model.tags().get("twrupqsxvnm")); + Assertions.assertEquals(1850668583, model.priority()); + Assertions.assertEquals("skpbhenbtkcxywn", model.author()); + Assertions.assertEquals("dybyxczfclhaa", model.galleries().get(0).name()); + Assertions.assertEquals("babphlwrqlfk", model.galleries().get(0).category()); + Assertions.assertEquals("thsu", model.galleries().get(0).type()); + Assertions.assertEquals(296949281, model.galleries().get(0).order()); + Assertions.assertEquals("nyyazttbtwwrqpue", model.galleries().get(0).resourceType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkbookTemplateInner model = new WorkbookTemplateInner().withLocation("nmxiebwwaloayqc") - .withTags(mapOf("gmtsavjcbpwxqpsr", "tzjuzgwyzmhtxo", "mdyvxqtayriw", "nftguvriuhpr")) - .withPriority(1688496747) - .withAuthor("eyvjusrtslhspkde") - .withTemplateData("datamaofmxagkv") + WorkbookTemplateInner model = new WorkbookTemplateInner().withLocation("jdhtldwkyzxu") + .withTags(mapOf("twrupqsxvnm", "ncwscwsvlxoto")) + .withPriority(1850668583) + .withAuthor("skpbhenbtkcxywn") + .withTemplateData("\"datatnrsyn\"") .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("lmqkrhahvlj") - .withCategory("haquhcdh") - .withType("ualaexqpvfadmw") - .withOrder(448234135) - .withResourceType("gvxp"), - new WorkbookTemplateGallery().withName("omzlfmi") - .withCategory("wbnb") - .withType("ldawkzbaliourqha") - .withOrder(30531984) - .withResourceType("ashsfwxos"), - new WorkbookTemplateGallery().withName("z") - .withCategory("ugicjooxdjebw") - .withType("cwwfvovbvme") - .withOrder(321338352) - .withResourceType("vyhzceuojgjrwj"))) - .withLocalized(mapOf("isk", + new WorkbookTemplateGallery().withName("dybyxczfclhaa") + .withCategory("babphlwrqlfk") + .withType("thsu") + .withOrder(296949281) + .withResourceType("nyyazttbtwwrqpue"), + new WorkbookTemplateGallery().withName("kzywbiex") + .withCategory("eyueaxibxujwb") + .withType("walm") + .withOrder(978941807) + .withResourceType("xaepdkzjancuxr"))) + .withLocalized(mapOf("uhxwtctyqiklbbov", Arrays.asList( - new WorkbookTemplateLocalizedGallery().withTemplateData("datawmcdytdxwi") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery(), - new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery().withTemplateData("datajawgqwg") + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datav\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datawd\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datatsdbpgn\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datahpzxbzpfzab\"") .withGalleries(Arrays.asList(new WorkbookTemplateGallery()))), - "hvylwzbt", - Arrays.asList(new WorkbookTemplateLocalizedGallery().withTemplateData("datakpycgklwndnhjd") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery()))), - "wuwprzqlv", - Arrays.asList(new WorkbookTemplateLocalizedGallery().withTemplateData("dataujznb") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery()))), - "xzvlvqhjkbegib", + "sxnkjzkdeslpvlo", Arrays.asList( - new WorkbookTemplateLocalizedGallery().withTemplateData("datalupj") + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datazbhvgyuguosv\"") .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery().withTemplateData("dataxobbcswsrt") + new WorkbookTemplateGallery())), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datasxqu\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datal\"") .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery().withTemplateData("datalrbpbewtghfgbl") + new WorkbookTemplateGallery(), new WorkbookTemplateGallery()))), + "hvpesapskrdqm", + Arrays.asList( + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datayighxpk\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"dataaiuebbaumnyqu\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"dataojnabckhsmtxpsie\"") .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery(), new WorkbookTemplateGallery()))))); model = BinaryData.fromObject(model).toObject(WorkbookTemplateInner.class); - Assertions.assertEquals("nmxiebwwaloayqc", model.location()); - Assertions.assertEquals("tzjuzgwyzmhtxo", model.tags().get("gmtsavjcbpwxqpsr")); - Assertions.assertEquals(1688496747, model.priority()); - Assertions.assertEquals("eyvjusrtslhspkde", model.author()); - Assertions.assertEquals("lmqkrhahvlj", model.galleries().get(0).name()); - Assertions.assertEquals("haquhcdh", model.galleries().get(0).category()); - Assertions.assertEquals("ualaexqpvfadmw", model.galleries().get(0).type()); - Assertions.assertEquals(448234135, model.galleries().get(0).order()); - Assertions.assertEquals("gvxp", model.galleries().get(0).resourceType()); + Assertions.assertEquals("jdhtldwkyzxu", model.location()); + Assertions.assertEquals("ncwscwsvlxoto", model.tags().get("twrupqsxvnm")); + Assertions.assertEquals(1850668583, model.priority()); + Assertions.assertEquals("skpbhenbtkcxywn", model.author()); + Assertions.assertEquals("dybyxczfclhaa", model.galleries().get(0).name()); + Assertions.assertEquals("babphlwrqlfk", model.galleries().get(0).category()); + Assertions.assertEquals("thsu", model.galleries().get(0).type()); + Assertions.assertEquals(296949281, model.galleries().get(0).order()); + Assertions.assertEquals("nyyazttbtwwrqpue", model.galleries().get(0).resourceType()); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateLocalizedGalleryTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateLocalizedGalleryTests.java index 7690fb5316c4..28248c2c0a1b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateLocalizedGalleryTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateLocalizedGalleryTests.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.generated; @@ -14,44 +14,40 @@ public final class WorkbookTemplateLocalizedGalleryTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbookTemplateLocalizedGallery model = BinaryData.fromString( - "{\"templateData\":\"datazapvhelx\",\"galleries\":[{\"name\":\"yat\",\"category\":\"ckcb\",\"type\":\"ejrjxgciqibrho\",\"order\":1487162894,\"resourceType\":\"qrhzoymibmrqyib\"},{\"name\":\"wfluszdt\",\"category\":\"rkwofyyvoqa\",\"type\":\"iexpbtgiwbwo\",\"order\":1119495390,\"resourceType\":\"shrtdtkcnqxwb\"},{\"name\":\"kulpiujwaasi\",\"category\":\"i\",\"type\":\"byuqerpqlp\",\"order\":1285990077,\"resourceType\":\"iuqgbdbutauv\"},{\"name\":\"tkuwhhmhykojo\",\"category\":\"fnndl\",\"type\":\"chkoymkcdyh\",\"order\":1262943142,\"resourceType\":\"pwdreqnovvqf\"}]}") + "{\"templateData\":\"\\\"databwwaloa\\\"\",\"galleries\":[{\"name\":\"wrtz\",\"category\":\"zg\",\"type\":\"zmh\",\"order\":1672254683,\"resourceType\":\"gmtsavjcbpwxqpsr\"},{\"name\":\"ftguv\",\"category\":\"uhprwmdyvxqt\",\"type\":\"riwwroy\",\"order\":1621118855,\"resourceType\":\"rmcqiby\"},{\"name\":\"ojvknmefqsgzvaha\",\"category\":\"y\",\"type\":\"pvgqzcjrvxdjzlm\",\"order\":391686670,\"resourceType\":\"vu\"}]}") .toObject(WorkbookTemplateLocalizedGallery.class); - Assertions.assertEquals("yat", model.galleries().get(0).name()); - Assertions.assertEquals("ckcb", model.galleries().get(0).category()); - Assertions.assertEquals("ejrjxgciqibrho", model.galleries().get(0).type()); - Assertions.assertEquals(1487162894, model.galleries().get(0).order()); - Assertions.assertEquals("qrhzoymibmrqyib", model.galleries().get(0).resourceType()); + Assertions.assertEquals("wrtz", model.galleries().get(0).name()); + Assertions.assertEquals("zg", model.galleries().get(0).category()); + Assertions.assertEquals("zmh", model.galleries().get(0).type()); + Assertions.assertEquals(1672254683, model.galleries().get(0).order()); + Assertions.assertEquals("gmtsavjcbpwxqpsr", model.galleries().get(0).resourceType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkbookTemplateLocalizedGallery model = new WorkbookTemplateLocalizedGallery().withTemplateData("datazapvhelx") - .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("yat") - .withCategory("ckcb") - .withType("ejrjxgciqibrho") - .withOrder(1487162894) - .withResourceType("qrhzoymibmrqyib"), - new WorkbookTemplateGallery().withName("wfluszdt") - .withCategory("rkwofyyvoqa") - .withType("iexpbtgiwbwo") - .withOrder(1119495390) - .withResourceType("shrtdtkcnqxwb"), - new WorkbookTemplateGallery().withName("kulpiujwaasi") - .withCategory("i") - .withType("byuqerpqlp") - .withOrder(1285990077) - .withResourceType("iuqgbdbutauv"), - new WorkbookTemplateGallery().withName("tkuwhhmhykojo") - .withCategory("fnndl") - .withType("chkoymkcdyh") - .withOrder(1262943142) - .withResourceType("pwdreqnovvqf"))); + WorkbookTemplateLocalizedGallery model + = new WorkbookTemplateLocalizedGallery().withTemplateData("\"databwwaloa\"") + .withGalleries(Arrays.asList( + new WorkbookTemplateGallery().withName("wrtz") + .withCategory("zg") + .withType("zmh") + .withOrder(1672254683) + .withResourceType("gmtsavjcbpwxqpsr"), + new WorkbookTemplateGallery().withName("ftguv") + .withCategory("uhprwmdyvxqt") + .withType("riwwroy") + .withOrder(1621118855) + .withResourceType("rmcqiby"), + new WorkbookTemplateGallery().withName("ojvknmefqsgzvaha") + .withCategory("y") + .withType("pvgqzcjrvxdjzlm") + .withOrder(391686670) + .withResourceType("vu"))); model = BinaryData.fromObject(model).toObject(WorkbookTemplateLocalizedGallery.class); - Assertions.assertEquals("yat", model.galleries().get(0).name()); - Assertions.assertEquals("ckcb", model.galleries().get(0).category()); - Assertions.assertEquals("ejrjxgciqibrho", model.galleries().get(0).type()); - Assertions.assertEquals(1487162894, model.galleries().get(0).order()); - Assertions.assertEquals("qrhzoymibmrqyib", model.galleries().get(0).resourceType()); + Assertions.assertEquals("wrtz", model.galleries().get(0).name()); + Assertions.assertEquals("zg", model.galleries().get(0).category()); + Assertions.assertEquals("zmh", model.galleries().get(0).type()); + Assertions.assertEquals(1672254683, model.galleries().get(0).order()); + Assertions.assertEquals("gmtsavjcbpwxqpsr", model.galleries().get(0).resourceType()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatePropertiesTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatePropertiesTests.java index 84d3170f3d5f..ce08913ea549 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatePropertiesTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatePropertiesTests.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.generated; @@ -17,179 +17,89 @@ public final class WorkbookTemplatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbookTemplateProperties model = BinaryData.fromString( - "{\"priority\":2121055666,\"author\":\"fqsgzvahapjy\",\"templateData\":\"datahpvgqz\",\"galleries\":[{\"name\":\"vxdjzlmwlxkvugf\",\"category\":\"ovawjvzunlu\",\"type\":\"nnprn\",\"order\":1539688741,\"resourceType\":\"ilpjzuaejxdult\"}],\"localized\":{\"rruvwbhsq\":[{\"templateData\":\"datatdzumveekgpw\",\"galleries\":[{\"name\":\"kfpbs\",\"category\":\"ofd\",\"type\":\"uusdttouwa\",\"order\":1947792369,\"resourceType\":\"qvkelnsm\"}]},{\"templateData\":\"dataxwyjsflhhc\",\"galleries\":[{\"name\":\"jixisxyawjoyaqcs\",\"category\":\"jpkiidzyexznelix\",\"type\":\"rzt\",\"order\":1975568377,\"resourceType\":\"bnxknalaulppg\"},{\"name\":\"tpnapnyiropuhpig\",\"category\":\"gylgqgitxmedjvcs\",\"type\":\"n\",\"order\":1519896216,\"resourceType\":\"cwzzhxgktr\"},{\"name\":\"ucnapkteoellwp\",\"category\":\"d\",\"type\":\"pfqbuaceopzf\",\"order\":1219903446,\"resourceType\":\"uaopppcqeq\"}]},{\"templateData\":\"datalzdahzxctobgbkdm\",\"galleries\":[{\"name\":\"ostmgrcf\",\"category\":\"nrmfqjhhk\",\"type\":\"pvjymjhxxjyng\",\"order\":1804869047,\"resourceType\":\"krtswbxqz\"},{\"name\":\"zjf\",\"category\":\"vjfdx\",\"type\":\"vetvt\",\"order\":393815457,\"resourceType\":\"tdo\"},{\"name\":\"cbxvwvxyslqbh\",\"category\":\"xoblytkbl\",\"type\":\"ewwwfbkrvrnsv\",\"order\":82404259,\"resourceType\":\"ohxcrsbfova\"}]}],\"mdnbbglzpswiy\":[{\"templateData\":\"databcgjbirxbp\",\"galleries\":[{\"name\":\"fbjfdtwssotftpvj\",\"category\":\"exilzznfqqnvwpmq\",\"type\":\"ruoujmk\",\"order\":1426920839,\"resourceType\":\"qytjrybnwjewgd\"},{\"name\":\"ervnaenqpehi\",\"category\":\"oygmift\",\"type\":\"zdnds\",\"order\":1279542640,\"resourceType\":\"yq\"},{\"name\":\"ynduha\",\"category\":\"qlkth\",\"type\":\"aqolbgycduiertg\",\"order\":178925296,\"resourceType\":\"vaolpsslqlf\"}]}],\"iyzvqtmnub\":[{\"templateData\":\"datawyhzdx\",\"galleries\":[{\"name\":\"bzmnvdfznud\",\"category\":\"dvxzbncblylpst\",\"type\":\"hh\",\"order\":1188392360,\"resourceType\":\"dzu\"},{\"name\":\"rsc\",\"category\":\"t\",\"type\":\"vfiwjmygtdss\",\"order\":1943196565,\"resourceType\":\"mweriofzpy\"},{\"name\":\"emwabnet\",\"category\":\"hszhedplvwiwu\",\"type\":\"wmbesldnkw\",\"order\":353281330,\"resourceType\":\"jflcxog\"},{\"name\":\"konzmnsik\",\"category\":\"kqze\",\"type\":\"kdltfzxmhhvhg\",\"order\":243631399,\"resourceType\":\"dkwobdagx\"}]},{\"templateData\":\"databqdxbx\",\"galleries\":[{\"name\":\"ogqxndlkzgxhuri\",\"category\":\"bpodxunkbebxm\",\"type\":\"yyntwl\",\"order\":2005326650,\"resourceType\":\"koievseo\"},{\"name\":\"q\",\"category\":\"ltmuwlauwzizx\",\"type\":\"pgcjefuzmuvp\",\"order\":887975126,\"resourceType\":\"um\"},{\"name\":\"p\",\"category\":\"ebmnzbtbhjpglk\",\"type\":\"ohdneuel\",\"order\":571890155,\"resourceType\":\"dyhtozfikdowwquu\"},{\"name\":\"zx\",\"category\":\"vithh\",\"type\":\"o\",\"order\":485357732,\"resourceType\":\"gbhcohfwdsj\"}]},{\"templateData\":\"dataaljutiiswac\",\"galleries\":[{\"name\":\"k\",\"category\":\"ewkfvhqcrai\",\"type\":\"pnppfuf\",\"order\":888986239,\"resourceType\":\"mh\"}]},{\"templateData\":\"dataxyjrxsagafcnih\",\"galleries\":[{\"name\":\"pnedgf\",\"category\":\"vkcvqvpkeqd\",\"type\":\"drhvoodsotbo\",\"order\":138973043,\"resourceType\":\"pcjwv\"},{\"name\":\"dldwmgxc\",\"category\":\"slpmutwuo\",\"type\":\"rpkhjwn\",\"order\":1641060352,\"resourceType\":\"luicpdggkzzlvmbm\"},{\"name\":\"xmodf\",\"category\":\"efyw\",\"type\":\"pfvmwyhrfou\",\"order\":1120299710,\"resourceType\":\"akcp\"}]}]}}") + "{\"priority\":534363981,\"author\":\"x\",\"templateData\":\"\\\"datahbttkphyw\\\"\",\"galleries\":[{\"name\":\"jtoqne\",\"category\":\"clfp\",\"type\":\"hoxus\",\"order\":2041952882,\"resourceType\":\"bgyepsbj\"}],\"localized\":{\"nbmpowuwprzq\":[{\"templateData\":\"\\\"datagxywpmue\\\"\",\"galleries\":[{\"name\":\"wfqkquj\",\"category\":\"suyonobglaocq\",\"type\":\"ccm\",\"order\":567050301,\"resourceType\":\"xy\"}]},{\"templateData\":\"\\\"datamoyrxvwfudwpz\\\"\",\"galleries\":[{\"name\":\"dzhlrq\",\"category\":\"hckfrlhrx\",\"type\":\"kyv\",\"order\":289990060,\"resourceType\":\"n\"},{\"name\":\"bpzkafkuwbc\",\"category\":\"wbme\",\"type\":\"seyvj\",\"order\":661393497,\"resourceType\":\"slhs\"},{\"name\":\"deemao\",\"category\":\"xagkvtmelmqkrh\",\"type\":\"vljua\",\"order\":836090349,\"resourceType\":\"hcdhmdual\"},{\"name\":\"xqpvfadmw\",\"category\":\"crgvxpvgom\",\"type\":\"fmisg\",\"order\":1787960878,\"resourceType\":\"beldawkzbaliourq\"}]},{\"templateData\":\"\\\"datakauhashsfwxo\\\"\",\"galleries\":[{\"name\":\"xcug\",\"category\":\"jooxdjebw\",\"type\":\"cwwfvovbvme\",\"order\":321338352,\"resourceType\":\"vyhzceuojgjrwj\"}]},{\"templateData\":\"\\\"dataiotwmcdytdxwit\\\"\",\"galleries\":[{\"name\":\"awgqwgxhni\",\"category\":\"x\",\"type\":\"kpycgklwndnhjd\",\"order\":1458194336,\"resourceType\":\"vylwzbtdhxuj\"}]}]}}") .toObject(WorkbookTemplateProperties.class); - Assertions.assertEquals(2121055666, model.priority()); - Assertions.assertEquals("fqsgzvahapjy", model.author()); - Assertions.assertEquals("vxdjzlmwlxkvugf", model.galleries().get(0).name()); - Assertions.assertEquals("ovawjvzunlu", model.galleries().get(0).category()); - Assertions.assertEquals("nnprn", model.galleries().get(0).type()); - Assertions.assertEquals(1539688741, model.galleries().get(0).order()); - Assertions.assertEquals("ilpjzuaejxdult", model.galleries().get(0).resourceType()); - Assertions.assertEquals("kfpbs", model.localized().get("rruvwbhsq").get(0).galleries().get(0).name()); - Assertions.assertEquals("ofd", model.localized().get("rruvwbhsq").get(0).galleries().get(0).category()); - Assertions.assertEquals("uusdttouwa", model.localized().get("rruvwbhsq").get(0).galleries().get(0).type()); - Assertions.assertEquals(1947792369, model.localized().get("rruvwbhsq").get(0).galleries().get(0).order()); - Assertions.assertEquals("qvkelnsm", - model.localized().get("rruvwbhsq").get(0).galleries().get(0).resourceType()); + Assertions.assertEquals(534363981, model.priority()); + Assertions.assertEquals("x", model.author()); + Assertions.assertEquals("jtoqne", model.galleries().get(0).name()); + Assertions.assertEquals("clfp", model.galleries().get(0).category()); + Assertions.assertEquals("hoxus", model.galleries().get(0).type()); + Assertions.assertEquals(2041952882, model.galleries().get(0).order()); + Assertions.assertEquals("bgyepsbj", model.galleries().get(0).resourceType()); + Assertions.assertEquals("wfqkquj", model.localized().get("nbmpowuwprzq").get(0).galleries().get(0).name()); + Assertions.assertEquals("suyonobglaocq", + model.localized().get("nbmpowuwprzq").get(0).galleries().get(0).category()); + Assertions.assertEquals("ccm", model.localized().get("nbmpowuwprzq").get(0).galleries().get(0).type()); + Assertions.assertEquals(567050301, model.localized().get("nbmpowuwprzq").get(0).galleries().get(0).order()); + Assertions.assertEquals("xy", model.localized().get("nbmpowuwprzq").get(0).galleries().get(0).resourceType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkbookTemplateProperties model - = new WorkbookTemplateProperties().withPriority(2121055666) - .withAuthor("fqsgzvahapjy") - .withTemplateData("datahpvgqz") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery().withName("vxdjzlmwlxkvugf") - .withCategory("ovawjvzunlu") - .withType("nnprn") - .withOrder(1539688741) - .withResourceType("ilpjzuaejxdult"))) - .withLocalized( - mapOf("rruvwbhsq", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery().withTemplateData("datatdzumveekgpw") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery().withName("kfpbs") - .withCategory("ofd") - .withType("uusdttouwa") - .withOrder(1947792369) - .withResourceType("qvkelnsm"))), - new WorkbookTemplateLocalizedGallery().withTemplateData("dataxwyjsflhhc") - .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("jixisxyawjoyaqcs") - .withCategory("jpkiidzyexznelix") - .withType("rzt") - .withOrder(1975568377) - .withResourceType("bnxknalaulppg"), - new WorkbookTemplateGallery().withName("tpnapnyiropuhpig") - .withCategory("gylgqgitxmedjvcs") - .withType("n") - .withOrder(1519896216) - .withResourceType("cwzzhxgktr"), - new WorkbookTemplateGallery().withName("ucnapkteoellwp") - .withCategory("d") - .withType("pfqbuaceopzf") - .withOrder(1219903446) - .withResourceType("uaopppcqeq"))), - new WorkbookTemplateLocalizedGallery().withTemplateData("datalzdahzxctobgbkdm") - .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("ostmgrcf") - .withCategory("nrmfqjhhk") - .withType("pvjymjhxxjyng") - .withOrder(1804869047) - .withResourceType("krtswbxqz"), - new WorkbookTemplateGallery().withName("zjf") - .withCategory("vjfdx") - .withType("vetvt") - .withOrder(393815457) - .withResourceType("tdo"), - new WorkbookTemplateGallery().withName("cbxvwvxyslqbh") - .withCategory("xoblytkbl") - .withType("ewwwfbkrvrnsv") - .withOrder(82404259) - .withResourceType("ohxcrsbfova")))), - "mdnbbglzpswiy", - Arrays.asList(new WorkbookTemplateLocalizedGallery().withTemplateData("databcgjbirxbp") - .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("fbjfdtwssotftpvj") - .withCategory("exilzznfqqnvwpmq") - .withType("ruoujmk") - .withOrder(1426920839) - .withResourceType("qytjrybnwjewgd"), - new WorkbookTemplateGallery().withName("ervnaenqpehi") - .withCategory("oygmift") - .withType("zdnds") - .withOrder(1279542640) - .withResourceType("yq"), - new WorkbookTemplateGallery().withName("ynduha") - .withCategory("qlkth") - .withType("aqolbgycduiertg") - .withOrder(178925296) - .withResourceType("vaolpsslqlf")))), - "iyzvqtmnub", - Arrays.asList( - new WorkbookTemplateLocalizedGallery().withTemplateData("datawyhzdx") - .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("bzmnvdfznud") - .withCategory("dvxzbncblylpst") - .withType("hh") - .withOrder(1188392360) - .withResourceType("dzu"), - new WorkbookTemplateGallery().withName("rsc") - .withCategory("t") - .withType("vfiwjmygtdss") - .withOrder(1943196565) - .withResourceType("mweriofzpy"), - new WorkbookTemplateGallery().withName("emwabnet") - .withCategory("hszhedplvwiwu") - .withType("wmbesldnkw") - .withOrder(353281330) - .withResourceType("jflcxog"), - new WorkbookTemplateGallery().withName("konzmnsik") - .withCategory("kqze") - .withType("kdltfzxmhhvhg") - .withOrder(243631399) - .withResourceType("dkwobdagx"))), - new WorkbookTemplateLocalizedGallery().withTemplateData("databqdxbx") - .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("ogqxndlkzgxhuri") - .withCategory("bpodxunkbebxm") - .withType("yyntwl") - .withOrder(2005326650) - .withResourceType("koievseo"), - new WorkbookTemplateGallery().withName("q") - .withCategory("ltmuwlauwzizx") - .withType("pgcjefuzmuvp") - .withOrder(887975126) - .withResourceType("um"), - new WorkbookTemplateGallery().withName("p") - .withCategory("ebmnzbtbhjpglk") - .withType("ohdneuel") - .withOrder(571890155) - .withResourceType("dyhtozfikdowwquu"), - new WorkbookTemplateGallery().withName("zx") - .withCategory("vithh") - .withType("o") - .withOrder(485357732) - .withResourceType("gbhcohfwdsj"))), - new WorkbookTemplateLocalizedGallery().withTemplateData("dataaljutiiswac") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery().withName("k") - .withCategory("ewkfvhqcrai") - .withType("pnppfuf") - .withOrder(888986239) - .withResourceType("mh"))), - new WorkbookTemplateLocalizedGallery().withTemplateData("dataxyjrxsagafcnih") - .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("pnedgf") - .withCategory("vkcvqvpkeqd") - .withType("drhvoodsotbo") - .withOrder(138973043) - .withResourceType("pcjwv"), - new WorkbookTemplateGallery().withName("dldwmgxc") - .withCategory("slpmutwuo") - .withType("rpkhjwn") - .withOrder(1641060352) - .withResourceType("luicpdggkzzlvmbm"), - new WorkbookTemplateGallery().withName("xmodf") - .withCategory("efyw") - .withType("pfvmwyhrfou") - .withOrder(1120299710) - .withResourceType("akcp")))))); + WorkbookTemplateProperties model = new WorkbookTemplateProperties().withPriority(534363981) + .withAuthor("x") + .withTemplateData("\"datahbttkphyw\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery().withName("jtoqne") + .withCategory("clfp") + .withType("hoxus") + .withOrder(2041952882) + .withResourceType("bgyepsbj"))) + .withLocalized(mapOf("nbmpowuwprzq", + Arrays.asList( + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datagxywpmue\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery().withName("wfqkquj") + .withCategory("suyonobglaocq") + .withType("ccm") + .withOrder(567050301) + .withResourceType("xy"))), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datamoyrxvwfudwpz\"") + .withGalleries(Arrays.asList( + new WorkbookTemplateGallery().withName("dzhlrq") + .withCategory("hckfrlhrx") + .withType("kyv") + .withOrder(289990060) + .withResourceType("n"), + new WorkbookTemplateGallery().withName("bpzkafkuwbc") + .withCategory("wbme") + .withType("seyvj") + .withOrder(661393497) + .withResourceType("slhs"), + new WorkbookTemplateGallery().withName("deemao") + .withCategory("xagkvtmelmqkrh") + .withType("vljua") + .withOrder(836090349) + .withResourceType("hcdhmdual"), + new WorkbookTemplateGallery().withName("xqpvfadmw") + .withCategory("crgvxpvgom") + .withType("fmisg") + .withOrder(1787960878) + .withResourceType("beldawkzbaliourq"))), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datakauhashsfwxo\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery().withName("xcug") + .withCategory("jooxdjebw") + .withType("cwwfvovbvme") + .withOrder(321338352) + .withResourceType("vyhzceuojgjrwj"))), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"dataiotwmcdytdxwit\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery().withName("awgqwgxhni") + .withCategory("x") + .withType("kpycgklwndnhjd") + .withOrder(1458194336) + .withResourceType("vylwzbtdhxuj")))))); model = BinaryData.fromObject(model).toObject(WorkbookTemplateProperties.class); - Assertions.assertEquals(2121055666, model.priority()); - Assertions.assertEquals("fqsgzvahapjy", model.author()); - Assertions.assertEquals("vxdjzlmwlxkvugf", model.galleries().get(0).name()); - Assertions.assertEquals("ovawjvzunlu", model.galleries().get(0).category()); - Assertions.assertEquals("nnprn", model.galleries().get(0).type()); - Assertions.assertEquals(1539688741, model.galleries().get(0).order()); - Assertions.assertEquals("ilpjzuaejxdult", model.galleries().get(0).resourceType()); - Assertions.assertEquals("kfpbs", model.localized().get("rruvwbhsq").get(0).galleries().get(0).name()); - Assertions.assertEquals("ofd", model.localized().get("rruvwbhsq").get(0).galleries().get(0).category()); - Assertions.assertEquals("uusdttouwa", model.localized().get("rruvwbhsq").get(0).galleries().get(0).type()); - Assertions.assertEquals(1947792369, model.localized().get("rruvwbhsq").get(0).galleries().get(0).order()); - Assertions.assertEquals("qvkelnsm", - model.localized().get("rruvwbhsq").get(0).galleries().get(0).resourceType()); + Assertions.assertEquals(534363981, model.priority()); + Assertions.assertEquals("x", model.author()); + Assertions.assertEquals("jtoqne", model.galleries().get(0).name()); + Assertions.assertEquals("clfp", model.galleries().get(0).category()); + Assertions.assertEquals("hoxus", model.galleries().get(0).type()); + Assertions.assertEquals(2041952882, model.galleries().get(0).order()); + Assertions.assertEquals("bgyepsbj", model.galleries().get(0).resourceType()); + Assertions.assertEquals("wfqkquj", model.localized().get("nbmpowuwprzq").get(0).galleries().get(0).name()); + Assertions.assertEquals("suyonobglaocq", + model.localized().get("nbmpowuwprzq").get(0).galleries().get(0).category()); + Assertions.assertEquals("ccm", model.localized().get("nbmpowuwprzq").get(0).galleries().get(0).type()); + Assertions.assertEquals(567050301, model.localized().get("nbmpowuwprzq").get(0).galleries().get(0).order()); + Assertions.assertEquals("xy", model.localized().get("nbmpowuwprzq").get(0).galleries().get(0).resourceType()); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateResourceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateResourceTests.java deleted file mode 100644 index f68c95355279..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateResourceTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookTemplateResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookTemplateResource model = BinaryData.fromString( - "{\"location\":\"vljxywsu\",\"tags\":{\"aeneqnzarrwl\":\"rsndsytgadgvra\"},\"id\":\"uu\",\"name\":\"jfqka\",\"type\":\"e\"}") - .toObject(WorkbookTemplateResource.class); - Assertions.assertEquals("vljxywsu", model.location()); - Assertions.assertEquals("rsndsytgadgvra", model.tags().get("aeneqnzarrwl")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookTemplateResource model - = new WorkbookTemplateResource().withLocation("vljxywsu").withTags(mapOf("aeneqnzarrwl", "rsndsytgadgvra")); - model = BinaryData.fromObject(model).toObject(WorkbookTemplateResource.class); - Assertions.assertEquals("vljxywsu", model.location()); - Assertions.assertEquals("rsndsytgadgvra", model.tags().get("aeneqnzarrwl")); - } - - // 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; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateUpdateParametersTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateUpdateParametersTests.java index 93e82cc2d83d..4390b8b0ea16 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateUpdateParametersTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateUpdateParametersTests.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.generated; @@ -17,72 +17,76 @@ public final class WorkbookTemplateUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbookTemplateUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"f\":\"pfpubjibww\",\"kn\":\"ohqkvpuvksgpls\"},\"properties\":{\"priority\":1486406311,\"author\":\"n\",\"templateData\":\"datajphuopxodlqi\",\"galleries\":[{\"name\":\"orzihle\",\"category\":\"jswsrmslyz\",\"type\":\"zbchckqqzqioxiy\",\"order\":1721034864,\"resourceType\":\"zynkedya\"},{\"name\":\"wyhqmibzyhwits\",\"category\":\"pyy\",\"type\":\"cdpu\",\"order\":1107344942,\"resourceType\":\"mwzn\"},{\"name\":\"biknsorgjhxbld\",\"category\":\"wwrlkdmtncv\",\"type\":\"otllxdyhgsyo\",\"order\":1135624729,\"resourceType\":\"ltdtbnnhad\"},{\"name\":\"crkvcikhnv\",\"category\":\"mqg\",\"type\":\"queziky\",\"order\":566556548,\"resourceType\":\"kallatmel\"}],\"localized\":{\"wq\":[{\"templateData\":\"dataccjzkzivgvv\",\"galleries\":[{},{}]},{\"templateData\":\"datarhyrnxxmueed\",\"galleries\":[{},{},{}]},{\"templateData\":\"datav\",\"galleries\":[{},{},{}]}],\"piohgwxrtfu\":[{\"templateData\":\"datahealmfmtda\",\"galleries\":[{}]},{\"templateData\":\"datav\",\"galleries\":[{},{},{},{}]}]}}}") + "{\"tags\":{\"nluthnnp\":\"zovawjvz\",\"jzuaejxdultskzbb\":\"nxipeil\",\"wozuhkf\":\"dzumveekg\",\"uusdttouwa\":\"bsjyofdx\"},\"properties\":{\"priority\":2116291824,\"author\":\"v\",\"templateData\":\"\\\"dataelnsmvbxw\\\"\",\"galleries\":[{\"name\":\"flhhcaal\",\"category\":\"ixisxyawjoy\",\"type\":\"cslyjpk\",\"order\":888543440,\"resourceType\":\"yexz\"},{\"name\":\"lixhnrztfol\",\"category\":\"nxknalaulp\",\"type\":\"gdtpnapnyiro\",\"order\":1189484284,\"resourceType\":\"igvpgylg\"},{\"name\":\"itxmedjvcslynqww\",\"category\":\"wzz\",\"type\":\"gktrmgucnapkte\",\"order\":1950925712,\"resourceType\":\"wptfdy\"},{\"name\":\"fqbuaceopzf\",\"category\":\"hhuao\",\"type\":\"pcqeqx\",\"order\":72119187,\"resourceType\":\"ahzxctobgbk\"}],\"localized\":{\"jhxxjyn\":[{\"templateData\":\"\\\"datapostmgrcfbunrm\\\"\",\"galleries\":[{},{}]},{\"templateData\":\"\\\"datahkxbpv\\\"\",\"galleries\":[{}]}],\"zvszj\":[{\"templateData\":\"\\\"dataivkrtsw\\\"\",\"galleries\":[{},{}]}],\"hsfxoblytkb\":[{\"templateData\":\"\\\"datavjfdx\\\"\",\"galleries\":[{},{}]},{\"templateData\":\"\\\"datatvtc\\\"\",\"galleries\":[{}]},{\"templateData\":\"\\\"datadoqmcbxvwvxys\\\"\",\"galleries\":[{},{}]}],\"johxcrsb\":[{\"templateData\":\"\\\"dataewwwfbkrvrnsv\\\"\",\"galleries\":[{}]}]}}}") .toObject(WorkbookTemplateUpdateParameters.class); - Assertions.assertEquals("pfpubjibww", model.tags().get("f")); - Assertions.assertEquals(1486406311, model.priority()); - Assertions.assertEquals("n", model.author()); - Assertions.assertEquals("orzihle", model.galleries().get(0).name()); - Assertions.assertEquals("jswsrmslyz", model.galleries().get(0).category()); - Assertions.assertEquals("zbchckqqzqioxiy", model.galleries().get(0).type()); - Assertions.assertEquals(1721034864, model.galleries().get(0).order()); - Assertions.assertEquals("zynkedya", model.galleries().get(0).resourceType()); + Assertions.assertEquals("zovawjvz", model.tags().get("nluthnnp")); + Assertions.assertEquals(2116291824, model.priority()); + Assertions.assertEquals("v", model.author()); + Assertions.assertEquals("flhhcaal", model.galleries().get(0).name()); + Assertions.assertEquals("ixisxyawjoy", model.galleries().get(0).category()); + Assertions.assertEquals("cslyjpk", model.galleries().get(0).type()); + Assertions.assertEquals(888543440, model.galleries().get(0).order()); + Assertions.assertEquals("yexz", model.galleries().get(0).resourceType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkbookTemplateUpdateParameters model - = new WorkbookTemplateUpdateParameters().withTags(mapOf("f", "pfpubjibww", "kn", "ohqkvpuvksgpls")) - .withPriority(1486406311) - .withAuthor("n") - .withTemplateData("datajphuopxodlqi") - .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("orzihle") - .withCategory("jswsrmslyz") - .withType("zbchckqqzqioxiy") - .withOrder(1721034864) - .withResourceType("zynkedya"), - new WorkbookTemplateGallery().withName("wyhqmibzyhwits") - .withCategory("pyy") - .withType("cdpu") - .withOrder(1107344942) - .withResourceType("mwzn"), - new WorkbookTemplateGallery().withName("biknsorgjhxbld") - .withCategory("wwrlkdmtncv") - .withType("otllxdyhgsyo") - .withOrder(1135624729) - .withResourceType("ltdtbnnhad"), - new WorkbookTemplateGallery().withName("crkvcikhnv") - .withCategory("mqg") - .withType("queziky") - .withOrder(566556548) - .withResourceType("kallatmel"))) - .withLocalized(mapOf("wq", - Arrays.asList( - new WorkbookTemplateLocalizedGallery().withTemplateData("dataccjzkzivgvv") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery().withTemplateData("datarhyrnxxmueed") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery(), - new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery().withTemplateData("datav") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery(), - new WorkbookTemplateGallery()))), - "piohgwxrtfu", - Arrays.asList( - new WorkbookTemplateLocalizedGallery().withTemplateData("datahealmfmtda") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery().withTemplateData("datav") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), new WorkbookTemplateGallery()))))); + WorkbookTemplateUpdateParameters model = new WorkbookTemplateUpdateParameters() + .withTags(mapOf("nluthnnp", "zovawjvz", "jzuaejxdultskzbb", "nxipeil", "wozuhkf", "dzumveekg", "uusdttouwa", + "bsjyofdx")) + .withPriority(2116291824) + .withAuthor("v") + .withTemplateData("\"dataelnsmvbxw\"") + .withGalleries(Arrays.asList( + new WorkbookTemplateGallery().withName("flhhcaal") + .withCategory("ixisxyawjoy") + .withType("cslyjpk") + .withOrder(888543440) + .withResourceType("yexz"), + new WorkbookTemplateGallery().withName("lixhnrztfol") + .withCategory("nxknalaulp") + .withType("gdtpnapnyiro") + .withOrder(1189484284) + .withResourceType("igvpgylg"), + new WorkbookTemplateGallery().withName("itxmedjvcslynqww") + .withCategory("wzz") + .withType("gktrmgucnapkte") + .withOrder(1950925712) + .withResourceType("wptfdy"), + new WorkbookTemplateGallery().withName("fqbuaceopzf") + .withCategory("hhuao") + .withType("pcqeqx") + .withOrder(72119187) + .withResourceType("ahzxctobgbk"))) + .withLocalized(mapOf("jhxxjyn", + Arrays.asList( + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datapostmgrcfbunrm\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datahkxbpv\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery()))), + "zvszj", + Arrays.asList(new WorkbookTemplateLocalizedGallery().withTemplateData("\"dataivkrtsw\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery()))), + "hsfxoblytkb", + Arrays.asList( + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datavjfdx\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datatvtc\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), + new WorkbookTemplateLocalizedGallery().withTemplateData("\"datadoqmcbxvwvxys\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery()))), + "johxcrsb", + Arrays.asList(new WorkbookTemplateLocalizedGallery().withTemplateData("\"dataewwwfbkrvrnsv\"") + .withGalleries(Arrays.asList(new WorkbookTemplateGallery()))))); model = BinaryData.fromObject(model).toObject(WorkbookTemplateUpdateParameters.class); - Assertions.assertEquals("pfpubjibww", model.tags().get("f")); - Assertions.assertEquals(1486406311, model.priority()); - Assertions.assertEquals("n", model.author()); - Assertions.assertEquals("orzihle", model.galleries().get(0).name()); - Assertions.assertEquals("jswsrmslyz", model.galleries().get(0).category()); - Assertions.assertEquals("zbchckqqzqioxiy", model.galleries().get(0).type()); - Assertions.assertEquals(1721034864, model.galleries().get(0).order()); - Assertions.assertEquals("zynkedya", model.galleries().get(0).resourceType()); + Assertions.assertEquals("zovawjvz", model.tags().get("nluthnnp")); + Assertions.assertEquals(2116291824, model.priority()); + Assertions.assertEquals("v", model.author()); + Assertions.assertEquals("flhhcaal", model.galleries().get(0).name()); + Assertions.assertEquals("ixisxyawjoy", model.galleries().get(0).category()); + Assertions.assertEquals("cslyjpk", model.galleries().get(0).type()); + Assertions.assertEquals(888543440, model.galleries().get(0).order()); + Assertions.assertEquals("yexz", model.galleries().get(0).resourceType()); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesCreateOrUpdateWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index aa9060259f4e..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkbookTemplatesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"priority\":125495169,\"author\":\"xoe\",\"templateData\":\"dataqinjipnwjf\",\"galleries\":[{\"name\":\"lafcbahh\",\"category\":\"pofoi\",\"type\":\"w\",\"order\":1217605698,\"resourceType\":\"kmkkholvdnd\"},{\"name\":\"auo\",\"category\":\"huartv\",\"type\":\"ukyefchnmnahmnxh\",\"order\":1852256635,\"resourceType\":\"irwrwe\"},{\"name\":\"xffi\",\"category\":\"xwrsnew\",\"type\":\"zqvbubqm\",\"order\":584332320,\"resourceType\":\"ycxhxzgaztta\"},{\"name\":\"idvmfqhppubo\",\"category\":\"epdfgkmtdherng\",\"type\":\"c\",\"order\":2083850408,\"resourceType\":\"okqtobk\"}],\"localized\":{\"nnfhyetefypo\":[{\"templateData\":\"datash\",\"galleries\":[{},{},{},{}]},{\"templateData\":\"datapnulaiywzej\",\"galleries\":[{}]},{\"templateData\":\"datalwkojpllndnpdw\",\"galleries\":[{},{},{},{}]},{\"templateData\":\"datafgf\",\"galleries\":[{},{},{}]}]}},\"location\":\"octfjgtixrjvzuyt\",\"tags\":{\"bauiropi\":\"lmuowo\",\"n\":\"nszonwpngaj\"},\"id\":\"ixjawrtm\",\"name\":\"fjmyccxlzhco\",\"type\":\"ovne\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - WorkbookTemplate response = manager.workbookTemplates() - .define("vxlx") - .withRegion("gfabuiyjibuzphdu") - .withExistingResourceGroup("rxmunjdxvgln") - .withTags(mapOf("oxgjiuqhibt", "iknp", "pqwjedm", "z")) - .withPriority(46101784) - .withAuthor("ivbgkcv") - .withTemplateData("datahpzvuqdflvoniyp") - .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("bcpzgpxtivh") - .withCategory("nidibgqjxg") - .withType("r") - .withOrder(406558372) - .withResourceType("fgpikqm"), - new WorkbookTemplateGallery().withName("ao") - .withCategory("rmzvupo") - .withType("zdfuydzvkfvxcnqm") - .withOrder(547334197) - .withResourceType("wokmvkhlggd"), - new WorkbookTemplateGallery().withName("em") - .withCategory("kzsz") - .withType("iwtglxxhljfpg") - .withOrder(1130709728) - .withResourceType("mnzhrgmqg"), - new WorkbookTemplateGallery().withName("x") - .withCategory("qcbfrmbodths") - .withType("gvriibakclac") - .withOrder(1812641051) - .withResourceType("xousxauzl"))) - .withLocalized(mapOf("hnykz", - Arrays.asList( - new WorkbookTemplateLocalizedGallery().withTemplateData("datawohqfzizvu") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery().withTemplateData("datajsvthnwpzteko") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery().withTemplateData("databiattgplucfotan") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery(), - new WorkbookTemplateGallery()))), - "k", - Arrays.asList( - new WorkbookTemplateLocalizedGallery().withTemplateData("dataswvxwlmzqwmv") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery().withTemplateData("datamxmcuqudtcvclxy") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), new WorkbookTemplateGallery()))))) - .create(); - - Assertions.assertEquals("octfjgtixrjvzuyt", response.location()); - Assertions.assertEquals("lmuowo", response.tags().get("bauiropi")); - Assertions.assertEquals(125495169, response.priority()); - Assertions.assertEquals("xoe", response.author()); - Assertions.assertEquals("lafcbahh", response.galleries().get(0).name()); - Assertions.assertEquals("pofoi", response.galleries().get(0).category()); - Assertions.assertEquals("w", response.galleries().get(0).type()); - Assertions.assertEquals(1217605698, response.galleries().get(0).order()); - Assertions.assertEquals("kmkkholvdnd", response.galleries().get(0).resourceType()); - } - - // 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; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteByResourceGroupWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index e7b3631c0c8d..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkbookTemplatesDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.workbookTemplates() - .deleteByResourceGroupWithResponse("yjpmspbpssdfppyo", "tieyujtvczkcny", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index adf17a7eb4a2..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkbookTemplatesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"priority\":341362078,\"author\":\"dqmjxly\",\"templateData\":\"datazg\",\"galleries\":[{\"name\":\"uwt\",\"category\":\"jjyuojqtobax\",\"type\":\"eytu\",\"order\":1073974691,\"resourceType\":\"jkwrusnkq\"},{\"name\":\"syrq\",\"category\":\"jqhden\",\"type\":\"ulkpakd\",\"order\":466096532,\"resourceType\":\"jnnawtqa\"}],\"localized\":{\"sdp\":[{\"templateData\":\"datakpggqoweyi\",\"galleries\":[{},{}]},{\"templateData\":\"dataisngwflqqmpizru\",\"galleries\":[{},{}]},{\"templateData\":\"dataxpxiwfcngjs\",\"galleries\":[{}]},{\"templateData\":\"dataixtmkzjvkviirhgf\",\"galleries\":[{},{},{}]}],\"bglbyvict\":[{\"templateData\":\"datat\",\"galleries\":[{}]}],\"bydpizqaclnapxb\":[{\"templateData\":\"datarxkjzwrgxffmshk\",\"galleries\":[{},{},{},{}]},{\"templateData\":\"datagozxw\",\"galleries\":[{}]}],\"smfcttuxuuyilfl\":[{\"templateData\":\"datanugj\",\"galleries\":[{},{},{},{}]}]}},\"location\":\"oiquvrehmrnjhvs\",\"tags\":{\"uunfprnjletlxsm\":\"tczytqjtwh\",\"nlqwzdvpiwhx\":\"pddouifamowaziyn\"},\"id\":\"szdtmaajquh\",\"name\":\"xylrjvmtygjbmz\",\"type\":\"ospspshckf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - WorkbookTemplate response = manager.workbookTemplates() - .getByResourceGroupWithResponse("tgfebwln", "mhyreeudz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("oiquvrehmrnjhvs", response.location()); - Assertions.assertEquals("tczytqjtwh", response.tags().get("uunfprnjletlxsm")); - Assertions.assertEquals(341362078, response.priority()); - Assertions.assertEquals("dqmjxly", response.author()); - Assertions.assertEquals("uwt", response.galleries().get(0).name()); - Assertions.assertEquals("jjyuojqtobax", response.galleries().get(0).category()); - Assertions.assertEquals("eytu", response.galleries().get(0).type()); - Assertions.assertEquals(1073974691, response.galleries().get(0).order()); - Assertions.assertEquals("jkwrusnkq", response.galleries().get(0).resourceType()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupMockTests.java deleted file mode 100644 index e09ec9e43e5c..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkbookTemplatesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"priority\":835008707,\"author\":\"jgicgaao\",\"templateData\":\"datapttaqutd\",\"galleries\":[{\"name\":\"mxswvruunzz\",\"category\":\"ehkfkimrtixok\",\"type\":\"qyinl\",\"order\":980930736,\"resourceType\":\"qwhix\"},{\"name\":\"nstshi\",\"category\":\"gvelfc\",\"type\":\"uccbirdsvuw\",\"order\":228727125,\"resourceType\":\"egstmninwjizci\"},{\"name\":\"ghgshejjtbxqmu\",\"category\":\"xlxqzvn\",\"type\":\"sbycucrwnamikz\",\"order\":401745323,\"resourceType\":\"bsmswziqgf\"},{\"name\":\"okzrus\",\"category\":\"vhczznvfby\",\"type\":\"sxjwwixz\",\"order\":1659306080,\"resourceType\":\"mxqhndvnoamldse\"}],\"localized\":{\"g\":[{\"templateData\":\"datajhhflzokxcoxpel\",\"galleries\":[{}]},{\"templateData\":\"dataagltsxoa\",\"galleries\":[{},{}]}],\"aykggnoxu\":[{\"templateData\":\"datapbswvefloccsrm\",\"galleries\":[{},{},{},{}]},{\"templateData\":\"datam\",\"galleries\":[{}]},{\"templateData\":\"datawtxxpkyjcx\",\"galleries\":[{},{}]},{\"templateData\":\"datarytfmpcycil\",\"galleries\":[{},{},{}]}],\"fnznth\":[{\"templateData\":\"dataksxwpnd\",\"galleries\":[{},{},{}]}]}},\"location\":\"twk\",\"tags\":{\"tcqiosmg\":\"srxuzvoam\",\"xqdlyrtltlapr\":\"zah\",\"atbhjmznn\":\"tz\"},\"id\":\"s\",\"name\":\"qeqala\",\"type\":\"vlagun\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.workbookTemplates().listByResourceGroup("xs", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("twk", response.iterator().next().location()); - Assertions.assertEquals("srxuzvoam", response.iterator().next().tags().get("tcqiosmg")); - Assertions.assertEquals(835008707, response.iterator().next().priority()); - Assertions.assertEquals("jgicgaao", response.iterator().next().author()); - Assertions.assertEquals("mxswvruunzz", response.iterator().next().galleries().get(0).name()); - Assertions.assertEquals("ehkfkimrtixok", response.iterator().next().galleries().get(0).category()); - Assertions.assertEquals("qyinl", response.iterator().next().galleries().get(0).type()); - Assertions.assertEquals(980930736, response.iterator().next().galleries().get(0).order()); - Assertions.assertEquals("qwhix", response.iterator().next().galleries().get(0).resourceType()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListResultTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListResultTests.java index 4dd7169ac619..38b9dda266c4 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListResultTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListResultTests.java @@ -1,111 +1,28 @@ // 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.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplatesListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.applicationinsights.implementation.models.WorkbookTemplatesListResult; import org.junit.jupiter.api.Assertions; public final class WorkbookTemplatesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbookTemplatesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"priority\":1149857481,\"author\":\"by\",\"templateData\":\"dataczfc\",\"galleries\":[{\"name\":\"axdbabph\",\"category\":\"rqlfktsthsucocmn\",\"type\":\"azt\",\"order\":1372436938,\"resourceType\":\"wrqpue\"},{\"name\":\"kzywbiex\",\"category\":\"eyueaxibxujwb\",\"type\":\"walm\",\"order\":978941807,\"resourceType\":\"xaepdkzjancuxr\"},{\"name\":\"wbavxbniwdj\",\"category\":\"zt\",\"type\":\"bpg\",\"order\":1127167490,\"resourceType\":\"x\"}],\"localized\":{\"bzpfzab\":[{},{}],\"cuh\":[{},{},{},{}],\"tcty\":[{},{}]}},\"location\":\"iklbbovpl\",\"tags\":{\"ss\":\"hvgyuguosvmk\",\"gmgsxnkjzkde\":\"qukkfp\"},\"id\":\"lpvlopw\",\"name\":\"yighxpk\",\"type\":\"wzbaiue\"},{\"properties\":{\"priority\":1370468424,\"author\":\"nyqupedeojnabck\",\"templateData\":\"datasmtxpsieb\",\"galleries\":[{\"name\":\"vpesapskrdqmhjjd\",\"category\":\"ldwkyzxuutkn\",\"type\":\"scwsv\",\"order\":650590587,\"resourceType\":\"ogtwrupqsxvnmi\"},{\"name\":\"kvceoveilovnotyf\",\"category\":\"cnjbkcnxdhbt\",\"type\":\"phywpnvj\",\"order\":1633235296,\"resourceType\":\"ermclfplphoxuscr\"},{\"name\":\"bgyepsbj\",\"category\":\"zq\",\"type\":\"xywpmueefjzwfqkq\",\"order\":640895390,\"resourceType\":\"suyonobglaocq\"}],\"localized\":{\"mgyudxytlmoyrxv\":[{},{}]}},\"location\":\"fudwpznt\",\"tags\":{\"ck\":\"zhlrqjb\",\"kyv\":\"rlhrxs\"},\"id\":\"ycanuzbpzkafku\",\"name\":\"b\",\"type\":\"rnwb\"}]}") + "{\"value\":[{\"properties\":{\"priority\":172493216,\"author\":\"uvwbhsqfs\",\"templateData\":\"\\\"databcgjbirxbp\\\"\",\"galleries\":[{\"name\":\"rfbjf\",\"category\":\"w\",\"type\":\"otftpvjzbexilz\",\"order\":1551412306,\"resourceType\":\"q\"},{\"name\":\"wpmqt\",\"category\":\"uoujmkcjhwqy\",\"type\":\"r\",\"order\":151199466,\"resourceType\":\"jewgdrjerv\"}],\"localized\":{\"qp\":[{},{}]}},\"location\":\"indoygmifthnzd\",\"tags\":{\"nayqi\":\"l\"},\"id\":\"ynduha\",\"name\":\"hqlkthumaqo\",\"type\":\"bgycduiertgccym\"},{\"properties\":{\"priority\":6018093,\"author\":\"ssl\",\"templateData\":\"\\\"datalfmmdnbbglzpswi\\\"\",\"galleries\":[{\"name\":\"cwyhzdxssa\",\"category\":\"zmnvdfznudaod\",\"type\":\"zbn\",\"order\":2109510262,\"resourceType\":\"lpstdbhhxsrzdz\"}],\"localized\":{\"scdntnevf\":[{}],\"jmygtdsslswtmwer\":[{}],\"fzp\":[{}]}},\"location\":\"semwabnet\",\"tags\":{\"wubmwmbesldn\":\"szhedplvw\",\"lcxog\":\"wwtppj\",\"qqkdltfzxmhhvhgu\":\"okonzmnsikvmkqz\",\"xtibqdxbxwakbog\":\"eodkwobda\"},\"id\":\"xndlkzgxhu\",\"name\":\"iplbpodxunkbebxm\",\"type\":\"byyntwlrbqt\"},{\"properties\":{\"priority\":2129384029,\"author\":\"seotgqrllt\",\"templateData\":\"\\\"datau\\\"\",\"galleries\":[{\"name\":\"uwz\",\"category\":\"xbmp\",\"type\":\"jefuzmuvpbttdumo\",\"order\":75934567,\"resourceType\":\"ebmnzbtbhjpglk\"},{\"name\":\"ohdneuel\",\"category\":\"hsd\",\"type\":\"t\",\"order\":223656030,\"resourceType\":\"kd\"},{\"name\":\"wq\",\"category\":\"v\",\"type\":\"xclvit\",\"order\":1505312683,\"resourceType\":\"o\"},{\"name\":\"sg\",\"category\":\"hcohfwdsjnk\",\"type\":\"jutiiswacff\",\"order\":264036091,\"resourceType\":\"zewk\"}],\"localized\":{\"crailvpn\":[{},{},{},{}],\"fuflrwdmhdlx\":[{},{}],\"rxsagafcnihgwqa\":[{}]}},\"location\":\"edgfbcvkcvq\",\"tags\":{\"rhvoods\":\"eqdcv\",\"opcjwvnhd\":\"tbobz\",\"mgxcxrslpm\":\"d\",\"qsluicp\":\"twuoegrpkhjwni\"},\"id\":\"ggkzzlvmbmpa\",\"name\":\"modfvuefywsbpfvm\",\"type\":\"yhrfouyftaakcpw\"}],\"nextLink\":\"zvqtmnubexkp\"}") .toObject(WorkbookTemplatesListResult.class); - Assertions.assertEquals("iklbbovpl", model.value().get(0).location()); - Assertions.assertEquals("hvgyuguosvmk", model.value().get(0).tags().get("ss")); - Assertions.assertEquals(1149857481, model.value().get(0).priority()); - Assertions.assertEquals("by", model.value().get(0).author()); - Assertions.assertEquals("axdbabph", model.value().get(0).galleries().get(0).name()); - Assertions.assertEquals("rqlfktsthsucocmn", model.value().get(0).galleries().get(0).category()); - Assertions.assertEquals("azt", model.value().get(0).galleries().get(0).type()); - Assertions.assertEquals(1372436938, model.value().get(0).galleries().get(0).order()); - Assertions.assertEquals("wrqpue", model.value().get(0).galleries().get(0).resourceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookTemplatesListResult model = new WorkbookTemplatesListResult().withValue(Arrays.asList( - new WorkbookTemplateInner().withLocation("iklbbovpl") - .withTags(mapOf("ss", "hvgyuguosvmk", "gmgsxnkjzkde", "qukkfp")) - .withPriority(1149857481) - .withAuthor("by") - .withTemplateData("dataczfc") - .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("axdbabph") - .withCategory("rqlfktsthsucocmn") - .withType("azt") - .withOrder(1372436938) - .withResourceType("wrqpue"), - new WorkbookTemplateGallery().withName("kzywbiex") - .withCategory("eyueaxibxujwb") - .withType("walm") - .withOrder(978941807) - .withResourceType("xaepdkzjancuxr"), - new WorkbookTemplateGallery().withName("wbavxbniwdj") - .withCategory("zt") - .withType("bpg") - .withOrder(1127167490) - .withResourceType("x"))) - .withLocalized(mapOf("bzpfzab", - Arrays.asList(new WorkbookTemplateLocalizedGallery(), new WorkbookTemplateLocalizedGallery()), - "cuh", - Arrays.asList(new WorkbookTemplateLocalizedGallery(), new WorkbookTemplateLocalizedGallery(), - new WorkbookTemplateLocalizedGallery(), new WorkbookTemplateLocalizedGallery()), - "tcty", - Arrays.asList(new WorkbookTemplateLocalizedGallery(), new WorkbookTemplateLocalizedGallery()))), - new WorkbookTemplateInner().withLocation("fudwpznt") - .withTags(mapOf("ck", "zhlrqjb", "kyv", "rlhrxs")) - .withPriority(1370468424) - .withAuthor("nyqupedeojnabck") - .withTemplateData("datasmtxpsieb") - .withGalleries(Arrays.asList( - new WorkbookTemplateGallery().withName("vpesapskrdqmhjjd") - .withCategory("ldwkyzxuutkn") - .withType("scwsv") - .withOrder(650590587) - .withResourceType("ogtwrupqsxvnmi"), - new WorkbookTemplateGallery().withName("kvceoveilovnotyf") - .withCategory("cnjbkcnxdhbt") - .withType("phywpnvj") - .withOrder(1633235296) - .withResourceType("ermclfplphoxuscr"), - new WorkbookTemplateGallery().withName("bgyepsbj") - .withCategory("zq") - .withType("xywpmueefjzwfqkq") - .withOrder(640895390) - .withResourceType("suyonobglaocq"))) - .withLocalized(mapOf("mgyudxytlmoyrxv", - Arrays.asList(new WorkbookTemplateLocalizedGallery(), new WorkbookTemplateLocalizedGallery()))))); - model = BinaryData.fromObject(model).toObject(WorkbookTemplatesListResult.class); - Assertions.assertEquals("iklbbovpl", model.value().get(0).location()); - Assertions.assertEquals("hvgyuguosvmk", model.value().get(0).tags().get("ss")); - Assertions.assertEquals(1149857481, model.value().get(0).priority()); - Assertions.assertEquals("by", model.value().get(0).author()); - Assertions.assertEquals("axdbabph", model.value().get(0).galleries().get(0).name()); - Assertions.assertEquals("rqlfktsthsucocmn", model.value().get(0).galleries().get(0).category()); - Assertions.assertEquals("azt", model.value().get(0).galleries().get(0).type()); - Assertions.assertEquals(1372436938, model.value().get(0).galleries().get(0).order()); - Assertions.assertEquals("wrqpue", model.value().get(0).galleries().get(0).resourceType()); - } - - // 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; + Assertions.assertEquals("indoygmifthnzd", model.value().get(0).location()); + Assertions.assertEquals("l", model.value().get(0).tags().get("nayqi")); + Assertions.assertEquals(172493216, model.value().get(0).priority()); + Assertions.assertEquals("uvwbhsqfs", model.value().get(0).author()); + Assertions.assertEquals("rfbjf", model.value().get(0).galleries().get(0).name()); + Assertions.assertEquals("w", model.value().get(0).galleries().get(0).category()); + Assertions.assertEquals("otftpvjzbexilz", model.value().get(0).galleries().get(0).type()); + Assertions.assertEquals(1551412306, model.value().get(0).galleries().get(0).order()); + Assertions.assertEquals("q", model.value().get(0).galleries().get(0).resourceType()); + Assertions.assertEquals("zvqtmnubexkp", model.nextLink()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookUpdateParametersTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookUpdateParametersTests.java index ea70363ddd0b..b8cb10b38fd8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookUpdateParametersTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookUpdateParametersTests.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.generated; @@ -16,37 +16,37 @@ public final class WorkbookUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbookUpdateParameters model = BinaryData.fromString( - "{\"kind\":\"shared\",\"tags\":{\"jivfxzsjabib\":\"ij\"},\"properties\":{\"displayName\":\"tawfsdjpvkvp\",\"serializedData\":\"xbkzbzkdvncj\",\"category\":\"udurgkakmokz\",\"tags\":[\"klff\"],\"description\":\"ouw\",\"revision\":\"gzrf\"}}") + "{\"kind\":\"shared\",\"tags\":{\"gmaajrm\":\"po\"},\"properties\":{\"displayName\":\"wzrlovmclwhij\",\"serializedData\":\"ejctbzaqsqsycb\",\"category\":\"fkgukdkexxppof\",\"tags\":[\"x\",\"fjpgddtocjjxhvp\",\"o\",\"exhd\"],\"description\":\"i\",\"revision\":\"eojnxqbzvddn\"}}") .toObject(WorkbookUpdateParameters.class); Assertions.assertEquals(WorkbookUpdateSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("ij", model.tags().get("jivfxzsjabib")); - Assertions.assertEquals("tawfsdjpvkvp", model.displayName()); - Assertions.assertEquals("xbkzbzkdvncj", model.serializedData()); - Assertions.assertEquals("udurgkakmokz", model.category()); - Assertions.assertEquals("klff", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("ouw", model.description()); - Assertions.assertEquals("gzrf", model.revision()); + Assertions.assertEquals("po", model.tags().get("gmaajrm")); + Assertions.assertEquals("wzrlovmclwhij", model.displayName()); + Assertions.assertEquals("ejctbzaqsqsycb", model.serializedData()); + Assertions.assertEquals("fkgukdkexxppof", model.category()); + Assertions.assertEquals("x", model.tagsPropertiesTags().get(0)); + Assertions.assertEquals("i", model.description()); + Assertions.assertEquals("eojnxqbzvddn", model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkbookUpdateParameters model = new WorkbookUpdateParameters().withKind(WorkbookUpdateSharedTypeKind.SHARED) - .withTags(mapOf("jivfxzsjabib", "ij")) - .withDisplayName("tawfsdjpvkvp") - .withSerializedData("xbkzbzkdvncj") - .withCategory("udurgkakmokz") - .withTagsPropertiesTags(Arrays.asList("klff")) - .withDescription("ouw") - .withRevision("gzrf"); + .withTags(mapOf("gmaajrm", "po")) + .withDisplayName("wzrlovmclwhij") + .withSerializedData("ejctbzaqsqsycb") + .withCategory("fkgukdkexxppof") + .withTagsPropertiesTags(Arrays.asList("x", "fjpgddtocjjxhvp", "o", "exhd")) + .withDescription("i") + .withRevision("eojnxqbzvddn"); model = BinaryData.fromObject(model).toObject(WorkbookUpdateParameters.class); Assertions.assertEquals(WorkbookUpdateSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("ij", model.tags().get("jivfxzsjabib")); - Assertions.assertEquals("tawfsdjpvkvp", model.displayName()); - Assertions.assertEquals("xbkzbzkdvncj", model.serializedData()); - Assertions.assertEquals("udurgkakmokz", model.category()); - Assertions.assertEquals("klff", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("ouw", model.description()); - Assertions.assertEquals("gzrf", model.revision()); + Assertions.assertEquals("po", model.tags().get("gmaajrm")); + Assertions.assertEquals("wzrlovmclwhij", model.displayName()); + Assertions.assertEquals("ejctbzaqsqsycb", model.serializedData()); + Assertions.assertEquals("fkgukdkexxppof", model.category()); + Assertions.assertEquals("x", model.tagsPropertiesTags().get(0)); + Assertions.assertEquals("i", model.description()); + Assertions.assertEquals("eojnxqbzvddn", model.revision()); } // Use "Map.of" if available diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksCreateOrUpdateWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 4e4a854c2e2b..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity; -import com.azure.resourcemanager.applicationinsights.models.Workbook; -import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity; -import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkbooksCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"updwv\",\"serializedData\":\"phcnzqtpj\",\"version\":\"qrhvthlaiwdcxsml\",\"timeModified\":\"2021-01-22T01:05:07Z\",\"category\":\"zdtxetlgyd\",\"tags\":[\"vlnnpx\",\"b\",\"fiqgeaar\",\"gjekglklby\"],\"userId\":\"idwcwvmzegjon\",\"sourceId\":\"jirwgdnqzbrfk\",\"storageUri\":\"zhzmtksjci\",\"description\":\"igsxcdgljplk\",\"revision\":\"acht\"},\"identity\":{\"principalId\":\"5420b6a0-b1a4-40a3-9a0f-660be42f4720\",\"tenantId\":\"6e5361f3-18d5-4cdc-9733-d17f968264f5\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"pfmdgycx\":{\"principalId\":\"51ceafc5-a288-46d2-94b8-28361e8ed140\",\"clientId\":\"26493be9-d5d4-4e21-81ff-a68a469a8c67\"},\"kwhqj\":{\"principalId\":\"ce046ff9-e6ff-4fe2-a76a-f1d3a7fc5dc3\",\"clientId\":\"48330939-ec9a-4611-acdf-1dba6c953ee5\"}}},\"kind\":\"shared\",\"etag\":\"urlpshh\",\"location\":\"vpedwqslsrh\",\"tags\":{\"imuvqejosovyrrl\":\"vwwskondcbr\",\"sinuqtljqobbpih\":\"a\"},\"id\":\"hcecybmrqbr\",\"name\":\"bbmpxdlvykfre\",\"type\":\"crse\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Workbook response = manager.workbooks() - .define("gfggcvkyylizrzbj") - .withRegion("chl") - .withExistingResourceGroup("uhplrvkmjcwmjv") - .withTags(mapOf("hmoz", "txd", "ns", "sgzv", "fpafolpymwamxq", "nj")) - .withIdentity(new WorkbookResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("rokcdxfzzzwyjaf", new UserAssignedIdentity()))) - .withKind(WorkbookSharedTypeKind.SHARED) - .withEtag("guyn") - .withDisplayName("fxsfuztlvtmv") - .withSerializedData("gbwidqlvh") - .withVersion("oveofizrvjfnmj") - .withCategory("wyzgiblkuj") - .withTagsPropertiesTags(Arrays.asList("fojuidjpuuyj", "c", "jikzoeovvtzej")) - .withSourceId("k") - .withStorageUri("qzolxrzvhqjw") - .withDescription("htgv") - .withSourceIdParameter("jchcsrlzknmzla") - .create(); - - Assertions.assertEquals("vpedwqslsrh", response.location()); - Assertions.assertEquals("vwwskondcbr", response.tags().get("imuvqejosovyrrl")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.kind()); - Assertions.assertEquals("urlpshh", response.etag()); - Assertions.assertEquals("updwv", response.displayName()); - Assertions.assertEquals("phcnzqtpj", response.serializedData()); - Assertions.assertEquals("qrhvthlaiwdcxsml", response.version()); - Assertions.assertEquals("zdtxetlgyd", response.category()); - Assertions.assertEquals("vlnnpx", response.tagsPropertiesTags().get(0)); - Assertions.assertEquals("jirwgdnqzbrfk", response.sourceId()); - Assertions.assertEquals("zhzmtksjci", response.storageUri()); - Assertions.assertEquals("igsxcdgljplk", response.description()); - } - - // 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; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteByResourceGroupWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index b6573a062611..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkbooksDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.workbooks().deleteByResourceGroupWithResponse("yuicdhzbdy", "wwgbdv", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 6b5b14258eb8..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.applicationinsights.models.Workbook; -import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkbooksGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"ywjxh\",\"serializedData\":\"dulontacn\",\"version\":\"w\",\"timeModified\":\"2021-05-26T23:48:10Z\",\"category\":\"tuevrh\",\"tags\":[\"yoogw\",\"hnsduugwbsreur\"],\"userId\":\"kfuarenlv\",\"sourceId\":\"tklnvnafvvkyfed\",\"storageUri\":\"jboslcqxypok\",\"description\":\"minqcym\",\"revision\":\"ngnbdxxew\"},\"identity\":{\"principalId\":\"ad4e7204-64e6-4648-9c14-082d8dc0277b\",\"tenantId\":\"c19391a2-d7ae-4427-bcb5-07cba6004bd6\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"aqdtvqecrqctmxxd\":{\"principalId\":\"2936ca4b-f7f4-4c4e-9302-66d85e964e6f\",\"clientId\":\"95e830b7-ebf0-49e9-8883-01c93b9abf91\"},\"mflhuytxzvtznapx\":{\"principalId\":\"e846e066-e560-4fbf-863f-29842c63abd0\",\"clientId\":\"8a7aec75-128c-41b1-9b31-d2e611958345\"}}},\"kind\":\"shared\",\"etag\":\"o\",\"location\":\"voxczytpr\",\"tags\":{\"rrrouuxvnsa\":\"vroevytlyo\",\"lobdxna\":\"bcrymodizrx\",\"op\":\"pmkmlmvevfx\",\"hrdd\":\"hbzxli\"},\"id\":\"tfgxqbawpcb\",\"name\":\"nzqcy\",\"type\":\"napqo\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Workbook response = manager.workbooks() - .getByResourceGroupWithResponse("ro", "xddbhfhpfpaz", false, com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("voxczytpr", response.location()); - Assertions.assertEquals("vroevytlyo", response.tags().get("rrrouuxvnsa")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.kind()); - Assertions.assertEquals("o", response.etag()); - Assertions.assertEquals("ywjxh", response.displayName()); - Assertions.assertEquals("dulontacn", response.serializedData()); - Assertions.assertEquals("w", response.version()); - Assertions.assertEquals("tuevrh", response.category()); - Assertions.assertEquals("yoogw", response.tagsPropertiesTags().get(0)); - Assertions.assertEquals("tklnvnafvvkyfed", response.sourceId()); - Assertions.assertEquals("jboslcqxypok", response.storageUri()); - Assertions.assertEquals("minqcym", response.description()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupMockTests.java deleted file mode 100644 index b53123c0edaf..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupMockTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.applicationinsights.models.Workbook; -import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkbooksListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"jtkbusqogsfika\",\"serializedData\":\"ians\",\"version\":\"rujtjiqxfzyjq\",\"timeModified\":\"2021-03-02T08:22:49Z\",\"category\":\"wkpqhjpenuygbq\",\"tags\":[\"ekewvnqvcdlguauc\",\"f\",\"jwnlax\"],\"userId\":\"njqikcz\",\"sourceId\":\"itacgxmfcsserx\",\"storageUri\":\"vs\",\"description\":\"hlwntsjgq\",\"revision\":\"xypruuuy\"},\"identity\":{\"principalId\":\"749a0e50-8342-4e86-ba67-e486b5fba43c\",\"tenantId\":\"f7b81241-a42a-44e8-bb8c-44ae5d1edeb0\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"yuel\":{\"principalId\":\"1e51a447-d8b0-426f-bd6c-a1a9bfca6656\",\"clientId\":\"8f7ce043-05bd-4879-9da4-2f567d2fdbc0\"},\"ndnbfqy\":{\"principalId\":\"347685c1-cfef-4a51-8350-5adf69a923d8\",\"clientId\":\"85750f12-72b2-4671-a27c-48dfca061678\"},\"g\":{\"principalId\":\"18c0426d-dad8-4661-8822-d998f2f1095d\",\"clientId\":\"2a908a3e-c553-4d0d-a247-f047ffb57fa9\"},\"lgmtrwahzjmucf\":{\"principalId\":\"7d6abbeb-9edf-4fb8-a9ba-22cba46317ef\",\"clientId\":\"3604a5aa-ed52-4af8-b4d3-67f715947eb6\"}}},\"kind\":\"shared\",\"etag\":\"plrohkpigq\",\"location\":\"usuckzmkwklsno\",\"tags\":{\"lhhjnh\":\"mqeq\",\"yynfsvkhgbv\":\"wy\"},\"id\":\"ta\",\"name\":\"arfdlpukhpyrnei\",\"type\":\"jcpeogkhnmg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.workbooks() - .listByResourceGroup("djk", CategoryType.RETENTION, Arrays.asList("ysidfvclgl"), "n", false, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("usuckzmkwklsno", response.iterator().next().location()); - Assertions.assertEquals("mqeq", response.iterator().next().tags().get("lhhjnh")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.iterator().next().kind()); - Assertions.assertEquals("plrohkpigq", response.iterator().next().etag()); - Assertions.assertEquals("jtkbusqogsfika", response.iterator().next().displayName()); - Assertions.assertEquals("ians", response.iterator().next().serializedData()); - Assertions.assertEquals("rujtjiqxfzyjq", response.iterator().next().version()); - Assertions.assertEquals("wkpqhjpenuygbq", response.iterator().next().category()); - Assertions.assertEquals("ekewvnqvcdlguauc", response.iterator().next().tagsPropertiesTags().get(0)); - Assertions.assertEquals("itacgxmfcsserx", response.iterator().next().sourceId()); - Assertions.assertEquals("vs", response.iterator().next().storageUri()); - Assertions.assertEquals("hlwntsjgq", response.iterator().next().description()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListMockTests.java deleted file mode 100644 index dce21279d9a6..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.applicationinsights.models.Workbook; -import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkbooksListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"jxtxrdc\",\"serializedData\":\"tjvidt\",\"version\":\"epu\",\"timeModified\":\"2021-12-03T10:50:59Z\",\"category\":\"yjtcvuwk\",\"tags\":[\"zies\",\"uughtuqfecjxeyg\",\"uhxu\",\"cbuewmrswnjlxuz\"],\"userId\":\"wpusxjbaqehg\",\"sourceId\":\"ohzjqatucoigeb\",\"storageUri\":\"cnwfepbnwgfmxjg\",\"description\":\"bjb\",\"revision\":\"lfgtdysnaquflqbc\"},\"identity\":{\"principalId\":\"d353c0f3-f613-4cf0-9acb-e7de16316fa9\",\"tenantId\":\"f21f4a78-a22a-4134-b0f7-ee97aaee1923\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"kqzeqyjleziunjx\":{\"principalId\":\"099c8d1a-fcc8-4386-a945-9df5bc57e423\",\"clientId\":\"44c0eda2-0352-4d6d-9b12-c670eed3d8ee\"}}},\"kind\":\"shared\",\"etag\":\"ntkwcegy\",\"location\":\"mlbnseq\",\"tags\":{\"m\":\"jvpilguooqja\",\"hrtdtpdelq\":\"itgueiookjbs\",\"vcjkgd\":\"cslmotoebnfxo\",\"vcopex\":\"razftxejwabmdujt\"},\"id\":\"m\",\"name\":\"urbuhhlkyqltq\",\"type\":\"rogtuwkf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.workbooks() - .list(CategoryType.PERFORMANCE, Arrays.asList("enlusfn"), true, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mlbnseq", response.iterator().next().location()); - Assertions.assertEquals("jvpilguooqja", response.iterator().next().tags().get("m")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.iterator().next().kind()); - Assertions.assertEquals("ntkwcegy", response.iterator().next().etag()); - Assertions.assertEquals("jxtxrdc", response.iterator().next().displayName()); - Assertions.assertEquals("tjvidt", response.iterator().next().serializedData()); - Assertions.assertEquals("epu", response.iterator().next().version()); - Assertions.assertEquals("yjtcvuwk", response.iterator().next().category()); - Assertions.assertEquals("zies", response.iterator().next().tagsPropertiesTags().get(0)); - Assertions.assertEquals("ohzjqatucoigeb", response.iterator().next().sourceId()); - Assertions.assertEquals("cnwfepbnwgfmxjg", response.iterator().next().storageUri()); - Assertions.assertEquals("bjb", response.iterator().next().description()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListResultTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListResultTests.java index e127b4c1a1b9..30ac30e24111 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListResultTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListResultTests.java @@ -1,26 +1,19 @@ // 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.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WorkbooksListResult; +import com.azure.resourcemanager.applicationinsights.implementation.models.WorkbooksListResult; import org.junit.jupiter.api.Assertions; public final class WorkbooksListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkbooksListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"xg\",\"serializedData\":\"qagvrvm\",\"version\":\"k\",\"timeModified\":\"2021-11-21T22:35:24Z\",\"category\":\"himdbl\",\"tags\":[\"imfnjhfjx\"],\"userId\":\"szkkfoqre\",\"sourceId\":\"kzikfjawneaivxwc\",\"storageUri\":\"lpcirelsf\",\"description\":\"enwabfatk\",\"revision\":\"dxbjhwuaanozj\"},\"identity\":{\"principalId\":\"e24eadb2-f0de-41db-8521-8875c41e87f5\",\"tenantId\":\"cc76053a-5f5a-4453-a846-99c932b9a6d3\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"rvxaglrvimjwosy\":{\"principalId\":\"4fd27780-eeb0-4705-b659-81f015da191c\",\"clientId\":\"80536d96-559c-4b79-a1dd-adb0c12c0dc1\"}}},\"kind\":\"shared\",\"etag\":\"cskfcktqumiekk\",\"location\":\"zzikhlyfjhdg\",\"tags\":{\"eqidbqfatpx\":\"ebdunyg\",\"cyjmoadsuvarmy\":\"lr\",\"hhyxxrw\":\"dmjsjqb\"},\"id\":\"yc\",\"name\":\"duhpk\",\"type\":\"kgymareqnajxqug\"},{\"properties\":{\"displayName\":\"ky\",\"serializedData\":\"ubeddg\",\"version\":\"ofwq\",\"timeModified\":\"2021-05-03T03:51:25Z\",\"category\":\"alkrmn\",\"tags\":[\"pxacqqudfn\",\"yxbaaabjyvayf\"],\"userId\":\"m\",\"sourceId\":\"rtuzqogs\",\"storageUri\":\"nevfdnw\",\"description\":\"mewzsyyc\",\"revision\":\"zsoibjudpfrxtr\"},\"identity\":{\"principalId\":\"46c14d90-34b7-4c6f-93cc-6cef27d46cf7\",\"tenantId\":\"f5032c27-ba01-41ba-84df-a03f2d049ac1\",\"type\":\"None\",\"userAssignedIdentities\":{\"qbrqubpaxhexiili\":{\"principalId\":\"c1399ab0-0c9a-45c8-8486-7ceb0a8f0f9d\",\"clientId\":\"9f3438ab-c2f6-4aa9-9711-06190befa9f1\"},\"tiirqtdqoa\":{\"principalId\":\"07677274-1671-4159-941b-559ca28ce77b\",\"clientId\":\"8bcfc51e-6013-43cb-8e49-b37928a4d20a\"}}},\"kind\":\"shared\",\"etag\":\"zfgs\",\"location\":\"uyfxrxxleptramxj\",\"tags\":{\"tdooaoj\":\"lwnwxuqlcvydyp\",\"nuj\":\"niodkooeb\",\"odtji\":\"emmsbvdkc\"},\"id\":\"fw\",\"name\":\"lfltka\",\"type\":\"jvefkdlfoakggkfp\"},{\"properties\":{\"displayName\":\"ao\",\"serializedData\":\"pulpqblylsyxk\",\"version\":\"nsj\",\"timeModified\":\"2021-01-29T11:24:17Z\",\"category\":\"tiagx\",\"tags\":[\"zuempsbzkf\"],\"userId\":\"eyvpnqicvinvkj\",\"sourceId\":\"dxrbuukzcle\",\"storageUri\":\"hmlwpaztzpo\",\"description\":\"cckwyfzqwhxxbu\",\"revision\":\"a\"},\"identity\":{\"principalId\":\"9d09d0d3-7921-4f9e-9a25-bb89aa70dc60\",\"tenantId\":\"85a196f1-3b6c-4104-97fe-e37cc8fe442d\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"iolxor\":{\"principalId\":\"36644ca3-1b33-4359-b298-1ff59eb0261d\",\"clientId\":\"94cdaa27-19f6-4ac9-81be-8bf3cb62e755\"},\"tolmncwsobqw\":{\"principalId\":\"763700aa-7cc1-4374-9057-53d6f059c3d8\",\"clientId\":\"7c268c96-4a58-4d7f-8a2d-d08fbb3fac9f\"}}},\"kind\":\"shared\",\"etag\":\"nwdcfhu\",\"location\":\"qdpfuvglsbjjca\",\"tags\":{\"xqtvcofu\":\"bvtvudutncormr\",\"vkg\":\"f\"},\"id\":\"u\",\"name\":\"gdknnqv\",\"type\":\"aznqntoru\"}],\"nextLink\":\"gsahmkycgrauw\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"z\",\"serializedData\":\"yvvtpgvdfgio\",\"version\":\"ftutqxlngxlefgu\",\"timeModified\":\"2021-08-13T22:30:49Z\",\"category\":\"krxd\",\"tags\":[\"dt\"],\"userId\":\"zrvqdr\",\"sourceId\":\"hjybigehoqfbo\",\"storageUri\":\"kanyktzlcuiywg\",\"description\":\"wgndrvynhzgpp\",\"revision\":\"cgyncocpecf\"},\"identity\":{\"principalId\":\"coofsxlzev\",\"tenantId\":\"m\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"wnfnbacf\":{\"principalId\":\"c\",\"clientId\":\"mivkwlzuvcc\"},\"feallnwsu\":{\"principalId\":\"nlebxetqgtzxd\",\"clientId\":\"qbqqwxr\"},\"ooch\":{\"principalId\":\"snjampmng\",\"clientId\":\"scxaq\"}}},\"kind\":\"shared\",\"etag\":\"qvpkvlrxnjeaseip\",\"location\":\"oflokey\",\"tags\":{\"dlwtgrhpdj\":\"nj\",\"zj\":\"jumasx\",\"alhbx\":\"qyeg\"},\"id\":\"hejjz\",\"name\":\"v\",\"type\":\"udgwdslfho\"},{\"properties\":{\"displayName\":\"mcy\",\"serializedData\":\"pwlbjnpg\",\"version\":\"ftadehxnltyfs\",\"timeModified\":\"2021-10-02T19:16:03Z\",\"category\":\"usue\",\"tags\":[\"wd\",\"jbavorxzdm\",\"hctbqvudwxdn\"],\"userId\":\"vo\",\"sourceId\":\"ujjugwdkcglh\",\"storageUri\":\"azjdyggd\",\"description\":\"ixhbkuofqweykhm\",\"revision\":\"evfyexfwhybcib\"},\"identity\":{\"principalId\":\"dcsi\",\"tenantId\":\"nnaamdectehfiqsc\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"yvxyqjp\":{\"principalId\":\"hezrkgq\",\"clientId\":\"jrefovgmkqsle\"},\"canoaeupf\":{\"principalId\":\"attpngjcrcczsq\",\"clientId\":\"hvmdajvnysounq\"}}},\"kind\":\"shared\",\"etag\":\"trpmo\",\"location\":\"mcmatuokthfuiu\",\"tags\":{\"zydagfuaxbezyiuo\":\"sfcpkvxodpuozm\",\"dxwzywqsmbsurexi\":\"ktwh\",\"yocf\":\"o\",\"uxh\":\"fksymddystki\"},\"id\":\"yudxorrqnbp\",\"name\":\"czvyifq\",\"type\":\"vkd\"},{\"properties\":{\"displayName\":\"sllr\",\"serializedData\":\"vvdfwatkpnpul\",\"version\":\"xbczwtruwiqz\",\"timeModified\":\"2020-12-29T03:11:36Z\",\"category\":\"vsovmyokac\",\"tags\":[\"w\",\"hzdobpxjmflbvvnc\"],\"userId\":\"kcciwwzjuqkhr\",\"sourceId\":\"jiwkuofoskghsau\",\"storageUri\":\"mjmvxieduugidyjr\",\"description\":\"byao\",\"revision\":\"e\"},\"identity\":{\"principalId\":\"onpc\",\"tenantId\":\"ocohslkevleg\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"vmezy\":{\"principalId\":\"hfmvfaxkffe\",\"clientId\":\"th\"},\"oenkouknvudwti\":{\"principalId\":\"hxmzsbbzoggig\",\"clientId\":\"wburvjxxjnspydpt\"},\"npiucgygevqznty\":{\"principalId\":\"bldngkpoc\",\"clientId\":\"azyxoegukg\"},\"jzicwifsjt\":{\"principalId\":\"rbpizc\",\"clientId\":\"qjsdpydnfyhxdeo\"}}},\"kind\":\"shared\",\"etag\":\"bishcbkhajdeyea\",\"location\":\"p\",\"tags\":{\"wkgshwa\":\"alpbuxwgipwhon\"},\"id\":\"kix\",\"name\":\"bin\",\"type\":\"eputtmrywnuzoqf\"},{\"properties\":{\"displayName\":\"yqzrnkcqvyxlw\",\"serializedData\":\"zlsico\",\"version\":\"qqn\",\"timeModified\":\"2021-08-05T01:30:43Z\",\"category\":\"ryavwhheunmmqh\",\"tags\":[\"zko\"],\"userId\":\"cukoklyaxuconu\",\"sourceId\":\"zf\",\"storageUri\":\"eyp\",\"description\":\"rmjmwvvjektc\",\"revision\":\"enhwlrs\"},\"identity\":{\"principalId\":\"zpwv\",\"tenantId\":\"dqgbiqylihkaetc\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"rjcxerfuwu\":{\"principalId\":\"ivfsnk\",\"clientId\":\"uctqhjfbe\"},\"vuujq\":{\"principalId\":\"txfvjrbirph\",\"clientId\":\"pcyvahfnljkyqx\"},\"gsncghkjeszz\":{\"principalId\":\"dokgjl\",\"clientId\":\"oxgvclt\"}}},\"kind\":\"shared\",\"etag\":\"htxfvgxbfsmxnehm\",\"location\":\"ec\",\"tags\":{\"flz\":\"debfqkkrbmpukgri\",\"qzahmgkbrp\":\"fbxzpuzycisp\",\"hibnuqqkpika\":\"y\",\"buynhijggm\":\"rgvtqag\"},\"id\":\"bfs\",\"name\":\"arbu\",\"type\":\"rcvpnazzmhjrunmp\"}],\"nextLink\":\"tdbhrbnla\"}") .toObject(WorkbooksListResult.class); - Assertions.assertEquals("gsahmkycgrauw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbooksListResult model = new WorkbooksListResult().withNextLink("gsahmkycgrauw"); - model = BinaryData.fromObject(model).toObject(WorkbooksListResult.class); - Assertions.assertEquals("gsahmkycgrauw", model.nextLink()); + Assertions.assertEquals("tdbhrbnla", model.nextLink()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetWithResponseMockTests.java deleted file mode 100644 index 324f1ac78205..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetWithResponseMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.applicationinsights.models.Workbook; -import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkbooksRevisionGetWithResponseMockTests { - @Test - public void testRevisionGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"w\",\"serializedData\":\"sydsxwefohe\",\"version\":\"vopwndyqleallk\",\"timeModified\":\"2021-10-09T13:48:10Z\",\"category\":\"khlowkxxpv\",\"tags\":[\"fjmzsyzfho\",\"lhikcyychunsj\",\"pjrtws\",\"hv\"],\"userId\":\"icphvtrrmhw\",\"sourceId\":\"fdpyflubh\",\"storageUri\":\"glrocuy\",\"description\":\"whhmemhooc\",\"revision\":\"tnpqmemczjk\"},\"identity\":{\"principalId\":\"fd649e2c-ed47-4f19-ad77-bec2f4570ae7\",\"tenantId\":\"9b620f9a-3527-40b2-a7c0-c65f965d3ae2\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"lhsrrry\":{\"principalId\":\"ca812142-37d6-470f-bb15-630954b9a9c2\",\"clientId\":\"4bdc2101-776e-4e98-8177-ffc6c242dde6\"},\"lmbkzu\":{\"principalId\":\"d7a3d2c7-9951-41a6-99c6-46c01d4a8fe7\",\"clientId\":\"5f0c6387-9659-432e-bdb0-ffa816c850ea\"}}},\"kind\":\"shared\",\"etag\":\"rfih\",\"location\":\"tjewlpxuzzj\",\"tags\":{\"iwfbrkwpzdqtvhcs\":\"efqyhqotoihiqaky\",\"ietgbebjfu\":\"odaqaxsi\"},\"id\":\"bmoichd\",\"name\":\"pnfpubntnbat\",\"type\":\"viqsowsaaelcattc\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Workbook response = manager.workbooks() - .revisionGetWithResponse("d", "saoafcluqvox", "ycjimryvwgcwwpbm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tjewlpxuzzj", response.location()); - Assertions.assertEquals("efqyhqotoihiqaky", response.tags().get("iwfbrkwpzdqtvhcs")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.kind()); - Assertions.assertEquals("rfih", response.etag()); - Assertions.assertEquals("w", response.displayName()); - Assertions.assertEquals("sydsxwefohe", response.serializedData()); - Assertions.assertEquals("vopwndyqleallk", response.version()); - Assertions.assertEquals("khlowkxxpv", response.category()); - Assertions.assertEquals("fjmzsyzfho", response.tagsPropertiesTags().get(0)); - Assertions.assertEquals("fdpyflubh", response.sourceId()); - Assertions.assertEquals("glrocuy", response.storageUri()); - Assertions.assertEquals("whhmemhooc", response.description()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListMockTests.java deleted file mode 100644 index f9f727bddd51..000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.applicationinsights.models.Workbook; -import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkbooksRevisionsListMockTests { - @Test - public void testRevisionsList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"ck\",\"serializedData\":\"crrvweyo\",\"version\":\"yyukphaimmo\",\"timeModified\":\"2021-05-07T05:38:47Z\",\"category\":\"qboshbra\",\"tags\":[\"yyrmfsvbp\",\"vbopfppdbwnu\"],\"userId\":\"ahxku\",\"sourceId\":\"sjcaacfdmmcpugm\",\"storageUri\":\"qepvufhbzeh\",\"description\":\"hoqhnl\",\"revision\":\"nbldxeaclgschori\"},\"identity\":{\"principalId\":\"8196fa64-6240-44a6-934f-6dcd6d0d3549\",\"tenantId\":\"2bc9acb0-1e0f-422b-a93d-8ff5465f2646\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"s\":{\"principalId\":\"45706b23-e6aa-4d17-8464-206c8cf29cec\",\"clientId\":\"7a12fff2-b95f-4214-b0f7-05f20d4efa44\"}}},\"kind\":\"shared\",\"etag\":\"puviyfcaabe\",\"location\":\"lhbhl\",\"tags\":{\"sfar\":\"xuqibsxtkcudf\"},\"id\":\"siowlkjxnqpv\",\"name\":\"gf\",\"type\":\"tmhqykiz\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ApplicationInsightsManager manager = ApplicationInsightsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.workbooks().revisionsList("bid", "hmwffplfmuv", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lhbhl", response.iterator().next().location()); - Assertions.assertEquals("xuqibsxtkcudf", response.iterator().next().tags().get("sfar")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.iterator().next().kind()); - Assertions.assertEquals("puviyfcaabe", response.iterator().next().etag()); - Assertions.assertEquals("ck", response.iterator().next().displayName()); - Assertions.assertEquals("crrvweyo", response.iterator().next().serializedData()); - Assertions.assertEquals("yyukphaimmo", response.iterator().next().version()); - Assertions.assertEquals("qboshbra", response.iterator().next().category()); - Assertions.assertEquals("yyrmfsvbp", response.iterator().next().tagsPropertiesTags().get(0)); - Assertions.assertEquals("sjcaacfdmmcpugm", response.iterator().next().sourceId()); - Assertions.assertEquals("qepvufhbzeh", response.iterator().next().storageUri()); - Assertions.assertEquals("hoqhnl", response.iterator().next().description()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/tsp-location.yaml b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/tsp-location.yaml new file mode 100644 index 000000000000..cd148e3c03f5 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/applicationinsights/resource-manager/Microsoft.Insights/ApplicationInsights +commit: 61ef1085014acf8197d8b44e9dec699ef635a750 +repo: Azure/azure-rest-api-specs +additionalDirectories: