diff --git a/eng/mgmt/automation/generate_data.py b/eng/mgmt/automation/generate_data.py index 6cd86bc090b03..c1cbf52aeddb2 100755 --- a/eng/mgmt/automation/generate_data.py +++ b/eng/mgmt/automation/generate_data.py @@ -32,8 +32,8 @@ def sdk_automation_typespec(config: dict) -> List[dict]: if 'relatedTypeSpecProjectFolder' not in config: return packages - head_sha = config['headSha'] - repo_url = config['repoHttpsUrl'] + head_sha: str = config['headSha'] + repo_url: str = config['repoHttpsUrl'] tsp_projects = config['relatedTypeSpecProjectFolder'] if isinstance(tsp_projects, str): @@ -47,16 +47,40 @@ def sdk_automation_typespec(config: dict) -> List[dict]: service = None module = None try: - cmd = ['pwsh', './eng/common/scripts/TypeSpec-Project-Process.ps1', tsp_dir, head_sha, repo_url] - logging.info('Command line: ' + ' '.join(cmd)) - output = subprocess.check_output(cmd, cwd=sdk_root) - output_str = str(output, 'utf-8') - script_return = output_str.splitlines()[-1] # the path to sdk folder - sdk_folder = os.path.relpath(script_return, sdk_root) + def remove_prefix(text, prefix): + if text.startswith(prefix): + return text[len(prefix):] + return text + + def find_sdk_folder(): + cmd = ['git', 'add', '.'] + check_call(cmd, sdk_root) + + cmd = ['git', 'status', '--porcelain', '**/tsp-location.yaml'] + logging.info('Command line: ' + ' '.join(cmd)) + output = subprocess.check_output(cmd, cwd=sdk_root) + output_str = str(output, 'utf-8') + git_items = output_str.splitlines() + sdk_folder = None + if len(git_items) > 0: + tsp_location_item: str = git_items[0] + sdk_folder = tsp_location_item[1:].strip()[0:-len('/tsp-location.yaml')] + + cmd = ['git', 'reset', '.'] + check_call(cmd, sdk_root) + + return sdk_folder + + repo = remove_prefix(repo_url, 'https://github.com/') + cmd = ['npx', 'tsp-client', 'init', '--debug', '--tsp-config', tsp_dir, '--commit', head_sha, '--repo', repo] + check_call(cmd, sdk_root) + + sdk_folder = find_sdk_folder() logging.info('SDK folder: ' + sdk_folder) - succeeded = True + if sdk_folder: + succeeded = True except subprocess.CalledProcessError as error: - logging.error(f'TypeSpec-Project-Process.ps1 fail: {error}') + logging.error(f'tsp-client init fail: {error}') if succeeded: # check require_sdk_integration diff --git a/eng/mgmt/automation/init.sh b/eng/mgmt/automation/init.sh index 3723c60fb7d01..e44d3a3b6c679 100755 --- a/eng/mgmt/automation/init.sh +++ b/eng/mgmt/automation/init.sh @@ -10,6 +10,8 @@ export NVM_DIR="$HOME/.nvm" nvm install v18.15.0 nvm alias default node +npm install @azure-tools/typespec-client-generator-cli + cat << EOF > $2 {"envs": {"PATH": "$JAVA_HOME_11_X64/bin:$PATH", "JAVA_HOME": "$JAVA_HOME_11_X64"}} EOF diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md index 0a7ecc020c497..a09de809fd464 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-02-05) + +- 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-2023-10-01-only. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md index f46590771d9eb..f7186098c2588 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ApplicationInsights client library for Java. -This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2022-06-15-java. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2023-10-01-only. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-applicationinsights - 1.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md index 4269fdf31a0c2..d4d397cd4256e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md @@ -35,6 +35,13 @@ - [Get](#componentfeaturecapabilities_get) +## ComponentLinkedStorageAccountsOperation + +- [CreateAndUpdate](#componentlinkedstorageaccountsoperation_createandupdate) +- [Delete](#componentlinkedstorageaccountsoperation_delete) +- [Get](#componentlinkedstorageaccountsoperation_get) +- [Update](#componentlinkedstorageaccountsoperation_update) + ## ComponentQuotaStatus - [Get](#componentquotastatus_get) @@ -70,15 +77,6 @@ - [Get](#livetoken_get) -## MyWorkbooks - -- [CreateOrUpdate](#myworkbooks_createorupdate) -- [Delete](#myworkbooks_delete) -- [GetByResourceGroup](#myworkbooks_getbyresourcegroup) -- [List](#myworkbooks_list) -- [ListByResourceGroup](#myworkbooks_listbyresourcegroup) -- [Update](#myworkbooks_update) - ## ProactiveDetectionConfigurations - [Get](#proactivedetectionconfigurations_get) @@ -130,28 +128,22 @@ ```java import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; +import java.util.stream.Collectors; -/** Samples for AnalyticsItems Delete. */ +/** + * Samples for AnalyticsItems Delete. + */ public final class AnalyticsItemsDeleteSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemDelete.json */ /** * Sample code: AnalyticsItemDelete. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void analyticsItemDelete( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .analyticsItems() - .deleteWithResponse( - "my-resource-group", - "my-component", - ItemScopePath.ANALYTICS_ITEMS, - "3466c160-4a10-4df8-afdf-0007f3f6dee5", - null, - com.azure.core.util.Context.NONE); + public static void analyticsItemDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.analyticsItems().deleteWithResponse("my-resource-group", "my-component", ItemScopePath.ANALYTICS_ITEMS, "3466c160-4a10-4df8-afdf-0007f3f6dee5", null, com.azure.core.util.Context.NONE); } } ``` @@ -160,28 +152,22 @@ public final class AnalyticsItemsDeleteSamples { ```java import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; +import java.util.stream.Collectors; -/** Samples for AnalyticsItems Get. */ +/** + * Samples for AnalyticsItems Get. + */ public final class AnalyticsItemsGetSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemGet.json */ /** * Sample code: AnalyticsItemGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void analyticsItemGet( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .analyticsItems() - .getWithResponse( - "my-resource-group", - "my-component", - ItemScopePath.ANALYTICS_ITEMS, - "3466c160-4a10-4df8-afdf-0007f3f6dee5", - null, - com.azure.core.util.Context.NONE); + public static void analyticsItemGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.analyticsItems().getWithResponse("my-resource-group", "my-component", ItemScopePath.ANALYTICS_ITEMS, "3466c160-4a10-4df8-afdf-0007f3f6dee5", null, com.azure.core.util.Context.NONE); } } ``` @@ -189,30 +175,25 @@ public final class AnalyticsItemsGetSamples { ### AnalyticsItems_List ```java +import com.azure.resourcemanager.applicationinsights.models.ItemScope; import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; +import com.azure.resourcemanager.applicationinsights.models.ItemTypeParameter; +import java.util.stream.Collectors; -/** Samples for AnalyticsItems List. */ +/** + * Samples for AnalyticsItems List. + */ public final class AnalyticsItemsListSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemList.json */ /** * Sample code: AnalyticsItemList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void analyticsItemList( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .analyticsItems() - .listWithResponse( - "my-resource-group", - "my-component", - ItemScopePath.ANALYTICS_ITEMS, - null, - null, - null, - com.azure.core.util.Context.NONE); + public static void analyticsItemList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.analyticsItems().listWithResponse("my-resource-group", "my-component", ItemScopePath.ANALYTICS_ITEMS, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -224,45 +205,22 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationIn import com.azure.resourcemanager.applicationinsights.models.ItemScope; import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; import com.azure.resourcemanager.applicationinsights.models.ItemType; +import java.util.stream.Collectors; -/** Samples for AnalyticsItems Put. */ +/** + * Samples for AnalyticsItems Put. + */ public final class AnalyticsItemsPutSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemPut.json */ /** * Sample code: AnalyticsItemPut. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void analyticsItemPut( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .analyticsItems() - .putWithResponse( - "my-resource-group", - "my-component", - ItemScopePath.ANALYTICS_ITEMS, - new ApplicationInsightsComponentAnalyticsItemInner() - .withName("Exceptions - New in the last 24 hours") - .withContent( - "let newExceptionsTimeRange = 1d;\n" - + "let timeRangeToCheckBefore = 7d;\n" - + "exceptions\n" - + "| where timestamp < ago(timeRangeToCheckBefore)\n" - + "| summarize count() by problemId\n" - + "| join kind= rightanti (\n" - + "exceptions\n" - + "| where timestamp >= ago(newExceptionsTimeRange)\n" - + "| extend stack = tostring(details[0].rawStack)\n" - + "| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp)," - + " any(stack) by problemId \n" - + ") on problemId \n" - + "| order by count_ desc\n") - .withScope(ItemScope.SHARED) - .withType(ItemType.QUERY), - null, - com.azure.core.util.Context.NONE); + * + * @param manager Entry point to ApplicationInsightsManager. + */ + public static void analyticsItemPut(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.analyticsItems().putWithResponse("my-resource-group", "my-component", ItemScopePath.ANALYTICS_ITEMS, new ApplicationInsightsComponentAnalyticsItemInner().withName("Exceptions - New in the last 24 hours").withContent("let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n").withScope(ItemScope.SHARED).withType(ItemType.QUERY), null, com.azure.core.util.Context.NONE); } } ``` @@ -272,31 +230,22 @@ public final class AnalyticsItemsPutSamples { ```java import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; -/** Samples for Annotations Create. */ +/** + * Samples for Annotations Create. + */ public final class AnnotationsCreateSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsCreate.json */ /** * Sample code: AnnotationsCreate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void annotationsCreate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .annotations() - .createWithResponse( - "my-resource-group", - "my-component", - new AnnotationInner() - .withAnnotationName("TestAnnotation") - .withCategory("Text") - .withEventTime(OffsetDateTime.parse("2018-01-31T13:41:38.657Z")) - .withId("444e2c08-274a-4bbb-a89e-d77bb720f44a") - .withProperties("{\"Comments\":\"Testing\",\"Label\":\"Success\"}"), - com.azure.core.util.Context.NONE); + public static void annotationsCreate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.annotations().createWithResponse("my-resource-group", "my-component", new AnnotationInner().withAnnotationName("TestAnnotation").withCategory("Text").withEventTime(OffsetDateTime.parse("2018-01-31T13:41:38.657Z")).withId("444e2c08-274a-4bbb-a89e-d77bb720f44a").withProperties("{\"Comments\":\"Testing\",\"Label\":\"Success\"}"), com.azure.core.util.Context.NONE); } } ``` @@ -304,25 +253,20 @@ public final class AnnotationsCreateSamples { ### Annotations_Delete ```java -/** Samples for Annotations Delete. */ +/** + * Samples for Annotations Delete. + */ public final class AnnotationsDeleteSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsDelete.json */ /** * Sample code: AnnotationsDelete. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void annotationsDelete( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .annotations() - .deleteWithResponse( - "my-resource-group", - "my-component", - "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", - com.azure.core.util.Context.NONE); + public static void annotationsDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.annotations().deleteWithResponse("my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", com.azure.core.util.Context.NONE); } } ``` @@ -330,25 +274,20 @@ public final class AnnotationsDeleteSamples { ### Annotations_Get ```java -/** Samples for Annotations Get. */ +/** + * Samples for Annotations Get. + */ public final class AnnotationsGetSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsGet.json */ /** * Sample code: AnnotationsGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void annotationsGet( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .annotations() - .getWithResponse( - "my-resource-group", - "my-component", - "444e2c08-274a-4bbb-a89e-d77bb720f44a", - com.azure.core.util.Context.NONE); + public static void annotationsGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.annotations().getWithResponse("my-resource-group", "my-component", "444e2c08-274a-4bbb-a89e-d77bb720f44a", com.azure.core.util.Context.NONE); } } ``` @@ -356,26 +295,20 @@ public final class AnnotationsGetSamples { ### Annotations_List ```java -/** Samples for Annotations List. */ +/** + * Samples for Annotations List. + */ public final class AnnotationsListSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsList.json */ /** * Sample code: AnnotationsList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void annotationsList( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .annotations() - .list( - "my-resource-group", - "my-component", - "2018-02-05T00%3A30%3A00.000Z", - "2018-02-06T00%3A33A00.000Z", - com.azure.core.util.Context.NONE); + public static void annotationsList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.annotations().list("my-resource-group", "my-component", "2018-02-05T00%3A30%3A00.000Z", "2018-02-06T00%3A33A00.000Z", com.azure.core.util.Context.NONE); } } ``` @@ -386,34 +319,20 @@ public final class AnnotationsListSamples { import com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest; import java.util.Arrays; -/** Samples for ApiKeys Create. */ +/** + * Samples for ApiKeys Create. + */ public final class ApiKeysCreateSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysCreate.json */ /** * Sample code: APIKeyCreate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void aPIKeyCreate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .apiKeys() - .createWithResponse( - "my-resource-group", - "my-component", - new ApiKeyRequest() - .withName("test2") - .withLinkedReadProperties( - Arrays - .asList( - "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/api", - "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/agentconfig")) - .withLinkedWriteProperties( - Arrays - .asList( - "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/annotations")), - com.azure.core.util.Context.NONE); + manager.apiKeys().createWithResponse("my-resource-group", "my-component", new ApiKeyRequest().withName("test2").withLinkedReadProperties(Arrays.asList("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/api", "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/agentconfig")).withLinkedWriteProperties(Arrays.asList("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/annotations")), com.azure.core.util.Context.NONE); } } ``` @@ -421,24 +340,20 @@ public final class ApiKeysCreateSamples { ### ApiKeys_Delete ```java -/** Samples for ApiKeys Delete. */ +/** + * Samples for ApiKeys Delete. + */ public final class ApiKeysDeleteSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysDelete.json */ /** * Sample code: APIKeyDelete. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void aPIKeyDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .apiKeys() - .deleteWithResponse( - "my-resource-group", - "my-component", - "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", - com.azure.core.util.Context.NONE); + manager.apiKeys().deleteWithResponse("my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", com.azure.core.util.Context.NONE); } } ``` @@ -446,24 +361,20 @@ public final class ApiKeysDeleteSamples { ### ApiKeys_Get ```java -/** Samples for ApiKeys Get. */ +/** + * Samples for ApiKeys Get. + */ public final class ApiKeysGetSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysGet.json */ /** * Sample code: APIKeysGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void aPIKeysGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .apiKeys() - .getWithResponse( - "my-resource-group", - "my-component", - "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", - com.azure.core.util.Context.NONE); + manager.apiKeys().getWithResponse("my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", com.azure.core.util.Context.NONE); } } ``` @@ -471,14 +382,16 @@ public final class ApiKeysGetSamples { ### ApiKeys_List ```java -/** Samples for ApiKeys List. */ +/** + * Samples for ApiKeys List. + */ public final class ApiKeysListSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysList.json */ /** * Sample code: APIKeysList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void aPIKeysList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { @@ -490,21 +403,20 @@ public final class ApiKeysListSamples { ### ComponentAvailableFeatures_Get ```java -/** Samples for ComponentAvailableFeatures Get. */ +/** + * Samples for ComponentAvailableFeatures Get. + */ public final class ComponentAvailableFeaturesGetSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AvailableBillingFeaturesGet.json */ /** * Sample code: ComponentCurrentBillingFeaturesGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentCurrentBillingFeaturesGet( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .componentAvailableFeatures() - .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + public static void componentCurrentBillingFeaturesGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.componentAvailableFeatures().getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -512,21 +424,20 @@ public final class ComponentAvailableFeaturesGetSamples { ### ComponentCurrentBillingFeatures_Get ```java -/** Samples for ComponentCurrentBillingFeatures Get. */ +/** + * Samples for ComponentCurrentBillingFeatures Get. + */ public final class ComponentCurrentBillingFeaturesGetSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesGet.json */ /** * Sample code: ComponentCurrentBillingFeaturesGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentCurrentBillingFeaturesGet( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .componentCurrentBillingFeatures() - .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + public static void componentCurrentBillingFeaturesGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.componentCurrentBillingFeatures().getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -538,30 +449,20 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationIn import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap; import java.util.Arrays; -/** Samples for ComponentCurrentBillingFeatures Update. */ +/** + * Samples for ComponentCurrentBillingFeatures Update. + */ public final class ComponentCurrentBillingFeaturesUpdateSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesUpdate.json */ /** * Sample code: ComponentCurrentBillingFeaturesUpdate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentCurrentBillingFeaturesUpdate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .componentCurrentBillingFeatures() - .updateWithResponse( - "my-resource-group", - "my-component", - new ApplicationInsightsComponentBillingFeaturesInner() - .withDataVolumeCap( - new ApplicationInsightsComponentDataVolumeCap() - .withCap(100.0F) - .withStopSendNotificationWhenHitCap(true)) - .withCurrentBillingFeatures(Arrays.asList("Basic", "Application Insights Enterprise")), - com.azure.core.util.Context.NONE); + public static void componentCurrentBillingFeaturesUpdate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.componentCurrentBillingFeatures().updateWithResponse("my-resource-group", "my-component", new ApplicationInsightsComponentBillingFeaturesInner().withDataVolumeCap(new ApplicationInsightsComponentDataVolumeCap().withCap(100.0F).withStopSendNotificationWhenHitCap(true)).withCurrentBillingFeatures(Arrays.asList("Basic", "Application Insights Enterprise")), com.azure.core.util.Context.NONE); } } ``` @@ -569,21 +470,118 @@ public final class ComponentCurrentBillingFeaturesUpdateSamples { ### ComponentFeatureCapabilities_Get ```java -/** Samples for ComponentFeatureCapabilities Get. */ +/** + * Samples for ComponentFeatureCapabilities Get. + */ public final class ComponentFeatureCapabilitiesGetSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FeatureCapabilitiesGet.json */ /** * Sample code: ComponentCurrentBillingFeaturesGet. - * + * + * @param manager Entry point to ApplicationInsightsManager. + */ + public static void componentCurrentBillingFeaturesGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.componentFeatureCapabilities().getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + } +} +``` + +### ComponentLinkedStorageAccountsOperation_CreateAndUpdate + +```java +import com.azure.resourcemanager.applicationinsights.models.StorageType; +import java.util.stream.Collectors; + +/** + * 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; +import java.util.stream.Collectors; + +/** + * 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; +import java.util.stream.Collectors; + +/** + * 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 componentCurrentBillingFeaturesGet( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .componentFeatureCapabilities() - .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + 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; +import java.util.stream.Collectors; + +/** + * 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(); } } ``` @@ -591,21 +589,20 @@ public final class ComponentFeatureCapabilitiesGetSamples { ### ComponentQuotaStatus_Get ```java -/** Samples for ComponentQuotaStatus Get. */ +/** + * Samples for ComponentQuotaStatus Get. + */ public final class ComponentQuotaStatusGetSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/QuotaStatusGet.json */ /** * Sample code: ComponentCurrentBillingFeaturesGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentCurrentBillingFeaturesGet( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .componentQuotaStatus() - .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + public static void componentCurrentBillingFeaturesGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.componentQuotaStatus().getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -618,31 +615,22 @@ import com.azure.resourcemanager.applicationinsights.models.FlowType; import com.azure.resourcemanager.applicationinsights.models.RequestSource; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for Components CreateOrUpdate. */ +/** + * Samples for Components CreateOrUpdate. + */ public final class ComponentsCreateOrUpdateSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsCreate.json */ /** * Sample code: ComponentCreate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentCreate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .define("my-component") - .withRegion("South Central US") - .withExistingResourceGroup("my-resource-group") - .withKind("web") - .withApplicationType(ApplicationType.WEB) - .withFlowType(FlowType.BLUEFIELD) - .withRequestSource(RequestSource.REST) - .withWorkspaceResourceId( - "/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace") - .create(); + public static void componentCreate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.components().define("my-component").withRegion("South Central US").withExistingResourceGroup("my-resource-group").withKind("web").withApplicationType(ApplicationType.WEB).withFlowType(FlowType.BLUEFIELD).withRequestSource(RequestSource.REST).withWorkspaceResourceId("/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace").create(); } /* @@ -650,19 +638,11 @@ public final class ComponentsCreateOrUpdateSamples { */ /** * Sample code: ComponentUpdate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentUpdate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .define("my-component") - .withRegion("South Central US") - .withExistingResourceGroup("my-resource-group") - .withKind("web") - .withTags(mapOf("ApplicationGatewayType", "Internal-Only", "BillingEntity", "Self")) - .create(); + public static void componentUpdate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.components().define("my-component").withRegion("South Central US").withExistingResourceGroup("my-resource-group").withKind("web").withTags(mapOf("ApplicationGatewayType", "Internal-Only", "BillingEntity", "Self")).create(); } // Use "Map.of" if available @@ -682,21 +662,20 @@ public final class ComponentsCreateOrUpdateSamples { ### Components_Delete ```java -/** Samples for Components Delete. */ +/** + * Samples for Components Delete. + */ public final class ComponentsDeleteSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsDelete.json */ /** * Sample code: ComponentsDelete. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentsDelete( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .deleteByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + public static void componentsDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.components().deleteByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -704,20 +683,20 @@ public final class ComponentsDeleteSamples { ### Components_GetByResourceGroup ```java -/** Samples for Components GetByResourceGroup. */ +/** + * Samples for Components GetByResourceGroup. + */ public final class ComponentsGetByResourceGroupSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsGet.json */ /** * Sample code: ComponentGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void componentGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .getByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + manager.components().getByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -725,25 +704,20 @@ public final class ComponentsGetByResourceGroupSamples { ### Components_GetPurgeStatus ```java -/** Samples for Components GetPurgeStatus. */ +/** + * Samples for Components GetPurgeStatus. + */ public final class ComponentsGetPurgeStatusSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurgeStatus.json */ /** * Sample code: ComponentPurge. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentPurge( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .getPurgeStatusWithResponse( - "OIAutoRest5123", - "aztest5048", - "purge-970318e7-b859-4edb-8903-83b1b54d0b74", - com.azure.core.util.Context.NONE); + public static void componentPurge(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.components().getPurgeStatusWithResponse("OIAutoRest5123", "aztest5048", "purge-970318e7-b859-4edb-8903-83b1b54d0b74", com.azure.core.util.Context.NONE); } } ``` @@ -751,18 +725,19 @@ public final class ComponentsGetPurgeStatusSamples { ### Components_List ```java -/** Samples for Components List. */ +/** + * Samples for Components List. + */ public final class ComponentsListSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsList.json */ /** * Sample code: ComponentsList.json. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentsListJson( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + public static void componentsListJson(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.components().list(com.azure.core.util.Context.NONE); } } @@ -771,18 +746,19 @@ public final class ComponentsListSamples { ### Components_ListByResourceGroup ```java -/** Samples for Components ListByResourceGroup. */ +/** + * Samples for Components ListByResourceGroup. + */ public final class ComponentsListByResourceGroupSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsListByResourceGroup.json */ /** * Sample code: ComponentListByResourceGroup. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentListByResourceGroup( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + public static void componentListByResourceGroup(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.components().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } @@ -795,33 +771,20 @@ import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBody; import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBodyFilters; import java.util.Arrays; -/** Samples for Components Purge. */ +/** + * Samples for Components Purge. + */ public final class ComponentsPurgeSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurge.json */ /** * Sample code: ComponentPurge. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentPurge( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .purgeWithResponse( - "OIAutoRest5123", - "aztest5048", - new ComponentPurgeBody() - .withTable("Heartbeat") - .withFilters( - Arrays - .asList( - new ComponentPurgeBodyFilters() - .withColumn("TimeGenerated") - .withOperator(">") - .withValue("2017-09-01T00:00:00"))), - com.azure.core.util.Context.NONE); + public static void componentPurge(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.components().purgeWithResponse("OIAutoRest5123", "aztest5048", new ComponentPurgeBody().withTable("Heartbeat").withFilters(Arrays.asList(new ComponentPurgeBodyFilters().withColumn("TimeGenerated").withOperator(">").withValue("2017-09-01T00:00:00"))), com.azure.core.util.Context.NONE); } } ``` @@ -833,38 +796,21 @@ import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsC import java.util.HashMap; import java.util.Map; -/** Samples for Components UpdateTags. */ +/** + * Samples for Components UpdateTags. + */ public final class ComponentsUpdateTagsSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsUpdateTagsOnly.json */ /** * Sample code: ComponentUpdateTagsOnly. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void componentUpdateTagsOnly( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - ApplicationInsightsComponent resource = - manager - .components() - .getByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags( - mapOf( - "ApplicationGatewayType", - "Internal-Only", - "BillingEntity", - "Self", - "Color", - "AzureBlue", - "CustomField_01", - "Custom text in some random field named randomly", - "NodeType", - "Edge")) - .apply(); + * + * @param manager Entry point to ApplicationInsightsManager. + */ + public static void componentUpdateTagsOnly(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + ApplicationInsightsComponent resource = manager.components().getByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("ApplicationGatewayType", "Internal-Only", "BillingEntity", "Self", "Color", "AzureBlue", "CustomField_01", "Custom text in some random field named randomly", "NodeType", "Edge")).apply(); } // Use "Map.of" if available @@ -886,38 +832,20 @@ public final class ComponentsUpdateTagsSamples { ```java import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; -/** Samples for ExportConfigurations Create. */ +/** + * Samples for ExportConfigurations Create. + */ public final class ExportConfigurationsCreateSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsPost.json */ /** * Sample code: ExportConfigurationPost. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void exportConfigurationPost( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .exportConfigurations() - .createWithResponse( - "my-resource-group", - "my-component", - new ApplicationInsightsComponentExportRequest() - .withRecordTypes( - "Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd," - + " PerformanceCounters, Availability") - .withDestinationType("Blob") - .withDestinationAddress( - "https://mystorageblob.blob.core.windows.net/testexport?sv=2015-04-05&sr=c&sig=token") - .withIsEnabled("true") - .withNotificationQueueEnabled("false") - .withNotificationQueueUri("") - .withDestinationStorageSubscriptionId("subid") - .withDestinationStorageLocationId("eastus") - .withDestinationAccountId( - "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), - com.azure.core.util.Context.NONE); + * + * @param manager Entry point to ApplicationInsightsManager. + */ + public static void exportConfigurationPost(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.exportConfigurations().createWithResponse("my-resource-group", "my-component", new ApplicationInsightsComponentExportRequest().withRecordTypes("Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd, PerformanceCounters, Availability").withDestinationType("Blob").withDestinationAddress("https://mystorageblob.blob.core.windows.net/testexport?sv=2015-04-05&sr=c&sig=token").withIsEnabled("true").withNotificationQueueEnabled("false").withNotificationQueueUri("").withDestinationStorageSubscriptionId("subid").withDestinationStorageLocationId("eastus").withDestinationAccountId("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), com.azure.core.util.Context.NONE); } } ``` @@ -925,22 +853,20 @@ public final class ExportConfigurationsCreateSamples { ### ExportConfigurations_Delete ```java -/** Samples for ExportConfigurations Delete. */ +/** + * Samples for ExportConfigurations Delete. + */ public final class ExportConfigurationsDeleteSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationDelete.json */ /** * Sample code: ExportConfigurationDelete. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void exportConfigurationDelete( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .exportConfigurations() - .deleteWithResponse( - "my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); + public static void exportConfigurationDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.exportConfigurations().deleteWithResponse("my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); } } ``` @@ -948,22 +874,20 @@ public final class ExportConfigurationsDeleteSamples { ### ExportConfigurations_Get ```java -/** Samples for ExportConfigurations Get. */ +/** + * Samples for ExportConfigurations Get. + */ public final class ExportConfigurationsGetSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationGet.json */ /** * Sample code: ExportConfigurationGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void exportConfigurationGet( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .exportConfigurations() - .getWithResponse( - "my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); + public static void exportConfigurationGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.exportConfigurations().getWithResponse("my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); } } ``` @@ -971,21 +895,20 @@ public final class ExportConfigurationsGetSamples { ### ExportConfigurations_List ```java -/** Samples for ExportConfigurations List. */ +/** + * Samples for ExportConfigurations List. + */ public final class ExportConfigurationsListSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsList.json */ /** * Sample code: ExportConfigurationsList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void exportConfigurationsList( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .exportConfigurations() - .listWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + public static void exportConfigurationsList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.exportConfigurations().listWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -995,39 +918,20 @@ public final class ExportConfigurationsListSamples { ```java import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; -/** Samples for ExportConfigurations Update. */ +/** + * Samples for ExportConfigurations Update. + */ public final class ExportConfigurationsUpdateSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationUpdate.json */ /** * Sample code: ExportConfigurationUpdate. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void exportConfigurationUpdate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .exportConfigurations() - .updateWithResponse( - "my-resource-group", - "my-component", - "uGOoki0jQsyEs3IdQ83Q4QsNr4=", - new ApplicationInsightsComponentExportRequest() - .withRecordTypes( - "Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd," - + " PerformanceCounters, Availability") - .withDestinationType("Blob") - .withDestinationAddress( - "https://mystorageblob.blob.core.windows.net/fchentest?sv=2015-04-05&sr=c&sig=token") - .withIsEnabled("true") - .withNotificationQueueEnabled("false") - .withNotificationQueueUri("") - .withDestinationStorageSubscriptionId("subid") - .withDestinationStorageLocationId("eastus") - .withDestinationAccountId( - "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), - com.azure.core.util.Context.NONE); + * + * @param manager Entry point to ApplicationInsightsManager. + */ + public static void exportConfigurationUpdate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.exportConfigurations().updateWithResponse("my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", new ApplicationInsightsComponentExportRequest().withRecordTypes("Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd, PerformanceCounters, Availability").withDestinationType("Blob").withDestinationAddress("https://mystorageblob.blob.core.windows.net/fchentest?sv=2015-04-05&sr=c&sig=token").withIsEnabled("true").withNotificationQueueEnabled("false").withNotificationQueueUri("").withDestinationStorageSubscriptionId("subid").withDestinationStorageLocationId("eastus").withDestinationAccountId("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), com.azure.core.util.Context.NONE); } } ``` @@ -1038,156 +942,22 @@ public final class ExportConfigurationsUpdateSamples { import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; import com.azure.resourcemanager.applicationinsights.models.FavoriteType; import java.util.Arrays; +import java.util.stream.Collectors; -/** Samples for Favorites Add. */ +/** + * Samples for Favorites Add. + */ public final class FavoritesAddSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteAdd.json */ /** * Sample code: FavoriteAdd. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void favoriteAdd(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .favorites() - .addWithResponse( - "my-resource-group", - "my-ai-component", - "deadb33f-8bee-4d3b-a059-9be8dac93960", - new ApplicationInsightsComponentFavoriteInner() - .withName("Blah Blah Blah") - .withConfig( - "{\"MEDataModelRawJSON\":\"{\\n" - + " \\\"version\\\": \\\"1.4.1\\\",\\n" - + " \\\"isCustomDataModel\\\": true,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\n" - + " \\\"chartType\\\": \\\"Area\\\",\\n" - + " \\\"chartHeight\\\": 4,\\n" - + " \\\"metrics\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"preview/requests/count\\\",\\n" - + " \\\"metricAggregation\\\": \\\"Sum\\\",\\n" - + " \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"priorPeriod\\\": false,\\n" - + " \\\"clickAction\\\": {\\n" - + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n" - + " },\\n" - + " \\\"horizontalBars\\\": true,\\n" - + " \\\"showOther\\\": true,\\n" - + " \\\"aggregation\\\": \\\"Sum\\\",\\n" - + " \\\"percentage\\\": false,\\n" - + " \\\"palette\\\": \\\"fail\\\",\\n" - + " \\\"yAxisOption\\\": 0,\\n" - + " \\\"title\\\": \\\"\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\n" - + " \\\"chartType\\\": \\\"Area\\\",\\n" - + " \\\"chartHeight\\\": 2,\\n" - + " \\\"metrics\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"preview/requests/duration\\\",\\n" - + " \\\"metricAggregation\\\": \\\"Avg\\\",\\n" - + " \\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"priorPeriod\\\": false,\\n" - + " \\\"clickAction\\\": {\\n" - + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n" - + " },\\n" - + " \\\"horizontalBars\\\": true,\\n" - + " \\\"showOther\\\": true,\\n" - + " \\\"aggregation\\\": \\\"Avg\\\",\\n" - + " \\\"percentage\\\": false,\\n" - + " \\\"palette\\\": \\\"greenHues\\\",\\n" - + " \\\"yAxisOption\\\": 0,\\n" - + " \\\"title\\\": \\\"\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\n" - + " \\\"chartType\\\": \\\"Bar\\\",\\n" - + " \\\"chartHeight\\\": 4,\\n" - + " \\\"metrics\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"preview/requests/duration\\\",\\n" - + " \\\"metricAggregation\\\": \\\"Avg\\\",\\n" - + " \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"priorPeriod\\\": false,\\n" - + " \\\"clickAction\\\": {\\n" - + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n" - + " },\\n" - + " \\\"horizontalBars\\\": true,\\n" - + " \\\"showOther\\\": true,\\n" - + " \\\"aggregation\\\": \\\"Avg\\\",\\n" - + " \\\"percentage\\\": false,\\n" - + " \\\"palette\\\": \\\"magentaHues\\\",\\n" - + " \\\"yAxisOption\\\": 0,\\n" - + " \\\"title\\\": \\\"\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\n" - + " \\\"grouping\\\": {\\n" - + " \\\"kind\\\": \\\"ByDimension\\\",\\n" - + " \\\"dimension\\\": \\\"context.application.version\\\"\\n" - + " },\\n" - + " \\\"chartType\\\": \\\"Grid\\\",\\n" - + " \\\"chartHeight\\\": 1,\\n" - + " \\\"metrics\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"basicException.count\\\",\\n" - + " \\\"metricAggregation\\\": \\\"Sum\\\",\\n" - + " \\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"requestFailed.count\\\",\\n" - + " \\\"metricAggregation\\\": \\\"Sum\\\",\\n" - + " \\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"priorPeriod\\\": true,\\n" - + " \\\"clickAction\\\": {\\n" - + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n" - + " },\\n" - + " \\\"horizontalBars\\\": true,\\n" - + " \\\"showOther\\\": true,\\n" - + " \\\"percentage\\\": false,\\n" - + " \\\"palette\\\": \\\"blueHues\\\",\\n" - + " \\\"yAxisOption\\\": 0,\\n" - + " \\\"title\\\": \\\"\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"currentFilter\\\": {\\n" - + " \\\"eventTypes\\\": [\\n" - + " 1,\\n" - + " 2\\n" - + " ],\\n" - + " \\\"typeFacets\\\": {},\\n" - + " \\\"isPermissive\\\": false\\n" - + " },\\n" - + " \\\"timeContext\\\": {\\n" - + " \\\"durationMs\\\": 75600000,\\n" - + " \\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\n" - + " \\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\n" - + " \\\"isInitialTime\\\": false,\\n" - + " \\\"grain\\\": 1,\\n" - + " \\\"useDashboardTimeRange\\\": false\\n" - + " },\\n" - + " \\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\n" - + " \\\"timeSource\\\": 0\\n" - + "}\"}") - .withVersion("ME") - .withFavoriteType(FavoriteType.SHARED) - .withTags(Arrays.asList("TagSample01", "TagSample02")) - .withIsGeneratedFromTemplate(false), - com.azure.core.util.Context.NONE); + manager.favorites().addWithResponse("my-resource-group", "my-ai-component", "deadb33f-8bee-4d3b-a059-9be8dac93960", new ApplicationInsightsComponentFavoriteInner().withName("Blah Blah Blah").withConfig("{\"MEDataModelRawJSON\":\"{\\n \\\"version\\\": \\\"1.4.1\\\",\\n \\\"isCustomDataModel\\\": true,\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\n \\\"chartType\\\": \\\"Area\\\",\\n \\\"chartHeight\\\": 4,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Sum\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"fail\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\n \\\"chartType\\\": \\\"Area\\\",\\n \\\"chartHeight\\\": 2,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/duration\\\",\\n \\\"metricAggregation\\\": \\\"Avg\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Avg\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"greenHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\n \\\"chartType\\\": \\\"Bar\\\",\\n \\\"chartHeight\\\": 4,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/duration\\\",\\n \\\"metricAggregation\\\": \\\"Avg\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Avg\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"magentaHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\n \\\"grouping\\\": {\\n \\\"kind\\\": \\\"ByDimension\\\",\\n \\\"dimension\\\": \\\"context.application.version\\\"\\n },\\n \\\"chartType\\\": \\\"Grid\\\",\\n \\\"chartHeight\\\": 1,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"basicException.count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"\\n },\\n {\\n \\\"id\\\": \\\"requestFailed.count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": true,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"blueHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n }\\n ],\\n \\\"currentFilter\\\": {\\n \\\"eventTypes\\\": [\\n 1,\\n 2\\n ],\\n \\\"typeFacets\\\": {},\\n \\\"isPermissive\\\": false\\n },\\n \\\"timeContext\\\": {\\n \\\"durationMs\\\": 75600000,\\n \\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\n \\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\n \\\"isInitialTime\\\": false,\\n \\\"grain\\\": 1,\\n \\\"useDashboardTimeRange\\\": false\\n },\\n \\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\n \\\"timeSource\\\": 0\\n}\"}").withVersion("ME").withFavoriteType(FavoriteType.SHARED).withTags(Arrays.asList("TagSample01", "TagSample02")).withIsGeneratedFromTemplate(false), com.azure.core.util.Context.NONE); } } ``` @@ -1195,24 +965,20 @@ public final class FavoritesAddSamples { ### Favorites_Delete ```java -/** Samples for Favorites Delete. */ +/** + * Samples for Favorites Delete. + */ public final class FavoritesDeleteSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteDelete.json */ /** * Sample code: FavoriteList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void favoriteList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .favorites() - .deleteWithResponse( - "my-resource-group", - "my-ai-component", - "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - com.azure.core.util.Context.NONE); + manager.favorites().deleteWithResponse("my-resource-group", "my-ai-component", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } ``` @@ -1220,24 +986,20 @@ public final class FavoritesDeleteSamples { ### Favorites_Get ```java -/** Samples for Favorites Get. */ +/** + * Samples for Favorites Get. + */ public final class FavoritesGetSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteGet.json */ /** * Sample code: FavoriteGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void favoriteGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .favorites() - .getWithResponse( - "my-resource-group", - "my-ai-component", - "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - com.azure.core.util.Context.NONE); + manager.favorites().getWithResponse("my-resource-group", "my-ai-component", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } ``` @@ -1245,21 +1007,25 @@ public final class FavoritesGetSamples { ### Favorites_List ```java -/** Samples for Favorites List. */ +import com.azure.resourcemanager.applicationinsights.models.FavoriteSourceType; +import com.azure.resourcemanager.applicationinsights.models.FavoriteType; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Samples for Favorites List. + */ public final class FavoritesListSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoritesList.json */ /** * Sample code: FavoritesList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void favoritesList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .favorites() - .listWithResponse( - "my-resource-group", "my-ai-component", null, null, null, null, com.azure.core.util.Context.NONE); + manager.favorites().listWithResponse("my-resource-group", "my-ai-component", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1270,72 +1036,22 @@ public final class FavoritesListSamples { import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; import com.azure.resourcemanager.applicationinsights.models.FavoriteType; import java.util.Arrays; +import java.util.stream.Collectors; -/** Samples for Favorites Update. */ +/** + * Samples for Favorites Update. + */ public final class FavoritesUpdateSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteUpdate.json */ /** * Sample code: FavoriteList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void favoriteList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .favorites() - .updateWithResponse( - "my-resource-group", - "my-ai-component", - "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - new ApplicationInsightsComponentFavoriteInner() - .withName("Derek Changed This") - .withConfig( - "{\"MEDataModelRawJSON\":\"{\\\"version\\\": \\\"1.4.1\\\",\\\"isCustomDataModel\\\":" - + " true,\\\"items\\\": [{\\\"id\\\":" - + " \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\\"chartType\\\":" - + " \\\"Area\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\":" - + " \\\"preview/requests/count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\":" - + " \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\":" - + " {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\":" - + " true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Sum\\\",\\\"percentage\\\":" - + " false,\\\"palette\\\": \\\"fail\\\",\\\"yAxisOption\\\": 0,\\\"title\\\":" - + " \\\"\\\"},{\\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\\"chartType\\\":" - + " \\\"Area\\\",\\\"chartHeight\\\": 2,\\\"metrics\\\": [{\\\"id\\\":" - + " \\\"preview/requests/duration\\\",\\\"metricAggregation\\\": \\\"Avg\\\",\\\"color\\\":" - + " \\\"msportalfx-bgcolor-j1\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\":" - + " {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\":" - + " true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\":" - + " false,\\\"palette\\\": \\\"greenHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\":" - + " \\\"\\\"},{\\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\\"chartType\\\":" - + " \\\"Bar\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\":" - + " \\\"preview/requests/duration\\\",\\\"metricAggregation\\\": \\\"Avg\\\",\\\"color\\\":" - + " \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\":" - + " {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\":" - + " true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\":" - + " false,\\\"palette\\\": \\\"magentaHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\":" - + " \\\"\\\"},{\\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\\"grouping\\\":" - + " {\\\"kind\\\": \\\"ByDimension\\\",\\\"dimension\\\":" - + " \\\"context.application.version\\\"},\\\"chartType\\\":" - + " \\\"Grid\\\",\\\"chartHeight\\\": 1,\\\"metrics\\\": [{\\\"id\\\":" - + " \\\"basicException.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\":" - + " \\\"msportalfx-bgcolor-g0\\\"},{\\\"id\\\":" - + " \\\"requestFailed.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\":" - + " \\\"msportalfx-bgcolor-f0s2\\\"}],\\\"priorPeriod\\\": true,\\\"clickAction\\\":" - + " {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\":" - + " true,\\\"showOther\\\": true,\\\"percentage\\\": false,\\\"palette\\\":" - + " \\\"blueHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\":" - + " \\\"\\\"}],\\\"currentFilter\\\": {\\\"eventTypes\\\": [1,2],\\\"typeFacets\\\":" - + " {},\\\"isPermissive\\\": false},\\\"timeContext\\\": {\\\"durationMs\\\":" - + " 75600000,\\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\\"createdTime\\\":" - + " \\\"2018-01-31T23:54:26.280Z\\\",\\\"isInitialTime\\\": false,\\\"grain\\\":" - + " 1,\\\"useDashboardTimeRange\\\": false},\\\"jsonUri\\\":" - + " \\\"Favorite_BlankChart\\\",\\\"timeSource\\\": 0}\"}") - .withVersion("ME") - .withFavoriteType(FavoriteType.SHARED) - .withTags(Arrays.asList("TagSample01", "TagSample02", "TagSample03")) - .withIsGeneratedFromTemplate(false), - com.azure.core.util.Context.NONE); + manager.favorites().updateWithResponse("my-resource-group", "my-ai-component", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", new ApplicationInsightsComponentFavoriteInner().withName("Derek Changed This").withConfig("{\"MEDataModelRawJSON\":\"{\\\"version\\\": \\\"1.4.1\\\",\\\"isCustomDataModel\\\": true,\\\"items\\\": [{\\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\\"chartType\\\": \\\"Area\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\": \\\"preview/requests/count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Sum\\\",\\\"percentage\\\": false,\\\"palette\\\": \\\"fail\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"},{\\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\\"chartType\\\": \\\"Area\\\",\\\"chartHeight\\\": 2,\\\"metrics\\\": [{\\\"id\\\": \\\"preview/requests/duration\\\",\\\"metricAggregation\\\": \\\"Avg\\\",\\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\": false,\\\"palette\\\": \\\"greenHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"},{\\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\\"chartType\\\": \\\"Bar\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\": \\\"preview/requests/duration\\\",\\\"metricAggregation\\\": \\\"Avg\\\",\\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\": false,\\\"palette\\\": \\\"magentaHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"},{\\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\\"grouping\\\": {\\\"kind\\\": \\\"ByDimension\\\",\\\"dimension\\\": \\\"context.application.version\\\"},\\\"chartType\\\": \\\"Grid\\\",\\\"chartHeight\\\": 1,\\\"metrics\\\": [{\\\"id\\\": \\\"basicException.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"},{\\\"id\\\": \\\"requestFailed.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"}],\\\"priorPeriod\\\": true,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"percentage\\\": false,\\\"palette\\\": \\\"blueHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"}],\\\"currentFilter\\\": {\\\"eventTypes\\\": [1,2],\\\"typeFacets\\\": {},\\\"isPermissive\\\": false},\\\"timeContext\\\": {\\\"durationMs\\\": 75600000,\\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\\"isInitialTime\\\": false,\\\"grain\\\": 1,\\\"useDashboardTimeRange\\\": false},\\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\\"timeSource\\\": 0}\"}").withVersion("ME").withFavoriteType(FavoriteType.SHARED).withTags(Arrays.asList("TagSample01", "TagSample02", "TagSample03")).withIsGeneratedFromTemplate(false), com.azure.core.util.Context.NONE); } } ``` @@ -1343,251 +1059,20 @@ public final class FavoritesUpdateSamples { ### LiveToken_Get ```java -/** Samples for LiveToken Get. */ +/** + * 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); - } -} -``` - -### MyWorkbooks_CreateOrUpdate - -```java -import com.azure.resourcemanager.applicationinsights.models.Kind; - -/** Samples for MyWorkbooks CreateOrUpdate. */ -public final class MyWorkbooksCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookAdd.json - */ - /** - * Sample code: WorkbookAdd. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbookAdd(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .myWorkbooks() - .define("deadb33f-8bee-4d3b-a059-9be8dac93960") - .withRegion("west us") - .withExistingResourceGroup("my-resource-group") - .withName("deadb33f-8bee-4d3b-a059-9be8dac93960") - .withKind(Kind.USER) - .withDisplayName("Blah Blah Blah") - .withSerializedData( - "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r" - + "\\n" - + "---\\r" - + "\\n" - + "\\r" - + "\\n" - + "Welcome to your new workbook. This area will display text formatted as markdown.\\r" - + "\\n" - + "\\r" - + "\\n" - + "\\r" - + "\\n" - + "We've included a basic analytics query to get you started. Use the `Edit` button below each" - + " section to configure it or add more" - + " sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union" - + " withsource=TableName *\\n" - + "| summarize Count=count() by TableName\\n" - + "| render" - + " barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}") - .withCategory("workbook") - .withSourceId( - "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens") - .create(); - } -} -``` - -### MyWorkbooks_Delete - -```java -/** Samples for MyWorkbooks Delete. */ -public final class MyWorkbooksDeleteSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookDelete.json - */ - /** - * Sample code: WorkbookDelete. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void workbookDelete( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .myWorkbooks() - .deleteByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); - } -} -``` - -### MyWorkbooks_GetByResourceGroup - -```java -/** Samples for MyWorkbooks GetByResourceGroup. */ -public final class MyWorkbooksGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookGet.json - */ - /** - * Sample code: WorkbookGet. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbookGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .myWorkbooks() - .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); - } -} -``` - -### MyWorkbooks_List - -```java -import com.azure.resourcemanager.applicationinsights.models.CategoryType; - -/** Samples for MyWorkbooks List. */ -public final class MyWorkbooksListSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList.json - */ - /** - * Sample code: WorkbooksList. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbooksList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList2.json - */ - /** - * Sample code: WorkbooksList2. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbooksList2( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); - } -} -``` - -### MyWorkbooks_ListByResourceGroup - -```java -import com.azure.resourcemanager.applicationinsights.models.CategoryType; - -/** Samples for MyWorkbooks ListByResourceGroup. */ -public final class MyWorkbooksListByResourceGroupSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList.json - */ - /** - * Sample code: WorkbooksList. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbooksList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .myWorkbooks() - .listByResourceGroup( - "my-resource-group", CategoryType.WORKBOOK, null, null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList2.json - */ - /** - * Sample code: WorkbooksList2. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbooksList2( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .myWorkbooks() - .listByResourceGroup( - "my-resource-group", CategoryType.WORKBOOK, null, null, null, com.azure.core.util.Context.NONE); - } -} -``` - -### MyWorkbooks_Update - -```java -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; - -/** Samples for MyWorkbooks Update. */ -public final class MyWorkbooksUpdateSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookUpdate.json - */ - /** - * Sample code: WorkbookUpdate. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbookUpdate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - MyWorkbook resource = - manager - .myWorkbooks() - .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withKind(Kind.USER) - .withDisplayName("Blah Blah Blah") - .withSerializedData( - "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r" - + "\\n" - + "---\\r" - + "\\n" - + "\\r" - + "\\n" - + "Welcome to your new workbook. This area will display text formatted as markdown.\\r" - + "\\n" - + "\\r" - + "\\n" - + "\\r" - + "\\n" - + "We've included a basic analytics query to get you started. Use the `Edit` button below each" - + " section to configure it or add more" - + " sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union" - + " withsource=TableName *\\n" - + "| summarize Count=count() by TableName\\n" - + "| render" - + " barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}") - .withVersion("ME") - .withCategory("workbook") - .withSourceId( - "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens") - .apply(); + 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); } } ``` @@ -1595,21 +1080,20 @@ public final class MyWorkbooksUpdateSamples { ### ProactiveDetectionConfigurations_Get ```java -/** Samples for ProactiveDetectionConfigurations Get. */ +/** + * Samples for ProactiveDetectionConfigurations Get. + */ public final class ProactiveDetectionConfigurationsGetSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationGet.json */ /** * Sample code: ProactiveDetectionConfigurationGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void proactiveDetectionConfigurationGet( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .proactiveDetectionConfigurations() - .getWithResponse("my-resource-group", "my-component", "slowpageloadtime", com.azure.core.util.Context.NONE); + public static void proactiveDetectionConfigurationGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.proactiveDetectionConfigurations().getWithResponse("my-resource-group", "my-component", "slowpageloadtime", com.azure.core.util.Context.NONE); } } ``` @@ -1617,21 +1101,20 @@ public final class ProactiveDetectionConfigurationsGetSamples { ### ProactiveDetectionConfigurations_List ```java -/** Samples for ProactiveDetectionConfigurations List. */ +/** + * Samples for ProactiveDetectionConfigurations List. + */ public final class ProactiveDetectionConfigurationsListSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationsList.json */ /** * Sample code: ProactiveDetectionConfigurationsList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void proactiveDetectionConfigurationsList( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .proactiveDetectionConfigurations() - .listWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + public static void proactiveDetectionConfigurationsList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.proactiveDetectionConfigurations().listWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -1643,41 +1126,20 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationIn import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; import java.util.Arrays; -/** Samples for ProactiveDetectionConfigurations Update. */ +/** + * Samples for ProactiveDetectionConfigurations Update. + */ public final class ProactiveDetectionConfigurationsUpdateSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationUpdate.json */ /** * Sample code: ProactiveDetectionConfigurationUpdate. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void proactiveDetectionConfigurationUpdate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .proactiveDetectionConfigurations() - .updateWithResponse( - "my-resource-group", - "my-component", - "slowpageloadtime", - new ApplicationInsightsComponentProactiveDetectionConfigurationInner() - .withName("slowpageloadtime") - .withEnabled(true) - .withSendEmailsToSubscriptionOwners(true) - .withCustomEmails(Arrays.asList("foo@microsoft.com", "foo2@microsoft.com")) - .withRuleDefinitions( - new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions() - .withName("slowpageloadtime") - .withDisplayName("Slow page load time") - .withDescription("Smart Detection rules notify you of performance anomaly issues.") - .withHelpUrl( - "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics") - .withIsHidden(false) - .withIsEnabledByDefault(true) - .withIsInPreview(false) - .withSupportsEmailNotifications(true)), - com.azure.core.util.Context.NONE); + * + * @param manager Entry point to ApplicationInsightsManager. + */ + public static void proactiveDetectionConfigurationUpdate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.proactiveDetectionConfigurations().updateWithResponse("my-resource-group", "my-component", "slowpageloadtime", new ApplicationInsightsComponentProactiveDetectionConfigurationInner().withName("slowpageloadtime").withEnabled(true).withSendEmailsToSubscriptionOwners(true).withCustomEmails(Arrays.asList("foo@microsoft.com", "foo2@microsoft.com")).withRuleDefinitions(new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions().withName("slowpageloadtime").withDisplayName("Slow page load time").withDescription("Smart Detection rules notify you of performance anomaly issues.").withHelpUrl("https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics").withIsHidden(false).withIsEnabledByDefault(true).withIsInPreview(false).withSupportsEmailNotifications(true)), com.azure.core.util.Context.NONE); } } ``` @@ -1685,18 +1147,19 @@ public final class ProactiveDetectionConfigurationsUpdateSamples { ### WebTestLocations_List ```java -/** Samples for WebTestLocations List. */ +/** + * Samples for WebTestLocations List. + */ public final class WebTestLocationsListSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestLocationsList.json */ /** * Sample code: WebTestLocationsList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void webTestLocationsList( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + public static void webTestLocationsList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.webTestLocations().list("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } @@ -1712,48 +1175,22 @@ import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesCon import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesRequest; import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRules; import java.util.Arrays; +import java.util.stream.Collectors; -/** Samples for WebTests CreateOrUpdate. */ +/** + * 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(); + 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(); } /* @@ -1761,42 +1198,11 @@ public final class WebTestsCreateOrUpdateSamples { */ /** * 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(); + * + * @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(); } /* @@ -1804,41 +1210,11 @@ public final class WebTestsCreateOrUpdateSamples { */ /** * 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(); + 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(); } } ``` @@ -1846,21 +1222,20 @@ public final class WebTestsCreateOrUpdateSamples { ### WebTests_Delete ```java -/** Samples for WebTests Delete. */ +/** + * 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); + manager.webTests().deleteByResourceGroupWithResponse("my-resource-group", "my-webtest-01-mywebservice", com.azure.core.util.Context.NONE); } } ``` @@ -1868,21 +1243,20 @@ public final class WebTestsDeleteSamples { ### WebTests_GetByResourceGroup ```java -/** Samples for WebTests GetByResourceGroup. */ +/** + * 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); + manager.webTests().getByResourceGroupWithResponse("my-resource-group", "my-webtest-01-mywebservice", com.azure.core.util.Context.NONE); } } ``` @@ -1890,14 +1264,16 @@ public final class WebTestsGetByResourceGroupSamples { ### WebTests_List ```java -/** Samples for WebTests List. */ +/** + * 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) { @@ -1909,18 +1285,19 @@ public final class WebTestsListSamples { ### WebTests_ListByComponent ```java -/** Samples for WebTests ListByComponent. */ +/** + * 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) { + public static void webTestListByComponent(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.webTests().listByComponent("my-component", "my-resource-group", com.azure.core.util.Context.NONE); } } @@ -1929,18 +1306,19 @@ public final class WebTestsListByComponentSamples { ### WebTests_ListByResourceGroup ```java -/** Samples for WebTests ListByResourceGroup. */ +/** + * 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) { + public static void webTestListByResourceGroup(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.webTests().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } @@ -1953,37 +1331,21 @@ import com.azure.resourcemanager.applicationinsights.models.WebTest; import java.util.HashMap; import java.util.Map; -/** Samples for WebTests UpdateTags. */ +/** + * 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(); + * + * @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 @@ -2007,30 +1369,20 @@ import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfig import java.util.HashMap; import java.util.Map; -/** Samples for WorkItemConfigurations Create. */ +/** + * 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); + 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 @@ -2050,22 +1402,20 @@ public final class WorkItemConfigurationsCreateSamples { ### WorkItemConfigurations_Delete ```java -/** Samples for WorkItemConfigurations Delete. */ +/** + * 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); + 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); } } ``` @@ -2073,21 +1423,20 @@ public final class WorkItemConfigurationsDeleteSamples { ### WorkItemConfigurations_GetDefault ```java -/** Samples for WorkItemConfigurations GetDefault. */ +/** + * 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); + public static void workItemConfigurationsGetDefault(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.workItemConfigurations().getDefaultWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -2095,22 +1444,20 @@ public final class WorkItemConfigurationsGetDefaultSamples { ### WorkItemConfigurations_GetItem ```java -/** Samples for WorkItemConfigurations GetItem. */ +/** + * 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); + 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); } } ``` @@ -2118,18 +1465,19 @@ public final class WorkItemConfigurationsGetItemSamples { ### WorkItemConfigurations_List ```java -/** Samples for WorkItemConfigurations List. */ +/** + * 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) { + public static void workItemConfigurationsList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.workItemConfigurations().list("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } @@ -2142,31 +1490,20 @@ import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfig import java.util.HashMap; import java.util.Map; -/** Samples for WorkItemConfigurations UpdateItem. */ +/** + * 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); + * + * @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 @@ -2192,55 +1529,20 @@ import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGall import java.io.IOException; import java.util.Arrays; -/** Samples for WorkbookTemplates CreateOrUpdate. */ +/** + * Samples for WorkbookTemplates CreateOrUpdate. + */ public final class WorkbookTemplatesCreateOrUpdateSamples { /* * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateAdd.json */ /** * Sample code: WorkbookTemplateAdd. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbookTemplateAdd( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) throws IOException { - manager - .workbookTemplates() - .define("testtemplate2") - .withRegion("west us") - .withExistingResourceGroup("my-resource-group") - .withPriority(1) - .withAuthor("Contoso") - .withTemplateData( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"$schema\":\"https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json\",\"items\":[{\"name\":\"text" - + " - 2\",\"type\":1,\"content\":{\"json\":\"## New workbook\\n" - + "---\\n" - + "\\n" - + "Welcome to your new workbook. This area will display text formatted as markdown.\\n" - + "\\n" - + "\\n" - + "We've included a basic analytics query to get you started. Use the `Edit` button below" - + " each section to configure it or add more sections.\"}},{\"name\":\"query -" - + " 2\",\"type\":3,\"content\":{\"exportToExcelOptions\":\"visible\",\"query\":\"union" - + " withsource=TableName *\\n" - + "| summarize Count=count() by TableName\\n" - + "| render" - + " barchart\",\"queryType\":0,\"resourceType\":\"microsoft.operationalinsights/workspaces\",\"size\":1,\"version\":\"KqlItem/1.0\"}}],\"styleSettings\":{},\"version\":\"Notebook/1.0\"}", - Object.class, - SerializerEncoding.JSON)) - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery() - .withName("Simple Template") - .withCategory("Failures") - .withType("tsg") - .withOrder(100) - .withResourceType("microsoft.insights/components"))) - .create(); + * + * @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(); } } ``` @@ -2248,22 +1550,20 @@ public final class WorkbookTemplatesCreateOrUpdateSamples { ### WorkbookTemplates_Delete ```java -/** Samples for WorkbookTemplates Delete. */ +/** + * 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); + 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); } } ``` @@ -2271,21 +1571,20 @@ public final class WorkbookTemplatesDeleteSamples { ### WorkbookTemplates_GetByResourceGroup ```java -/** Samples for WorkbookTemplates GetByResourceGroup. */ +/** + * 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); + 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); } } ``` @@ -2293,18 +1592,19 @@ public final class WorkbookTemplatesGetByResourceGroupSamples { ### WorkbookTemplates_ListByResourceGroup ```java -/** Samples for WorkbookTemplates ListByResourceGroup. */ +/** + * 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) { + public static void workbookTemplatesList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.workbookTemplates().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } @@ -2315,24 +1615,20 @@ public final class WorkbookTemplatesListByResourceGroupSamples { ```java import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; -/** Samples for WorkbookTemplates Update. */ +/** + * 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(); + 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(); } } @@ -2347,88 +1643,34 @@ import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIden import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for Workbooks CreateOrUpdate. */ +/** + * Samples for Workbooks CreateOrUpdate. + */ public final class WorkbooksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedAdd.json + * 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/2022-04-01/examples/WorkbookAdd.json + * + * @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" - + "\\n" - + "Welcome to your new workbook. This area will display text formatted as markdown.\\r" - + "\\n" - + "\\r" - + "\\n" - + "\\r" - + "\\n" - + "We've included a basic analytics query to get you started. Use the `Edit` button below each" - + " section to configure it or add more" - + " sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union" - + " withsource=TableName *\\n" - + "| summarize Count=count() by TableName\\n" - + "| render" - + " barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}") - .withCategory("workbook") - .withDescription("Sample workbook") - .withSourceIdParameter( - "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group") - .create(); + 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 @@ -2448,22 +1690,20 @@ public final class WorkbooksCreateOrUpdateSamples { ### Workbooks_Delete ```java -/** Samples for Workbooks Delete. */ +/** + * Samples for Workbooks Delete. + */ public final class WorkbooksDeleteSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookDelete.json + * 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); + 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); } } ``` @@ -2471,52 +1711,44 @@ public final class WorkbooksDeleteSamples { ### Workbooks_GetByResourceGroup ```java -/** Samples for Workbooks GetByResourceGroup. */ +/** + * Samples for Workbooks GetByResourceGroup. + */ public final class WorkbooksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet1.json + * 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); + 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/2022-04-01/examples/WorkbookManagedGet.json + * 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); + 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/2022-04-01/examples/WorkbookGet.json + * 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); + manager.workbooks().getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, com.azure.core.util.Context.NONE); } } ``` @@ -2525,32 +1757,34 @@ public final class WorkbooksGetByResourceGroupSamples { ```java import com.azure.resourcemanager.applicationinsights.models.CategoryType; +import java.util.List; +import java.util.stream.Collectors; -/** Samples for Workbooks List. */ +/** + * Samples for Workbooks List. + */ public final class WorkbooksListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksListSub.json + * 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) { + 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/2022-04-01/examples/WorkbooksList2.json + * 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) { + public static void workbooksList2(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.workbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); } } @@ -2560,48 +1794,35 @@ public final class WorkbooksListSamples { ```java import com.azure.resourcemanager.applicationinsights.models.CategoryType; +import java.util.List; +import java.util.stream.Collectors; -/** Samples for Workbooks ListByResourceGroup. */ +/** + * Samples for Workbooks ListByResourceGroup. + */ public final class WorkbooksListByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksManagedList.json + * 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); + 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/2022-04-01/examples/WorkbooksList.json + * 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); + 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); } } ``` @@ -2609,25 +1830,20 @@ public final class WorkbooksListByResourceGroupSamples { ### Workbooks_RevisionGet ```java -/** Samples for Workbooks RevisionGet. */ +/** + * Samples for Workbooks RevisionGet. + */ public final class WorkbooksRevisionGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionGet.json + * 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); + 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); } } ``` @@ -2635,22 +1851,20 @@ public final class WorkbooksRevisionGetSamples { ### Workbooks_RevisionsList ```java -/** Samples for Workbooks RevisionsList. */ +/** + * Samples for Workbooks RevisionsList. + */ public final class WorkbooksRevisionsListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionsList.json + * 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); + 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); } } ``` @@ -2660,51 +1874,34 @@ public final class WorkbooksRevisionsListSamples { ```java import com.azure.resourcemanager.applicationinsights.models.Workbook; -/** Samples for Workbooks Update. */ +/** + * Samples for Workbooks Update. + */ public final class WorkbooksUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookUpdate.json + * 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(); + 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/2022-04-01/examples/WorkbookManagedUpdate.json + * 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(); + * + * @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 dc6fabb790344..03a8173627744 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml @@ -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-2022-06-15-java. + 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-2023-10-01-only. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true @@ -87,8 +88,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy 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 38d479b0df72f..450cb27d74283 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 @@ -31,12 +31,12 @@ import com.azure.resourcemanager.applicationinsights.implementation.ComponentAvailableFeaturesImpl; import com.azure.resourcemanager.applicationinsights.implementation.ComponentCurrentBillingFeaturesImpl; import com.azure.resourcemanager.applicationinsights.implementation.ComponentFeatureCapabilitiesImpl; +import com.azure.resourcemanager.applicationinsights.implementation.ComponentLinkedStorageAccountsOperationsImpl; import com.azure.resourcemanager.applicationinsights.implementation.ComponentQuotaStatusImpl; import com.azure.resourcemanager.applicationinsights.implementation.ComponentsImpl; import com.azure.resourcemanager.applicationinsights.implementation.ExportConfigurationsImpl; import com.azure.resourcemanager.applicationinsights.implementation.FavoritesImpl; import com.azure.resourcemanager.applicationinsights.implementation.LiveTokensImpl; -import com.azure.resourcemanager.applicationinsights.implementation.MyWorkbooksImpl; import com.azure.resourcemanager.applicationinsights.implementation.OperationsImpl; import com.azure.resourcemanager.applicationinsights.implementation.ProactiveDetectionConfigurationsImpl; import com.azure.resourcemanager.applicationinsights.implementation.WebTestLocationsImpl; @@ -50,12 +50,12 @@ import com.azure.resourcemanager.applicationinsights.models.ComponentAvailableFeatures; import com.azure.resourcemanager.applicationinsights.models.ComponentCurrentBillingFeatures; import com.azure.resourcemanager.applicationinsights.models.ComponentFeatureCapabilities; +import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsOperations; import com.azure.resourcemanager.applicationinsights.models.ComponentQuotaStatus; import com.azure.resourcemanager.applicationinsights.models.Components; import com.azure.resourcemanager.applicationinsights.models.ExportConfigurations; import com.azure.resourcemanager.applicationinsights.models.Favorites; import com.azure.resourcemanager.applicationinsights.models.LiveTokens; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbooks; import com.azure.resourcemanager.applicationinsights.models.Operations; import com.azure.resourcemanager.applicationinsights.models.ProactiveDetectionConfigurations; import com.azure.resourcemanager.applicationinsights.models.WebTestLocations; @@ -70,7 +70,10 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to ApplicationInsightsManager. Composite Swagger for Application Insights Management Client. */ +/** + * Entry point to ApplicationInsightsManager. + * Composite Swagger for Application Insights Management Client. + */ public final class ApplicationInsightsManager { private Components components; @@ -104,29 +107,25 @@ public final class ApplicationInsightsManager { private WorkbookTemplates workbookTemplates; - private MyWorkbooks myWorkbooks; - private Workbooks workbooks; private LiveTokens liveTokens; + private ComponentLinkedStorageAccountsOperations componentLinkedStorageAccountsOperations; + private final ApplicationInsightsManagementClient clientObject; private ApplicationInsightsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new ApplicationInsightsManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new ApplicationInsightsManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of ApplicationInsights service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the ApplicationInsights service API instance. @@ -139,7 +138,7 @@ public static ApplicationInsightsManager authenticate(TokenCredential credential /** * Creates an instance of ApplicationInsights service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the ApplicationInsights service API instance. @@ -152,14 +151,16 @@ public static ApplicationInsightsManager authenticate(HttpPipeline httpPipeline, /** * Gets a Configurable instance that can be used to create ApplicationInsightsManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new ApplicationInsightsManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -231,8 +232,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -249,8 +250,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -270,21 +271,12 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.applicationinsights") - .append("/") - .append("1.0.0"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.applicationinsights") + .append("/").append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -303,38 +295,25 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new ApplicationInsightsManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of Components. It manages ApplicationInsightsComponent. - * + * * @return Resource collection API of Components. */ public Components components() { @@ -346,7 +325,7 @@ public Components components() { /** * Gets the resource collection API of Annotations. - * + * * @return Resource collection API of Annotations. */ public Annotations annotations() { @@ -358,7 +337,7 @@ public Annotations annotations() { /** * Gets the resource collection API of ApiKeys. - * + * * @return Resource collection API of ApiKeys. */ public ApiKeys apiKeys() { @@ -370,7 +349,7 @@ public ApiKeys apiKeys() { /** * Gets the resource collection API of ExportConfigurations. - * + * * @return Resource collection API of ExportConfigurations. */ public ExportConfigurations exportConfigurations() { @@ -382,20 +361,20 @@ public ExportConfigurations exportConfigurations() { /** * Gets the resource collection API of ComponentCurrentBillingFeatures. - * + * * @return Resource collection API of ComponentCurrentBillingFeatures. */ public ComponentCurrentBillingFeatures componentCurrentBillingFeatures() { if (this.componentCurrentBillingFeatures == null) { - this.componentCurrentBillingFeatures = - new ComponentCurrentBillingFeaturesImpl(clientObject.getComponentCurrentBillingFeatures(), this); + this.componentCurrentBillingFeatures + = new ComponentCurrentBillingFeaturesImpl(clientObject.getComponentCurrentBillingFeatures(), this); } return componentCurrentBillingFeatures; } /** * Gets the resource collection API of ComponentQuotaStatus. - * + * * @return Resource collection API of ComponentQuotaStatus. */ public ComponentQuotaStatus componentQuotaStatus() { @@ -407,59 +386,59 @@ public ComponentQuotaStatus componentQuotaStatus() { /** * Gets the resource collection API of ComponentFeatureCapabilities. - * + * * @return Resource collection API of ComponentFeatureCapabilities. */ public ComponentFeatureCapabilities componentFeatureCapabilities() { if (this.componentFeatureCapabilities == null) { - this.componentFeatureCapabilities = - new ComponentFeatureCapabilitiesImpl(clientObject.getComponentFeatureCapabilities(), this); + this.componentFeatureCapabilities + = new ComponentFeatureCapabilitiesImpl(clientObject.getComponentFeatureCapabilities(), this); } return componentFeatureCapabilities; } /** * Gets the resource collection API of ComponentAvailableFeatures. - * + * * @return Resource collection API of ComponentAvailableFeatures. */ public ComponentAvailableFeatures componentAvailableFeatures() { if (this.componentAvailableFeatures == null) { - this.componentAvailableFeatures = - new ComponentAvailableFeaturesImpl(clientObject.getComponentAvailableFeatures(), this); + this.componentAvailableFeatures + = new ComponentAvailableFeaturesImpl(clientObject.getComponentAvailableFeatures(), this); } return componentAvailableFeatures; } /** * Gets the resource collection API of ProactiveDetectionConfigurations. - * + * * @return Resource collection API of ProactiveDetectionConfigurations. */ public ProactiveDetectionConfigurations proactiveDetectionConfigurations() { if (this.proactiveDetectionConfigurations == null) { - this.proactiveDetectionConfigurations = - new ProactiveDetectionConfigurationsImpl(clientObject.getProactiveDetectionConfigurations(), this); + this.proactiveDetectionConfigurations + = new ProactiveDetectionConfigurationsImpl(clientObject.getProactiveDetectionConfigurations(), this); } return proactiveDetectionConfigurations; } /** * Gets the resource collection API of WorkItemConfigurations. - * + * * @return Resource collection API of WorkItemConfigurations. */ public WorkItemConfigurations workItemConfigurations() { if (this.workItemConfigurations == null) { - this.workItemConfigurations = - new WorkItemConfigurationsImpl(clientObject.getWorkItemConfigurations(), this); + this.workItemConfigurations + = new WorkItemConfigurationsImpl(clientObject.getWorkItemConfigurations(), this); } return workItemConfigurations; } /** * Gets the resource collection API of Favorites. - * + * * @return Resource collection API of Favorites. */ public Favorites favorites() { @@ -471,7 +450,7 @@ public Favorites favorites() { /** * Gets the resource collection API of WebTestLocations. - * + * * @return Resource collection API of WebTestLocations. */ public WebTestLocations webTestLocations() { @@ -483,7 +462,7 @@ public WebTestLocations webTestLocations() { /** * Gets the resource collection API of WebTests. It manages WebTest. - * + * * @return Resource collection API of WebTests. */ public WebTests webTests() { @@ -495,7 +474,7 @@ public WebTests webTests() { /** * Gets the resource collection API of AnalyticsItems. - * + * * @return Resource collection API of AnalyticsItems. */ public AnalyticsItems analyticsItems() { @@ -507,7 +486,7 @@ public AnalyticsItems analyticsItems() { /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -519,7 +498,7 @@ public Operations operations() { /** * Gets the resource collection API of WorkbookTemplates. It manages WorkbookTemplate. - * + * * @return Resource collection API of WorkbookTemplates. */ public WorkbookTemplates workbookTemplates() { @@ -529,21 +508,9 @@ public WorkbookTemplates workbookTemplates() { return workbookTemplates; } - /** - * Gets the resource collection API of MyWorkbooks. It manages MyWorkbook. - * - * @return Resource collection API of MyWorkbooks. - */ - public MyWorkbooks myWorkbooks() { - if (this.myWorkbooks == null) { - this.myWorkbooks = new MyWorkbooksImpl(clientObject.getMyWorkbooks(), this); - } - return myWorkbooks; - } - /** * Gets the resource collection API of Workbooks. It manages Workbook. - * + * * @return Resource collection API of Workbooks. */ public Workbooks workbooks() { @@ -555,7 +522,7 @@ public Workbooks workbooks() { /** * Gets the resource collection API of LiveTokens. - * + * * @return Resource collection API of LiveTokens. */ public LiveTokens liveTokens() { @@ -565,10 +532,24 @@ public LiveTokens liveTokens() { return 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 wrapped service client ApplicationInsightsManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. - * + * * @return Wrapped service client ApplicationInsightsManagementClient. */ public ApplicationInsightsManagementClient serviceClient() { 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 5f0ff63a4d702..8250858576623 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 @@ -14,20 +14,22 @@ import com.azure.resourcemanager.applicationinsights.models.ItemTypeParameter; import java.util.List; -/** An instance of this class provides access to all the operations defined in AnalyticsItemsClient. */ +/** + * An instance of this class provides access to all the operations defined in AnalyticsItemsClient. + */ public interface AnalyticsItemsClient { /** * Gets a list of Analytics Items defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. + * 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. + * 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. + * only return the item information. * @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. @@ -35,38 +37,33 @@ public interface AnalyticsItemsClient { * @return a list of Analytics Items defined within an Application Insights component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent, + Response> listWithResponse(String resourceGroupName, + String resourceName, ItemScopePath scopePath, ItemScope scope, ItemTypeParameter type, Boolean includeContent, Context context); /** * Gets a list of Analytics Items defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Analytics Items defined within an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath); + List list(String resourceGroupName, String resourceName, + ItemScopePath scopePath); /** * 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. + * 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. @@ -76,85 +73,73 @@ List list( * @return a specific Analytics Items defined within an Application Insights component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context); + Response getWithResponse(String resourceGroupName, + String resourceName, ItemScopePath scopePath, String id, String name, Context context); /** * 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. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific Analytics Items defined within an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentAnalyticsItemInner get( - String resourceGroupName, String resourceName, ItemScopePath scopePath); + ApplicationInsightsComponentAnalyticsItemInner get(String resourceGroupName, String resourceName, + ItemScopePath scopePath); /** * 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. + * 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. + * Insights component. * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. + * already exists. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define an Analytics item that is associated to an Application Insights component along - * with {@link Response}. + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response putWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem, - Context context); + Response putWithResponse(String resourceGroupName, + String resourceName, ItemScopePath scopePath, ApplicationInsightsComponentAnalyticsItemInner itemProperties, + Boolean overrideItem, Context context); /** * 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. + * 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. + * Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define an Analytics item that is associated to an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentAnalyticsItemInner put( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties); + ApplicationInsightsComponentAnalyticsItemInner put(String resourceGroupName, String resourceName, + ItemScopePath scopePath, ApplicationInsightsComponentAnalyticsItemInner itemProperties); /** * 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. + * 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. @@ -164,21 +149,16 @@ ApplicationInsightsComponentAnalyticsItemInner put( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, + String name, Context context); /** * Deletes a specific Analytics Items defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. 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 7e7a70aa842f2..ebfe9d95cb700 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 @@ -12,28 +12,30 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; import java.util.List; -/** An instance of this class provides access to all the operations defined in AnnotationsClient. */ +/** + * An instance of this class provides access to all the operations defined in AnnotationsClient. + */ public interface AnnotationsClient { /** * Gets the list of annotations for a component for given time range. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * 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 - * PagedIterable}. + * @return the list of annotations for a component for given time range as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName, String start, String end); /** * Gets the list of annotations for a component for given time range. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -41,43 +43,43 @@ public interface AnnotationsClient { * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * 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 - * PagedIterable}. + * @return the list of annotations for a component for given time range as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String resourceName, String start, String end, Context context); + PagedIterable list(String resourceGroupName, String resourceName, String start, String end, + Context context); /** * 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. + * Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> createWithResponse( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context); + Response> createWithResponse(String resourceGroupName, String resourceName, + AnnotationInner annotationProperties, Context context); /** * 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. + * Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return array of Annotation. */ @@ -86,7 +88,7 @@ Response> createWithResponse( /** * 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. @@ -97,12 +99,12 @@ Response> createWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, String annotationId, + Context context); /** * 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. @@ -115,30 +117,30 @@ Response deleteWithResponse( /** * 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 com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> getWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); + Response> getWithResponse(String resourceGroupName, String resourceName, String annotationId, + Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the annotation for given id. */ 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 76e513e7f6c89..e09359123455f 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 @@ -12,11 +12,13 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner; import com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest; -/** An instance of this class provides access to all the operations defined in ApiKeysClient. */ +/** + * An instance of this class provides access to all the operations defined in ApiKeysClient. + */ public interface ApiKeysClient { /** * Gets a list of API keys of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -29,7 +31,7 @@ public interface ApiKeysClient { /** * Gets a list of API keys 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. @@ -39,16 +41,16 @@ public interface ApiKeysClient { * @return a list of API keys of an Application Insights component as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String resourceName, Context context); + PagedIterable list(String resourceGroupName, String resourceName, + Context 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 - * component. + * 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. @@ -56,28 +58,28 @@ PagedIterable list( * @return properties that define an API key of an Application Insights Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context); + Response createWithResponse(String resourceGroupName, String resourceName, + ApiKeyRequest apiKeyProperties, Context 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 - * component. + * component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define an API key of an Application Insights Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentApiKeyInner create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties); + ApplicationInsightsComponentApiKeyInner create(String resourceGroupName, String resourceName, + ApiKeyRequest apiKeyProperties); /** * 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. @@ -88,12 +90,12 @@ ApplicationInsightsComponentApiKeyInner create( * @return properties that define an API key of an Application Insights Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, + String keyId, Context context); /** * 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. @@ -107,7 +109,7 @@ Response deleteWithResponse( /** * 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. @@ -118,12 +120,12 @@ Response deleteWithResponse( * @return the API Key for this key id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + Response getWithResponse(String resourceGroupName, String resourceName, + String keyId, Context context); /** * 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. 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 5fa8d1779088c..ff56b409cbe30 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 @@ -7,166 +7,168 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for ApplicationInsightsManagementClient class. */ +/** + * The interface for ApplicationInsightsManagementClient class. + */ public interface ApplicationInsightsManagementClient { /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the ComponentsClient object to access its operations. - * + * * @return the ComponentsClient object. */ ComponentsClient getComponents(); /** * Gets the AnnotationsClient object to access its operations. - * + * * @return the AnnotationsClient object. */ AnnotationsClient getAnnotations(); /** * Gets the ApiKeysClient object to access its operations. - * + * * @return the ApiKeysClient object. */ ApiKeysClient getApiKeys(); /** * Gets the ExportConfigurationsClient object to access its operations. - * + * * @return the ExportConfigurationsClient object. */ ExportConfigurationsClient getExportConfigurations(); /** * Gets the ComponentCurrentBillingFeaturesClient object to access its operations. - * + * * @return the ComponentCurrentBillingFeaturesClient object. */ ComponentCurrentBillingFeaturesClient getComponentCurrentBillingFeatures(); /** * Gets the ComponentQuotaStatusClient object to access its operations. - * + * * @return the ComponentQuotaStatusClient object. */ ComponentQuotaStatusClient getComponentQuotaStatus(); /** * Gets the ComponentFeatureCapabilitiesClient object to access its operations. - * + * * @return the ComponentFeatureCapabilitiesClient object. */ ComponentFeatureCapabilitiesClient getComponentFeatureCapabilities(); /** * Gets the ComponentAvailableFeaturesClient object to access its operations. - * + * * @return the ComponentAvailableFeaturesClient object. */ ComponentAvailableFeaturesClient getComponentAvailableFeatures(); /** * Gets the ProactiveDetectionConfigurationsClient object to access its operations. - * + * * @return the ProactiveDetectionConfigurationsClient object. */ ProactiveDetectionConfigurationsClient getProactiveDetectionConfigurations(); /** * Gets the WorkItemConfigurationsClient object to access its operations. - * + * * @return the WorkItemConfigurationsClient object. */ 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. - * + * * @return the AnalyticsItemsClient object. */ AnalyticsItemsClient getAnalyticsItems(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the WorkbookTemplatesClient object to access its operations. - * + * * @return the WorkbookTemplatesClient object. */ WorkbookTemplatesClient getWorkbookTemplates(); - /** - * Gets the MyWorkbooksClient object to access its operations. - * - * @return the MyWorkbooksClient object. - */ - MyWorkbooksClient getMyWorkbooks(); - /** * Gets the WorkbooksClient object to access its operations. - * + * * @return the WorkbooksClient object. */ WorkbooksClient getWorkbooks(); /** * Gets the LiveTokensClient object to access its operations. - * + * * @return the LiveTokensClient object. */ LiveTokensClient getLiveTokens(); + + /** + * Gets the ComponentLinkedStorageAccountsOperationsClient object to access its operations. + * + * @return the ComponentLinkedStorageAccountsOperationsClient object. + */ + ComponentLinkedStorageAccountsOperationsClient getComponentLinkedStorageAccountsOperations(); } 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 89be54026eb3b..d2cf30f1a2134 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 @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner; -/** An instance of this class provides access to all the operations defined in ComponentAvailableFeaturesClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentAvailableFeaturesClient. + */ public interface ComponentAvailableFeaturesClient { /** * 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. @@ -24,12 +26,12 @@ public interface ComponentAvailableFeaturesClient { * @return an Application Insights component available features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String resourceGroupName, + String resourceName, Context context); /** * Returns all available features of the application insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 a7f642c0bb84d..d592e4386ccfc 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 @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; -/** An instance of this class provides access to all the operations defined in ComponentCurrentBillingFeaturesClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentCurrentBillingFeaturesClient. + */ public interface ComponentCurrentBillingFeaturesClient { /** * 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. @@ -24,12 +26,12 @@ public interface ComponentCurrentBillingFeaturesClient { * @return an Application Insights component billing features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String resourceGroupName, + String resourceName, Context context); /** * Returns current billing features for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -42,11 +44,11 @@ Response getWithResponse( /** * 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. + * 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. @@ -54,27 +56,23 @@ Response getWithResponse( * @return an Application Insights component billing features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, + Response updateWithResponse(String resourceGroupName, + String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, Context 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. + * Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Application Insights component billing features. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentBillingFeaturesInner update( - String resourceGroupName, - String resourceName, + ApplicationInsightsComponentBillingFeaturesInner update(String resourceGroupName, String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java index afc84808e3842..fd05199db4143 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 @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner; -/** An instance of this class provides access to all the operations defined in ComponentFeatureCapabilitiesClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentFeatureCapabilitiesClient. + */ public interface ComponentFeatureCapabilitiesClient { /** * 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. @@ -24,12 +26,12 @@ public interface ComponentFeatureCapabilitiesClient { * @return an Application Insights component feature capabilities along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String resourceGroupName, + String resourceName, Context context); /** * Returns feature capabilities of the application insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java new file mode 100644 index 0000000000000..063a8694a6ff0 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner; +import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsPatch; +import com.azure.resourcemanager.applicationinsights.models.StorageType; + +/** + * An instance of this class provides access to all the operations defined in + * ComponentLinkedStorageAccountsOperationsClient. + */ +public interface ComponentLinkedStorageAccountsOperationsClient { + /** + * Returns the current linked storage settings for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + StorageType storageType, Context context); + + /** + * Returns the current linked storage settings for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentLinkedStorageAccountsInner get(String resourceGroupName, String resourceName, StorageType storageType); + + /** + * Replace current linked storage account for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage accounts for + * an Application Insights component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createAndUpdateWithResponse(String resourceGroupName, + String resourceName, StorageType storageType, + ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties, Context context); + + /** + * Replace current linked storage account for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage accounts for + * an Application Insights component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentLinkedStorageAccountsInner createAndUpdate(String resourceGroupName, String resourceName, + StorageType storageType, ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties); + + /** + * Update linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked storage accounts + * for an Application Insights component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String resourceName, + StorageType storageType, ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties, Context context); + + /** + * Update linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked storage accounts + * for an Application Insights component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentLinkedStorageAccountsInner update(String resourceGroupName, String resourceName, StorageType storageType, + ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties); + + /** + * Delete linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String resourceName, StorageType storageType, + Context context); + + /** + * Delete linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, StorageType storageType); +} 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 c2b012636e060..92dd95883e978 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 @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner; -/** An instance of this class provides access to all the operations defined in ComponentQuotaStatusClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentQuotaStatusClient. + */ public interface ComponentQuotaStatusClient { /** * 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. @@ -24,12 +26,12 @@ public interface ComponentQuotaStatusClient { * @return an Application Insights component daily data volume cap status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String resourceGroupName, + String resourceName, Context context); /** * Returns daily data volume cap (quota) status for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 331f9d18022e0..f36feb1f63245 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 @@ -15,62 +15,64 @@ import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBody; import com.azure.resourcemanager.applicationinsights.models.TagsResource; -/** An instance of this class provides access to all the operations defined in ComponentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentsClient. + */ public interface ComponentsClient { /** * 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}. + * @return a list of all Application Insights components within a subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) 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 a list of all Application Insights components within a subscription as paginated response with {@link - * PagedIterable}. + * @return a list of all Application Insights components within a subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** * Gets a list of Application Insights components within a 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 a list of Application Insights components within a resource group as paginated response with {@link - * PagedIterable}. + * @return a list of Application Insights components within a resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** * 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 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 a list of Application Insights components within a resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Deletes an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. @@ -84,7 +86,7 @@ public interface ComponentsClient { /** * 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. @@ -96,7 +98,7 @@ public interface ComponentsClient { /** * 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. @@ -106,12 +108,12 @@ public interface ComponentsClient { * @return an Application Insights component definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceName, Context context); /** * Returns an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,7 +127,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -136,16 +138,13 @@ Response getByResourceGroupWithResponse( * @return an Application Insights component definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentInner insightProperties, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String resourceName, ApplicationInsightsComponentInner insightProperties, Context context); /** * 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. @@ -155,12 +154,12 @@ Response createOrUpdateWithResponse( * @return an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentInner createOrUpdate( - String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties); + ApplicationInsightsComponentInner createOrUpdate(String resourceGroupName, String resourceName, + ApplicationInsightsComponentInner insightProperties); /** * 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. @@ -171,12 +170,12 @@ ApplicationInsightsComponentInner createOrUpdate( * @return an Application Insights component definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateTagsWithResponse( - String resourceGroupName, String resourceName, TagsResource componentTags, Context context); + Response updateTagsWithResponse(String resourceGroupName, String resourceName, + TagsResource componentTags, Context context); /** * 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. @@ -186,20 +185,21 @@ Response updateTagsWithResponse( * @return an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentInner updateTags( - String resourceGroupName, String resourceName, TagsResource componentTags); + ApplicationInsightsComponentInner updateTags(String resourceGroupName, String resourceName, + TagsResource componentTags); /** * 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 + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the + * execution of purge requests by sending a single command whose predicate includes all user identities that require + * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge + * request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please + * run purge operation (directly on the * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific * resource id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. @@ -210,20 +210,21 @@ ApplicationInsightsComponentInner updateTags( * @return response containing operationId for a specific purge action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response purgeWithResponse( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context); + Response purgeWithResponse(String resourceGroupName, String resourceName, + ComponentPurgeBody body, Context context); /** * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, - * for workspace-based Application Insights resource please run purge operation (directly on the + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the + * execution of purge requests by sending a single command whose predicate includes all user identities that require + * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge + * request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please + * run purge operation (directly on the * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific * resource id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. @@ -237,7 +238,7 @@ Response purgeWithResponse( /** * 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. @@ -248,12 +249,12 @@ Response purgeWithResponse( * @return status for an ongoing purge operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getPurgeStatusWithResponse( - String resourceGroupName, String resourceName, String purgeId, Context context); + Response getPurgeStatusWithResponse(String resourceGroupName, + String resourceName, String purgeId, Context context); /** * Get status for an ongoing purge operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. 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 a46498bd465c7..8335edcf75f15 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 @@ -12,27 +12,29 @@ import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; import java.util.List; -/** An instance of this class provides access to all the operations defined in ExportConfigurationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ExportConfigurationsClient. + */ public interface ExportConfigurationsClient { /** * Gets a list of Continuous Export configuration of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @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 configuration of an Application Insights component along with {@link - * Response}. + * @return a list of Continuous Export configuration of an Application Insights component along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listWithResponse( - String resourceGroupName, String resourceName, Context context); + Response> listWithResponse(String resourceGroupName, + String resourceName, Context context); /** * Gets a list of Continuous Export configuration of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,11 +47,11 @@ Response> listWithRes /** * 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. + * 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. @@ -57,31 +59,28 @@ Response> listWithRes * @return a list of Continuous Export configurations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> createWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentExportRequest exportProperties, - Context context); + Response> createWithResponse(String resourceGroupName, + String resourceName, ApplicationInsightsComponentExportRequest exportProperties, Context 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. + * Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Continuous Export configurations. */ @ServiceMethod(returns = ReturnType.SINGLE) - List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties); + List create(String resourceGroupName, String resourceName, + ApplicationInsightsComponentExportRequest exportProperties); /** * 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. @@ -92,12 +91,12 @@ List create( * @return properties that define a Continuous Export configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context); + Response deleteWithResponse(String resourceGroupName, + String resourceName, String exportId, Context context); /** * 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. @@ -107,12 +106,12 @@ Response deleteWithRespons * @return properties that define a Continuous Export configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentExportConfigurationInner delete( - String resourceGroupName, String resourceName, String exportId); + ApplicationInsightsComponentExportConfigurationInner delete(String resourceGroupName, String resourceName, + String exportId); /** * 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. @@ -123,12 +122,12 @@ ApplicationInsightsComponentExportConfigurationInner delete( * @return the Continuous Export configuration for this export id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context); + Response getWithResponse(String resourceGroupName, + String resourceName, String exportId, Context context); /** * 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. @@ -138,12 +137,12 @@ Response getWithResponse( * @return the Continuous Export configuration for this export id. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentExportConfigurationInner get( - String resourceGroupName, String resourceName, String exportId); + ApplicationInsightsComponentExportConfigurationInner get(String resourceGroupName, String resourceName, + String exportId); /** * 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. @@ -155,16 +154,13 @@ ApplicationInsightsComponentExportConfigurationInner get( * @return properties that define a Continuous Export configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties, + Response updateWithResponse(String resourceGroupName, + String resourceName, String exportId, ApplicationInsightsComponentExportRequest exportProperties, Context context); /** * Update the Continuous Export configuration for this export id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. @@ -175,9 +171,6 @@ Response updateWithRespons * @return properties that define a Continuous Export configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentExportConfigurationInner update( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties); + ApplicationInsightsComponentExportConfigurationInner update(String resourceGroupName, String resourceName, + String exportId, ApplicationInsightsComponentExportRequest exportProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java index 53a5ace76bfb5..cfe8da64c8769 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 @@ -13,18 +13,20 @@ import com.azure.resourcemanager.applicationinsights.models.FavoriteType; import java.util.List; -/** An instance of this class provides access to all the operations defined in FavoritesClient. */ +/** + * An instance of this class provides access to all the operations defined in FavoritesClient. + */ public interface FavoritesClient { /** * Gets a list of favorites defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @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). + * 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. + * 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. @@ -33,18 +35,13 @@ public interface FavoritesClient { * @return a list of favorites defined within an Application Insights component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listWithResponse( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags, - Context context); + Response> listWithResponse(String resourceGroupName, + String resourceName, FavoriteType favoriteType, FavoriteSourceType sourceType, Boolean canFetchContent, + List tags, Context context); /** * Gets a list of favorites defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,7 +54,7 @@ Response> listWithResponse( /** * 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. @@ -65,16 +62,16 @@ Response> listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component along with {@link - * Response}. + * @return a single favorite by its FavoriteId, defined within an Application Insights component along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context); + Response getWithResponse(String resourceGroupName, String resourceName, + String favoriteId, Context context); /** * 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. @@ -88,50 +85,43 @@ Response getWithResponse( /** * 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. + * Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define a favorite that is associated to an Application Insights component along with - * {@link Response}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response addWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context); + Response addWithResponse(String resourceGroupName, String resourceName, + String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, Context context); /** * 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. + * Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define a favorite that is associated to an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentFavoriteInner add( - String resourceGroupName, - String resourceName, - String favoriteId, + ApplicationInsightsComponentFavoriteInner add(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties); /** * 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. @@ -141,19 +131,16 @@ ApplicationInsightsComponentFavoriteInner add( * @throws com.azure.core.management.exception.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}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, + Response updateWithResponse(String resourceGroupName, + String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, Context context); /** * 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. @@ -164,15 +151,12 @@ Response updateWithResponse( * @return properties that define a favorite that is associated to an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentFavoriteInner update( - String resourceGroupName, - String resourceName, - String favoriteId, + ApplicationInsightsComponentFavoriteInner update(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties); /** * Remove a favorite that is associated to an Application Insights component. - * + * * @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. @@ -183,12 +167,12 @@ ApplicationInsightsComponentFavoriteInner update( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, String favoriteId, + Context context); /** * Remove a favorite that is associated to an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. 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 3fa9baf5c68e1..c2f5eb2daf840 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 @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.LiveTokenResponseInner; -/** An instance of this class provides access to all the operations defined in LiveTokensClient. */ +/** + * An instance of this class provides access to all the operations defined in LiveTokensClient. + */ public interface LiveTokensClient { /** * **Gets an access token for live metrics stream data.**. - * + * * @param resourceUri The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -27,7 +29,7 @@ public interface LiveTokensClient { /** * **Gets an access token for live metrics stream data.**. - * + * * @param resourceUri The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/MyWorkbooksClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/MyWorkbooksClient.java deleted file mode 100644 index 22093576b0b38..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/MyWorkbooksClient.java +++ /dev/null @@ -1,223 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import java.util.List; - -/** An instance of this class provides access to all the operations defined in MyWorkbooksClient. */ -public interface MyWorkbooksClient { - /** - * Get all private 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.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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 private 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.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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); - - /** - * Get all private 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.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(CategoryType category); - - /** - * Get all private 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 com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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 a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MyWorkbookInner getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context); - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MyWorkbookInner createOrUpdate(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties); - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context); - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MyWorkbookInner update(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/OperationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/OperationsClient.java index eef1549f5516a..c0b01fe6b2f29 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 @@ -10,28 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Lists all of the available insights REST API operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations as paginated response with {@link - * PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Lists all of the available insights REST API operations. - * + * * @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 {@link - * PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java index 95d35c1b8ce12..08a862ff67a11 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 @@ -17,23 +17,23 @@ public interface ProactiveDetectionConfigurationsClient { /** * Gets a list of ProactiveDetection configurations of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component along with {@link - * Response}. + * @return a list of ProactiveDetection configurations of an Application Insights component along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listWithResponse( - String resourceGroupName, String resourceName, Context context); + Response> + listWithResponse(String resourceGroupName, String resourceName, Context context); /** * Gets a list of ProactiveDetection configurations of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -42,16 +42,16 @@ Response> * @return a list of ProactiveDetection configurations of an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - List list( - String resourceGroupName, String resourceName); + List list(String resourceGroupName, + String resourceName); /** * 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. + * 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. @@ -59,34 +59,34 @@ List list( * @return the ProactiveDetection configuration for this configuration id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String configurationId, Context context); + Response getWithResponse(String resourceGroupName, + String resourceName, String configurationId, Context context); /** * 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. + * 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 the ProactiveDetection configuration for this configuration id. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentProactiveDetectionConfigurationInner get( - String resourceGroupName, String resourceName, String configurationId); + ApplicationInsightsComponentProactiveDetectionConfigurationInner get(String resourceGroupName, String resourceName, + String configurationId); /** * 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. + * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. + * configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -95,30 +95,25 @@ ApplicationInsightsComponentProactiveDetectionConfigurationInner get( */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - Context context); + String resourceGroupName, String resourceName, String configurationId, + ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, Context context); /** * 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. + * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. + * configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define a ProactiveDetection configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentProactiveDetectionConfigurationInner update( - String resourceGroupName, - String resourceName, - String configurationId, + ApplicationInsightsComponentProactiveDetectionConfigurationInner update(String resourceGroupName, + String resourceName, String configurationId, ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties); } 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 24790c3ab2d33..4b194daf692c9 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 @@ -10,25 +10,27 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; -/** An instance of this class provides access to all the operations defined in WebTestLocationsClient. */ +/** + * An instance of this class provides access to all the operations defined in WebTestLocationsClient. + */ public interface WebTestLocationsClient { /** * Gets a list of web test locations available to this 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 web test locations available to this Application Insights component as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName); /** * Gets a list of web test locations available to this 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. @@ -36,9 +38,9 @@ public interface WebTestLocationsClient { * @throws com.azure.core.management.exception.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 PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String resourceName, Context context); + PagedIterable list(String resourceGroupName, String resourceName, + Context context); } 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 b6b6194917a72..f3c71a7c6e86b 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 @@ -12,38 +12,40 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner; import com.azure.resourcemanager.applicationinsights.models.TagsResource; -/** An instance of this class provides access to all the operations defined in WebTestsClient. */ +/** + * 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}. + * {@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}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Get a specific Application Insights web test definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @param context The context to associate with this operation. @@ -53,12 +55,12 @@ public interface WebTestsClient { * @return a specific Application Insights web test definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String webTestName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String webTestName, + Context context); /** * Get a specific Application Insights web test definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -71,11 +73,11 @@ Response getByResourceGroupWithResponse( /** * 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. + * test definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -83,16 +85,16 @@ Response getByResourceGroupWithResponse( * @return an Application Insights WebTest definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String webTestName, WebTestInner webTestDefinition, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String webTestName, + WebTestInner webTestDefinition, Context context); /** * 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. + * test definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -103,7 +105,7 @@ Response createOrUpdateWithResponse( /** * 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. @@ -114,12 +116,12 @@ Response createOrUpdateWithResponse( * @return an Application Insights WebTest definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateTagsWithResponse( - String resourceGroupName, String webTestName, TagsResource webTestTags, Context context); + Response updateTagsWithResponse(String resourceGroupName, String webTestName, + TagsResource webTestTags, Context context); /** * 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. @@ -133,7 +135,7 @@ Response updateTagsWithResponse( /** * 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. @@ -147,7 +149,7 @@ Response updateTagsWithResponse( /** * 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. @@ -159,53 +161,53 @@ Response updateTagsWithResponse( /** * Get all Application Insights web test definitions for the specified subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Application Insights web test definitions for the specified subscription as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Get all Application Insights web test definitions for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Application Insights web test definitions for the specified subscription as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** * Get all Application Insights web tests defined for the specified component. - * + * * @param componentName The name of the Application Insights component resource. * @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 component as paginated response with {@link - * PagedIterable}. + * @return all Application Insights web tests defined for the specified component as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByComponent(String componentName, String resourceGroupName); /** * Get all Application Insights web tests defined for the specified component. - * + * * @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 com.azure.core.management.exception.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 - * PagedIterable}. + * @return all Application Insights web tests defined for the specified component as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByComponent(String componentName, String resourceGroupName, Context context); 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 005d889dd40fc..084335cf413be 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 @@ -12,46 +12,48 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner; import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; -/** An instance of this class provides access to all the operations defined in WorkItemConfigurationsClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkItemConfigurationsClient. + */ public interface WorkItemConfigurationsClient { /** * Gets the list 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationErrorException thrown if the - * request is rejected by server. + * 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 - * PagedIterable}. + * @return the list work item configurations that exist for the application as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName); /** * Gets the list 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 com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationErrorException thrown if the - * request is rejected by server. + * 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 - * PagedIterable}. + * @return the list work item configurations that exist for the application as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName, Context context); /** * Create a work item configuration for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. + * of a Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -59,31 +61,28 @@ public interface WorkItemConfigurationsClient { * @return work item configuration associated with an application insights resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String resourceName, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context); + Response createWithResponse(String resourceGroupName, String resourceName, + WorkItemCreateConfiguration workItemConfigurationProperties, Context context); /** * Create a work item configuration for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. + * of a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return work item configuration associated with an application insights resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkItemConfigurationInner create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties); + WorkItemConfigurationInner create(String resourceGroupName, String resourceName, + WorkItemCreateConfiguration workItemConfigurationProperties); /** * 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. @@ -93,12 +92,12 @@ WorkItemConfigurationInner create( * @return default work item configurations that exist for the application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDefaultWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getDefaultWithResponse(String resourceGroupName, String resourceName, + Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -111,11 +110,11 @@ Response getDefaultWithResponse( /** * 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. + * defined in connector configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -123,16 +122,16 @@ Response getDefaultWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, String workItemConfigId, + Context context); /** * 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. + * defined in connector configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -142,11 +141,11 @@ Response deleteWithResponse( /** * 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. + * defined in connector configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -154,16 +153,16 @@ Response deleteWithResponse( * @return specified work item configuration for an Application Insights component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getItemWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context); + Response getItemWithResponse(String resourceGroupName, String resourceName, + String workItemConfigId, Context context); /** * Gets specified work item configuration for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. + * defined in connector configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -174,13 +173,13 @@ Response getItemWithResponse( /** * 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. + * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. + * for this Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -188,31 +187,24 @@ Response getItemWithResponse( * @return work item configuration associated with an application insights resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateItemWithResponse( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context); + Response updateItemWithResponse(String resourceGroupName, String resourceName, + String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties, Context context); /** * 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. + * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. + * for this Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return work item configuration associated with an application insights resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkItemConfigurationInner updateItem( - String resourceGroupName, - String resourceName, - String workItemConfigId, + WorkItemConfigurationInner updateItem(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java index 7cb3f51ddc467..00c0aca35f5c8 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 @@ -12,38 +12,40 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner; import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateUpdateParameters; -/** An instance of this class provides access to all the operations defined in WorkbookTemplatesClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkbookTemplatesClient. + */ public interface WorkbookTemplatesClient { /** * Get all Workbook templates defined within a specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbook templates defined within a specified resource group as paginated response with {@link - * PagedIterable}. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** * Get all Workbook templates defined within a specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbook templates defined within a specified resource group as paginated response with {@link - * PagedIterable}. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Get a single workbook template by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. @@ -53,12 +55,12 @@ public interface WorkbookTemplatesClient { * @return a single workbook template by its resourceName along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); /** * Get a single workbook template by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -71,7 +73,7 @@ Response getByResourceGroupWithResponse( /** * Delete a workbook template. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. @@ -85,7 +87,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -97,7 +99,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -108,15 +110,12 @@ Response getByResourceGroupWithResponse( * @return an Application Insights workbook template definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - WorkbookTemplateInner workbookTemplateProperties, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + WorkbookTemplateInner workbookTemplateProperties, Context context); /** * Create a new workbook template. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. @@ -126,12 +125,12 @@ Response createOrUpdateWithResponse( * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkbookTemplateInner createOrUpdate( - String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties); + WorkbookTemplateInner createOrUpdate(String resourceGroupName, String resourceName, + WorkbookTemplateInner workbookTemplateProperties); /** * 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. @@ -142,15 +141,12 @@ WorkbookTemplateInner createOrUpdate( * @return an Application Insights workbook template definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, - Context context); + Response updateWithResponse(String resourceGroupName, String resourceName, + WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, Context context); /** * Updates a workbook template that has already been added. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 083782eb5faf8..e9c78c0be394f 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 @@ -14,108 +14,105 @@ import com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateParameters; import java.util.List; -/** An instance of this class provides access to all the operations defined in WorkbooksClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkbooksClient. + */ 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. + * 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}. + * @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. - * + * * @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. + * 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. + * 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}. + * @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); + 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. + * 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 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. + * 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. + * 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 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); + PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category, List tags, + String sourceId, Boolean canFetchContent, Context context); /** * Get a single workbook by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. + * 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. + * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single workbook by its resourceName along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Boolean canFetchContent, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Boolean canFetchContent, Context context); /** * Get a single workbook by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. + * 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. */ @@ -124,13 +121,13 @@ Response getByResourceGroupWithResponse( /** * Delete a workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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 com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the - * request is rejected by server. + * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @@ -139,12 +136,12 @@ Response getByResourceGroupWithResponse( /** * Delete a workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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. + * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -152,35 +149,31 @@ Response getByResourceGroupWithResponse( /** * Create a new workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. + * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - WorkbookInner workbookProperties, - String sourceId, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + WorkbookInner workbookProperties, String sourceId, Context context); /** * Create a new workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. + * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a workbook definition. */ @@ -189,34 +182,30 @@ Response createOrUpdateWithResponse( /** * Updates a workbook that has already been added. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. + * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String sourceId, - WorkbookUpdateParameters workbookUpdateParameters, - Context context); + Response updateWithResponse(String resourceGroupName, String resourceName, String sourceId, + WorkbookUpdateParameters workbookUpdateParameters, Context context); /** * Updates a workbook that has already been added. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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. + * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a workbook definition. */ @@ -225,61 +214,61 @@ Response updateWithResponse( /** * Get the revisions for the workbook defined by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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. + * 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 - * PagedIterable}. + * @return the revisions for the workbook defined by its resourceName as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable revisionsList(String resourceGroupName, String resourceName); /** * Get the revisions for the workbook defined by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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 com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the - * request is rejected by server. + * 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 - * PagedIterable}. + * @return the revisions for the workbook defined by its resourceName as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable revisionsList(String resourceGroupName, String resourceName, Context context); /** * Get a single workbook revision defined by its revisionId. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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 com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the - * request is rejected by server. + * 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response revisionGetWithResponse( - String resourceGroupName, String resourceName, String revisionId, Context context); + Response revisionGetWithResponse(String resourceGroupName, String resourceName, String revisionId, + Context context); /** * Get a single workbook revision defined by its revisionId. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param resourceName The name of the workbook resource. The value must be an UUID. * @param revisionId The id of the workbook's revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the - * request is rejected by server. + * 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. */ 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 1e5c69bab098b..0008e5b2f5a4f 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Annotation associated with an application insights resource. */ +/** + * Annotation associated with an application insights resource. + */ @Fluent public final class AnnotationInner { /* @@ -47,13 +49,15 @@ public final class AnnotationInner { @JsonProperty(value = "RelatedAnnotation") private String relatedAnnotation; - /** Creates an instance of AnnotationInner class. */ + /** + * Creates an instance of AnnotationInner class. + */ public AnnotationInner() { } /** * Get the annotationName property: Name of annotation. - * + * * @return the annotationName value. */ public String annotationName() { @@ -62,7 +66,7 @@ public String annotationName() { /** * Set the annotationName property: Name of annotation. - * + * * @param annotationName the annotationName value to set. * @return the AnnotationInner object itself. */ @@ -73,7 +77,7 @@ public AnnotationInner withAnnotationName(String annotationName) { /** * Get the category property: Category of annotation, free form. - * + * * @return the category value. */ public String category() { @@ -82,7 +86,7 @@ public String category() { /** * Set the category property: Category of annotation, free form. - * + * * @param category the category value to set. * @return the AnnotationInner object itself. */ @@ -93,7 +97,7 @@ public AnnotationInner withCategory(String category) { /** * Get the eventTime property: Time when event occurred. - * + * * @return the eventTime value. */ public OffsetDateTime eventTime() { @@ -102,7 +106,7 @@ public OffsetDateTime eventTime() { /** * Set the eventTime property: Time when event occurred. - * + * * @param eventTime the eventTime value to set. * @return the AnnotationInner object itself. */ @@ -113,7 +117,7 @@ public AnnotationInner withEventTime(OffsetDateTime eventTime) { /** * Get the id property: Unique Id for annotation. - * + * * @return the id value. */ public String id() { @@ -122,7 +126,7 @@ public String id() { /** * Set the id property: Unique Id for annotation. - * + * * @param id the id value to set. * @return the AnnotationInner object itself. */ @@ -133,7 +137,7 @@ public AnnotationInner withId(String id) { /** * Get the properties property: Serialized JSON object for detailed properties. - * + * * @return the properties value. */ public String properties() { @@ -142,7 +146,7 @@ public String properties() { /** * Set the properties property: Serialized JSON object for detailed properties. - * + * * @param properties the properties value to set. * @return the AnnotationInner object itself. */ @@ -153,7 +157,7 @@ public AnnotationInner withProperties(String properties) { /** * Get the relatedAnnotation property: Related parent annotation if any. - * + * * @return the relatedAnnotation value. */ public String relatedAnnotation() { @@ -162,7 +166,7 @@ public String relatedAnnotation() { /** * Set the relatedAnnotation property: Related parent annotation if any. - * + * * @param relatedAnnotation the relatedAnnotation value to set. * @return the AnnotationInner object itself. */ @@ -173,7 +177,7 @@ public AnnotationInner withRelatedAnnotation(String relatedAnnotation) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java index 5d0c3c653841c..58ecab97f12b6 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 @@ -10,7 +10,9 @@ import com.azure.resourcemanager.applicationinsights.models.ItemType; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties that define an Analytics item that is associated to an Application Insights component. */ +/** + * Properties that define an Analytics item that is associated to an Application Insights component. + */ @Fluent public final class ApplicationInsightsComponentAnalyticsItemInner { /* @@ -69,13 +71,15 @@ public final class ApplicationInsightsComponentAnalyticsItemInner { @JsonProperty(value = "Properties") private ApplicationInsightsComponentAnalyticsItemProperties properties; - /** Creates an instance of ApplicationInsightsComponentAnalyticsItemInner class. */ + /** + * Creates an instance of ApplicationInsightsComponentAnalyticsItemInner class. + */ public ApplicationInsightsComponentAnalyticsItemInner() { } /** * Get the id property: Internally assigned unique id of the item definition. - * + * * @return the id value. */ public String id() { @@ -84,7 +88,7 @@ public String id() { /** * Set the id property: Internally assigned unique id of the item definition. - * + * * @param id the id value to set. * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. */ @@ -95,7 +99,7 @@ public ApplicationInsightsComponentAnalyticsItemInner withId(String id) { /** * Get the name property: The user-defined name of the item. - * + * * @return the name value. */ public String name() { @@ -104,7 +108,7 @@ public String name() { /** * Set the name property: The user-defined name of the item. - * + * * @param name the name value to set. * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. */ @@ -115,7 +119,7 @@ public ApplicationInsightsComponentAnalyticsItemInner withName(String name) { /** * Get the content property: The content of this item. - * + * * @return the content value. */ public String content() { @@ -124,7 +128,7 @@ public String content() { /** * Set the content property: The content of this item. - * + * * @param content the content value to set. * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. */ @@ -135,7 +139,7 @@ public ApplicationInsightsComponentAnalyticsItemInner withContent(String content /** * Get the version property: This instance's version of the data model. This can change as new features are added. - * + * * @return the version value. */ public String version() { @@ -145,7 +149,7 @@ public String version() { /** * Get the scope property: 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. - * + * * @return the scope value. */ public ItemScope scope() { @@ -155,7 +159,7 @@ public ItemScope scope() { /** * Set the scope property: 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 the scope value to set. * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. */ @@ -166,7 +170,7 @@ public ApplicationInsightsComponentAnalyticsItemInner withScope(ItemScope scope) /** * Get the type property: Enum indicating the type of the Analytics item. - * + * * @return the type value. */ public ItemType type() { @@ -175,7 +179,7 @@ public ItemType type() { /** * Set the type property: Enum indicating the type of the Analytics item. - * + * * @param type the type value to set. * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. */ @@ -186,7 +190,7 @@ public ApplicationInsightsComponentAnalyticsItemInner withType(ItemType type) { /** * Get the timeCreated property: Date and time in UTC when this item was created. - * + * * @return the timeCreated value. */ public String timeCreated() { @@ -195,7 +199,7 @@ public String timeCreated() { /** * Get the timeModified property: Date and time in UTC of the last modification that was made to this item. - * + * * @return the timeModified value. */ public String timeModified() { @@ -203,9 +207,9 @@ public String timeModified() { } /** - * Get the properties property: A set of properties that can be defined in the context of a specific item type. Each - * type may have its own properties. - * + * Get the properties property: A set of properties that can be defined in the context of a specific item type. + * Each type may have its own properties. + * * @return the properties value. */ public ApplicationInsightsComponentAnalyticsItemProperties properties() { @@ -213,21 +217,21 @@ public ApplicationInsightsComponentAnalyticsItemProperties properties() { } /** - * Set the properties property: A set of properties that can be defined in the context of a specific item type. Each - * type may have its own properties. - * + * Set the properties property: A set of properties that can be defined in the context of a specific item type. + * Each type may have its own properties. + * * @param properties the properties value to set. * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. */ - public ApplicationInsightsComponentAnalyticsItemInner withProperties( - ApplicationInsightsComponentAnalyticsItemProperties properties) { + public ApplicationInsightsComponentAnalyticsItemInner + withProperties(ApplicationInsightsComponentAnalyticsItemProperties properties) { this.properties = properties; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java index 4ca82677a176e..1f23a043f5cad 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties that define an API key of an Application Insights Component. */ +/** + * Properties that define an API key of an Application Insights Component. + */ @Fluent public final class ApplicationInsightsComponentApiKeyInner { /* @@ -48,14 +50,16 @@ public final class ApplicationInsightsComponentApiKeyInner { @JsonProperty(value = "linkedWriteProperties") private List linkedWriteProperties; - /** Creates an instance of ApplicationInsightsComponentApiKeyInner class. */ + /** + * Creates an instance of ApplicationInsightsComponentApiKeyInner class. + */ public ApplicationInsightsComponentApiKeyInner() { } /** * Get the id property: The unique ID of the API key inside an Application Insights component. It is auto generated * when the API key is created. - * + * * @return the id value. */ public String id() { @@ -64,7 +68,7 @@ public String id() { /** * Get the apiKey property: The API key value. It will be only return once when the API Key was created. - * + * * @return the apiKey value. */ public String apiKey() { @@ -73,7 +77,7 @@ public String apiKey() { /** * Get the createdDate property: The create date of this API key. - * + * * @return the createdDate value. */ public String createdDate() { @@ -82,7 +86,7 @@ public String createdDate() { /** * Set the createdDate property: The create date of this API key. - * + * * @param createdDate the createdDate value to set. * @return the ApplicationInsightsComponentApiKeyInner object itself. */ @@ -93,7 +97,7 @@ public ApplicationInsightsComponentApiKeyInner withCreatedDate(String createdDat /** * Get the name property: The name of the API key. - * + * * @return the name value. */ public String name() { @@ -102,7 +106,7 @@ public String name() { /** * Set the name property: The name of the API key. - * + * * @param name the name value to set. * @return the ApplicationInsightsComponentApiKeyInner object itself. */ @@ -113,7 +117,7 @@ public ApplicationInsightsComponentApiKeyInner withName(String name) { /** * Get the linkedReadProperties property: The read access rights of this API Key. - * + * * @return the linkedReadProperties value. */ public List linkedReadProperties() { @@ -122,7 +126,7 @@ public List 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. */ @@ -133,7 +137,7 @@ public ApplicationInsightsComponentApiKeyInner withLinkedReadProperties(List linkedWriteProperties() { @@ -142,7 +146,7 @@ public List 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. */ @@ -153,7 +157,7 @@ public ApplicationInsightsComponentApiKeyInner withLinkedWriteProperties(List result; - /** Creates an instance of ApplicationInsightsComponentAvailableFeaturesInner class. */ + /** + * Creates an instance of ApplicationInsightsComponentAvailableFeaturesInner class. + */ public ApplicationInsightsComponentAvailableFeaturesInner() { } /** * Get the result property: A list of Application Insights component feature. - * + * * @return the result value. */ public List result() { @@ -33,7 +37,7 @@ public List result() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java index 095c628f10808..3d3b366e224ff 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** An Application Insights component billing features. */ +/** + * An Application Insights component billing features. + */ @Fluent public final class ApplicationInsightsComponentBillingFeaturesInner { /* @@ -25,13 +27,15 @@ public final class ApplicationInsightsComponentBillingFeaturesInner { @JsonProperty(value = "CurrentBillingFeatures") private List currentBillingFeatures; - /** Creates an instance of ApplicationInsightsComponentBillingFeaturesInner class. */ + /** + * Creates an instance of ApplicationInsightsComponentBillingFeaturesInner class. + */ public ApplicationInsightsComponentBillingFeaturesInner() { } /** * Get the dataVolumeCap property: An Application Insights component daily data volume cap. - * + * * @return the dataVolumeCap value. */ public ApplicationInsightsComponentDataVolumeCap dataVolumeCap() { @@ -40,12 +44,12 @@ public ApplicationInsightsComponentDataVolumeCap dataVolumeCap() { /** * Set the dataVolumeCap property: An Application Insights component daily data volume cap. - * + * * @param dataVolumeCap the dataVolumeCap value to set. * @return the ApplicationInsightsComponentBillingFeaturesInner object itself. */ - public ApplicationInsightsComponentBillingFeaturesInner withDataVolumeCap( - ApplicationInsightsComponentDataVolumeCap dataVolumeCap) { + public ApplicationInsightsComponentBillingFeaturesInner + withDataVolumeCap(ApplicationInsightsComponentDataVolumeCap dataVolumeCap) { this.dataVolumeCap = dataVolumeCap; return this; } @@ -53,7 +57,7 @@ public ApplicationInsightsComponentBillingFeaturesInner withDataVolumeCap( /** * Get the currentBillingFeatures property: Current enabled pricing plan. When the component is in the Enterprise * plan, this will list both 'Basic' and 'Application Insights Enterprise'. - * + * * @return the currentBillingFeatures value. */ public List currentBillingFeatures() { @@ -63,19 +67,19 @@ public List currentBillingFeatures() { /** * Set the currentBillingFeatures property: Current enabled pricing plan. When the component is in the Enterprise * plan, this will list both 'Basic' and 'Application Insights Enterprise'. - * + * * @param currentBillingFeatures the currentBillingFeatures value to set. * @return the ApplicationInsightsComponentBillingFeaturesInner object itself. */ - public ApplicationInsightsComponentBillingFeaturesInner withCurrentBillingFeatures( - List currentBillingFeatures) { + public ApplicationInsightsComponentBillingFeaturesInner + withCurrentBillingFeatures(List currentBillingFeatures) { this.currentBillingFeatures = currentBillingFeatures; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java index 2b6f2fe2eaae5..e0583221133e1 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties that define a Continuous Export configuration. */ +/** + * Properties that define a Continuous Export configuration. + */ @Fluent public final class ApplicationInsightsComponentExportConfigurationInner { /* @@ -130,14 +132,16 @@ public final class ApplicationInsightsComponentExportConfigurationInner { @JsonProperty(value = "ContainerName", access = JsonProperty.Access.WRITE_ONLY) private String containerName; - /** Creates an instance of ApplicationInsightsComponentExportConfigurationInner class. */ + /** + * Creates an instance of ApplicationInsightsComponentExportConfigurationInner class. + */ public ApplicationInsightsComponentExportConfigurationInner() { } /** - * Get the exportId property: The unique ID of the export configuration inside an Application Insights component. It - * is auto generated when the Continuous Export configuration is created. - * + * Get the exportId property: The unique ID of the export configuration inside an Application Insights component. + * It is auto generated when the Continuous Export configuration is created. + * * @return the exportId value. */ public String exportId() { @@ -146,7 +150,7 @@ public String exportId() { /** * Get the instrumentationKey property: The instrumentation key of the Application Insights component. - * + * * @return the instrumentationKey value. */ public String instrumentationKey() { @@ -157,7 +161,7 @@ public String instrumentationKey() { * Get 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'. - * + * * @return the recordTypes value. */ public String recordTypes() { @@ -168,7 +172,7 @@ public String 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. */ @@ -179,7 +183,7 @@ public ApplicationInsightsComponentExportConfigurationInner withRecordTypes(Stri /** * Get the applicationName property: The name of the Application Insights component. - * + * * @return the applicationName value. */ public String applicationName() { @@ -188,7 +192,7 @@ public String applicationName() { /** * Get the subscriptionId property: The subscription of the Application Insights component. - * + * * @return the subscriptionId value. */ public String subscriptionId() { @@ -197,7 +201,7 @@ public String subscriptionId() { /** * Get the resourceGroup property: The resource group of the Application Insights component. - * + * * @return the resourceGroup value. */ public String resourceGroup() { @@ -206,7 +210,7 @@ public String resourceGroup() { /** * Get the destinationStorageSubscriptionId property: The destination storage account subscription ID. - * + * * @return the destinationStorageSubscriptionId value. */ public String destinationStorageSubscriptionId() { @@ -215,7 +219,7 @@ public String destinationStorageSubscriptionId() { /** * Get the destinationStorageLocationId property: The destination account location ID. - * + * * @return the destinationStorageLocationId value. */ public String destinationStorageLocationId() { @@ -224,7 +228,7 @@ public String destinationStorageLocationId() { /** * Get the destinationAccountId property: The name of destination account. - * + * * @return the destinationAccountId value. */ public String destinationAccountId() { @@ -233,7 +237,7 @@ public String destinationAccountId() { /** * Get the destinationType property: The destination type. - * + * * @return the destinationType value. */ public String destinationType() { @@ -243,7 +247,7 @@ public String destinationType() { /** * Get the isUserEnabled property: This will be 'true' if the Continuous Export configuration is enabled, otherwise * it will be 'false'. - * + * * @return the isUserEnabled value. */ public String isUserEnabled() { @@ -252,7 +256,7 @@ public String isUserEnabled() { /** * Get the lastUserUpdate property: Last time the Continuous Export configuration was updated. - * + * * @return the lastUserUpdate value. */ public String lastUserUpdate() { @@ -261,7 +265,7 @@ public String lastUserUpdate() { /** * Get the notificationQueueEnabled property: Deprecated. - * + * * @return the notificationQueueEnabled value. */ public String notificationQueueEnabled() { @@ -270,20 +274,20 @@ public String notificationQueueEnabled() { /** * Set the notificationQueueEnabled property: Deprecated. - * + * * @param notificationQueueEnabled the notificationQueueEnabled value to set. * @return the ApplicationInsightsComponentExportConfigurationInner object itself. */ - public ApplicationInsightsComponentExportConfigurationInner withNotificationQueueEnabled( - String notificationQueueEnabled) { + 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'. - * + * Get the exportStatus property: This indicates current Continuous Export configuration status. The possible + * values are 'Preparing', 'Success', 'Failure'. + * * @return the exportStatus value. */ public String exportStatus() { @@ -293,7 +297,7 @@ public String exportStatus() { /** * Get the lastSuccessTime property: The last time data was successfully delivered to the destination storage * container for this Continuous Export configuration. - * + * * @return the lastSuccessTime value. */ public String lastSuccessTime() { @@ -302,7 +306,7 @@ public String lastSuccessTime() { /** * Get the lastGapTime property: The last time the Continuous Export configuration started failing. - * + * * @return the lastGapTime value. */ public String lastGapTime() { @@ -310,9 +314,9 @@ public String lastGapTime() { } /** - * Get the permanentErrorReason property: This is the reason the Continuous Export configuration started failing. It - * can be 'AzureStorageNotFound' or 'AzureStorageAccessDenied'. - * + * Get the permanentErrorReason property: This is the reason the Continuous Export configuration started failing. + * It can be 'AzureStorageNotFound' or 'AzureStorageAccessDenied'. + * * @return the permanentErrorReason value. */ public String permanentErrorReason() { @@ -321,7 +325,7 @@ public String permanentErrorReason() { /** * Get the storageName property: The name of the destination storage account. - * + * * @return the storageName value. */ public String storageName() { @@ -330,7 +334,7 @@ public String storageName() { /** * Get the containerName property: The name of the destination storage container. - * + * * @return the containerName value. */ public String containerName() { @@ -339,7 +343,7 @@ public String containerName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java index 9b1f710e7a0f1..fd91c83cb42e6 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties that define a favorite that is associated to an Application Insights component. */ +/** + * Properties that define a favorite that is associated to an Application Insights component. + */ @Fluent public final class ApplicationInsightsComponentFavoriteInner { /* @@ -81,13 +83,15 @@ public final class ApplicationInsightsComponentFavoriteInner { @JsonProperty(value = "UserId", access = JsonProperty.Access.WRITE_ONLY) private String userId; - /** Creates an instance of ApplicationInsightsComponentFavoriteInner class. */ + /** + * Creates an instance of ApplicationInsightsComponentFavoriteInner class. + */ public ApplicationInsightsComponentFavoriteInner() { } /** * Get the name property: The user-defined name of the favorite. - * + * * @return the name value. */ public String name() { @@ -96,7 +100,7 @@ public String name() { /** * Set the name property: The user-defined name of the favorite. - * + * * @param name the name value to set. * @return the ApplicationInsightsComponentFavoriteInner object itself. */ @@ -108,7 +112,7 @@ public ApplicationInsightsComponentFavoriteInner withName(String name) { /** * Get the config property: Configuration of this particular favorite, which are driven by the Azure portal UX. * Configuration data is a string containing valid JSON. - * + * * @return the config value. */ public String config() { @@ -118,7 +122,7 @@ public String config() { /** * Set the config property: Configuration of this particular favorite, which are driven by the Azure portal UX. * Configuration data is a string containing valid JSON. - * + * * @param config the config value to set. * @return the ApplicationInsightsComponentFavoriteInner object itself. */ @@ -130,7 +134,7 @@ public ApplicationInsightsComponentFavoriteInner withConfig(String config) { /** * Get the version property: This instance's version of the data model. This can change as new features are added * that can be marked favorite. Current examples include MetricsExplorer (ME) and Search. - * + * * @return the version value. */ public String version() { @@ -140,7 +144,7 @@ public String version() { /** * Set the version property: This instance's version of the data model. This can change as new features are added * that can be marked favorite. Current examples include MetricsExplorer (ME) and Search. - * + * * @param version the version value to set. * @return the ApplicationInsightsComponentFavoriteInner object itself. */ @@ -151,7 +155,7 @@ public ApplicationInsightsComponentFavoriteInner withVersion(String version) { /** * Get the favoriteId property: Internally assigned unique id of the favorite definition. - * + * * @return the favoriteId value. */ public String favoriteId() { @@ -161,7 +165,7 @@ public String favoriteId() { /** * Get the favoriteType property: Enum indicating if this favorite definition is owned by a specific user or is * shared between all users with access to the Application Insights component. - * + * * @return the favoriteType value. */ public FavoriteType favoriteType() { @@ -171,7 +175,7 @@ public FavoriteType favoriteType() { /** * Set the favoriteType property: Enum indicating if this favorite definition is owned by a specific user or is * shared between all users with access to the Application Insights component. - * + * * @param favoriteType the favoriteType value to set. * @return the ApplicationInsightsComponentFavoriteInner object itself. */ @@ -182,7 +186,7 @@ public ApplicationInsightsComponentFavoriteInner withFavoriteType(FavoriteType f /** * Get the sourceType property: The source of the favorite definition. - * + * * @return the sourceType value. */ public String sourceType() { @@ -191,7 +195,7 @@ public String sourceType() { /** * Set the sourceType property: The source of the favorite definition. - * + * * @param sourceType the sourceType value to set. * @return the ApplicationInsightsComponentFavoriteInner object itself. */ @@ -203,7 +207,7 @@ public ApplicationInsightsComponentFavoriteInner withSourceType(String sourceTyp /** * Get the timeModified property: Date and time in UTC of the last modification that was made to this favorite * definition. - * + * * @return the timeModified value. */ public String timeModified() { @@ -212,7 +216,7 @@ public String timeModified() { /** * Get the tags property: A list of 0 or more tags that are associated with this favorite definition. - * + * * @return the tags value. */ public List tags() { @@ -221,7 +225,7 @@ public List tags() { /** * Set the tags property: A list of 0 or more tags that are associated with this favorite definition. - * + * * @param tags the tags value to set. * @return the ApplicationInsightsComponentFavoriteInner object itself. */ @@ -232,7 +236,7 @@ public ApplicationInsightsComponentFavoriteInner withTags(List tags) { /** * Get the category property: Favorite category, as defined by the user at creation time. - * + * * @return the category value. */ public String category() { @@ -241,7 +245,7 @@ public String category() { /** * Set the category property: Favorite category, as defined by the user at creation time. - * + * * @param category the category value to set. * @return the ApplicationInsightsComponentFavoriteInner object itself. */ @@ -253,7 +257,7 @@ public ApplicationInsightsComponentFavoriteInner withCategory(String category) { /** * Get the isGeneratedFromTemplate property: Flag denoting wether or not this favorite was generated from a * template. - * + * * @return the isGeneratedFromTemplate value. */ public Boolean isGeneratedFromTemplate() { @@ -263,7 +267,7 @@ public Boolean isGeneratedFromTemplate() { /** * Set the isGeneratedFromTemplate property: Flag denoting wether or not this favorite was generated from a * template. - * + * * @param isGeneratedFromTemplate the isGeneratedFromTemplate value to set. * @return the ApplicationInsightsComponentFavoriteInner object itself. */ @@ -274,7 +278,7 @@ public ApplicationInsightsComponentFavoriteInner withIsGeneratedFromTemplate(Boo /** * Get the userId property: Unique user id of the specific user that owns this favorite. - * + * * @return the userId value. */ public String userId() { @@ -283,7 +287,7 @@ public String userId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java index cfb116faf3120..0a5c8c493ea49 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** An Application Insights component feature capabilities. */ +/** + * An Application Insights component feature capabilities. + */ @Immutable public final class ApplicationInsightsComponentFeatureCapabilitiesInner { /* @@ -106,13 +108,15 @@ public final class ApplicationInsightsComponentFeatureCapabilitiesInner { @JsonProperty(value = "ThrottleRate", access = JsonProperty.Access.WRITE_ONLY) private Float throttleRate; - /** Creates an instance of ApplicationInsightsComponentFeatureCapabilitiesInner class. */ + /** + * Creates an instance of ApplicationInsightsComponentFeatureCapabilitiesInner class. + */ public ApplicationInsightsComponentFeatureCapabilitiesInner() { } /** * Get the supportExportData property: Whether allow to use continuous export feature. - * + * * @return the supportExportData value. */ public Boolean supportExportData() { @@ -121,7 +125,7 @@ public Boolean supportExportData() { /** * Get the burstThrottlePolicy property: Reserved, not used now. - * + * * @return the burstThrottlePolicy value. */ public String burstThrottlePolicy() { @@ -130,7 +134,7 @@ public String burstThrottlePolicy() { /** * Get the metadataClass property: Reserved, not used now. - * + * * @return the metadataClass value. */ public String metadataClass() { @@ -139,7 +143,7 @@ public String metadataClass() { /** * Get the liveStreamMetrics property: Reserved, not used now. - * + * * @return the liveStreamMetrics value. */ public Boolean liveStreamMetrics() { @@ -148,7 +152,7 @@ public Boolean liveStreamMetrics() { /** * Get the applicationMap property: Reserved, not used now. - * + * * @return the applicationMap value. */ public Boolean applicationMap() { @@ -157,7 +161,7 @@ public Boolean applicationMap() { /** * Get the workItemIntegration property: Whether allow to use work item integration feature. - * + * * @return the workItemIntegration value. */ public Boolean workItemIntegration() { @@ -166,7 +170,7 @@ public Boolean workItemIntegration() { /** * Get the powerBIIntegration property: Reserved, not used now. - * + * * @return the powerBIIntegration value. */ public Boolean powerBIIntegration() { @@ -175,7 +179,7 @@ public Boolean powerBIIntegration() { /** * Get the openSchema property: Reserved, not used now. - * + * * @return the openSchema value. */ public Boolean openSchema() { @@ -184,7 +188,7 @@ public Boolean openSchema() { /** * Get the proactiveDetection property: Reserved, not used now. - * + * * @return the proactiveDetection value. */ public Boolean proactiveDetection() { @@ -193,7 +197,7 @@ public Boolean proactiveDetection() { /** * Get the analyticsIntegration property: Reserved, not used now. - * + * * @return the analyticsIntegration value. */ public Boolean analyticsIntegration() { @@ -202,7 +206,7 @@ public Boolean analyticsIntegration() { /** * Get the multipleStepWebTest property: Whether allow to use multiple steps web test feature. - * + * * @return the multipleStepWebTest value. */ public Boolean multipleStepWebTest() { @@ -211,7 +215,7 @@ public Boolean multipleStepWebTest() { /** * Get the apiAccessLevel property: Reserved, not used now. - * + * * @return the apiAccessLevel value. */ public String apiAccessLevel() { @@ -220,7 +224,7 @@ public String apiAccessLevel() { /** * Get the trackingType property: The application insights component used tracking type. - * + * * @return the trackingType value. */ public String trackingType() { @@ -229,7 +233,7 @@ public String trackingType() { /** * Get the dailyCap property: Daily data volume cap in GB. - * + * * @return the dailyCap value. */ public Float dailyCap() { @@ -238,7 +242,7 @@ public Float dailyCap() { /** * Get the dailyCapResetTime property: Daily data volume cap UTC reset hour. - * + * * @return the dailyCapResetTime value. */ public Float dailyCapResetTime() { @@ -247,7 +251,7 @@ public Float dailyCapResetTime() { /** * Get the throttleRate property: Reserved, not used now. - * + * * @return the throttleRate value. */ public Float throttleRate() { @@ -256,7 +260,7 @@ public Float throttleRate() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentInner.java index ea5812477ea3f..dd8d4597148c8 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 @@ -18,7 +18,9 @@ import java.util.List; import java.util.Map; -/** An Application Insights component definition. */ +/** + * An Application Insights component definition. + */ @Fluent public final class ApplicationInsightsComponentInner extends ComponentsResource { /* @@ -40,14 +42,16 @@ public final class ApplicationInsightsComponentInner extends ComponentsResource @JsonProperty(value = "properties") private ApplicationInsightsComponentProperties innerProperties; - /** Creates an instance of ApplicationInsightsComponentInner class. */ + /** + * Creates an instance of ApplicationInsightsComponentInner class. + */ public ApplicationInsightsComponentInner() { } /** - * Get the kind property: The kind of application that this component refers to, used to customize UI. This value is - * a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. - * + * Get the kind property: The kind of application that this component refers to, used to customize UI. This value + * is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. + * * @return the kind value. */ public String kind() { @@ -55,9 +59,9 @@ public String kind() { } /** - * Set the kind property: The kind of application that this component refers to, used to customize UI. This value is - * a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. - * + * Set the kind property: The kind of application that this component refers to, used to customize UI. This value + * is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. + * * @param kind the kind value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -68,7 +72,7 @@ public ApplicationInsightsComponentInner withKind(String kind) { /** * Get the etag property: Resource etag. - * + * * @return the etag value. */ public String etag() { @@ -77,7 +81,7 @@ public String etag() { /** * Set the etag property: Resource etag. - * + * * @param etag the etag value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -88,21 +92,25 @@ public ApplicationInsightsComponentInner withEtag(String etag) { /** * Get the innerProperties property: Properties that define an Application Insights component resource. - * + * * @return the innerProperties value. */ private ApplicationInsightsComponentProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ApplicationInsightsComponentInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ApplicationInsightsComponentInner withTags(Map tags) { super.withTags(tags); @@ -110,9 +118,9 @@ public ApplicationInsightsComponentInner withTags(Map tags) { } /** - * Get the applicationId property: The unique ID of your application. This field mirrors the 'Name' field and cannot - * be changed. - * + * Get the applicationId property: The unique ID of your application. This field mirrors the 'Name' field and + * cannot be changed. + * * @return the applicationId value. */ public String applicationId() { @@ -121,7 +129,7 @@ public String applicationId() { /** * Get the appId property: Application Insights Unique ID for your Application. - * + * * @return the appId value. */ public String appId() { @@ -130,7 +138,7 @@ public String appId() { /** * Get the name property: Application name. - * + * * @return the name value. */ public String namePropertiesName() { @@ -139,7 +147,7 @@ public String namePropertiesName() { /** * Get the applicationType property: Type of application being monitored. - * + * * @return the applicationType value. */ public ApplicationType applicationType() { @@ -148,7 +156,7 @@ public ApplicationType applicationType() { /** * Set the applicationType property: Type of application being monitored. - * + * * @param applicationType the applicationType value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -163,7 +171,7 @@ public ApplicationInsightsComponentInner withApplicationType(ApplicationType app /** * Get the flowType property: Used by the Application Insights system to determine what kind of flow this component * was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. - * + * * @return the flowType value. */ public FlowType flowType() { @@ -173,7 +181,7 @@ public FlowType flowType() { /** * Set the flowType property: Used by the Application Insights system to determine what kind of flow this component * was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. - * + * * @param flowType the flowType value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -188,7 +196,7 @@ public ApplicationInsightsComponentInner withFlowType(FlowType flowType) { /** * Get the requestSource property: Describes what tool created this Application Insights component. Customers using * this API should set this to the default 'rest'. - * + * * @return the requestSource value. */ public RequestSource requestSource() { @@ -198,7 +206,7 @@ public RequestSource requestSource() { /** * Set the requestSource property: Describes what tool created this Application Insights component. Customers using * this API should set this to the default 'rest'. - * + * * @param requestSource the requestSource value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -212,9 +220,9 @@ public ApplicationInsightsComponentInner withRequestSource(RequestSource request /** * Get the instrumentationKey property: Application Insights Instrumentation key. A read-only value that - * applications can use to identify the destination for all telemetry sent to Azure Application Insights. This value - * will be supplied upon construction of each new Application Insights component. - * + * applications can use to identify the destination for all telemetry sent to Azure Application Insights. This + * value will be supplied upon construction of each new Application Insights component. + * * @return the instrumentationKey value. */ public String instrumentationKey() { @@ -223,7 +231,7 @@ public String instrumentationKey() { /** * Get the creationDate property: Creation Date for the Application Insights component, in ISO 8601 format. - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -232,7 +240,7 @@ public OffsetDateTime creationDate() { /** * Get the tenantId property: Azure Tenant Id. - * + * * @return the tenantId value. */ public String tenantId() { @@ -242,7 +250,7 @@ public String tenantId() { /** * Get the hockeyAppId property: The unique application ID created when a new application is added to HockeyApp, * used for communications with HockeyApp. - * + * * @return the hockeyAppId value. */ public String hockeyAppId() { @@ -252,7 +260,7 @@ public String hockeyAppId() { /** * Set the hockeyAppId property: The unique application ID created when a new application is added to HockeyApp, * used for communications with HockeyApp. - * + * * @param hockeyAppId the hockeyAppId value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -267,7 +275,7 @@ public ApplicationInsightsComponentInner withHockeyAppId(String hockeyAppId) { /** * Get the hockeyAppToken property: Token used to authenticate communications with between Application Insights and * HockeyApp. - * + * * @return the hockeyAppToken value. */ public String hockeyAppToken() { @@ -276,9 +284,9 @@ public String hockeyAppToken() { /** * Get the provisioningState property: Current state of this component: whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value but are able to read from it. Values will - * include Succeeded, Deploying, Canceled, and Failed. - * + * within the resource group it is defined. Users cannot change this value but are able to read from it. Values + * will include Succeeded, Deploying, Canceled, and Failed. + * * @return the provisioningState value. */ public String provisioningState() { @@ -288,7 +296,7 @@ public String provisioningState() { /** * Get the samplingPercentage property: Percentage of the data produced by the application being monitored that is * being sampled for Application Insights telemetry. - * + * * @return the samplingPercentage value. */ public Double samplingPercentage() { @@ -298,7 +306,7 @@ public Double samplingPercentage() { /** * Set the samplingPercentage property: Percentage of the data produced by the application being monitored that is * being sampled for Application Insights telemetry. - * + * * @param samplingPercentage the samplingPercentage value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -312,7 +320,7 @@ public ApplicationInsightsComponentInner withSamplingPercentage(Double samplingP /** * Get the connectionString property: Application Insights component connection string. - * + * * @return the connectionString value. */ public String connectionString() { @@ -321,7 +329,7 @@ public String connectionString() { /** * Get the retentionInDays property: Retention period in days. - * + * * @return the retentionInDays value. */ public Integer retentionInDays() { @@ -330,7 +338,7 @@ public Integer retentionInDays() { /** * Set the retentionInDays property: Retention period in days. - * + * * @param retentionInDays the retentionInDays value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -344,7 +352,7 @@ public ApplicationInsightsComponentInner withRetentionInDays(Integer retentionIn /** * Get the disableIpMasking property: Disable IP masking. - * + * * @return the disableIpMasking value. */ public Boolean disableIpMasking() { @@ -353,7 +361,7 @@ public Boolean disableIpMasking() { /** * Set the disableIpMasking property: Disable IP masking. - * + * * @param disableIpMasking the disableIpMasking value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -367,7 +375,7 @@ public ApplicationInsightsComponentInner withDisableIpMasking(Boolean disableIpM /** * Get the immediatePurgeDataOn30Days property: Purge data immediately after 30 days. - * + * * @return the immediatePurgeDataOn30Days value. */ public Boolean immediatePurgeDataOn30Days() { @@ -376,7 +384,7 @@ public Boolean immediatePurgeDataOn30Days() { /** * Set the immediatePurgeDataOn30Days property: Purge data immediately after 30 days. - * + * * @param immediatePurgeDataOn30Days the immediatePurgeDataOn30Days value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -392,7 +400,7 @@ public ApplicationInsightsComponentInner withImmediatePurgeDataOn30Days(Boolean * Get the workspaceResourceId property: Resource Id of the log analytics workspace which the data will be ingested * to. This property is required to create an application with this API version. Applications from older versions * will not have this property. - * + * * @return the workspaceResourceId value. */ public String workspaceResourceId() { @@ -403,7 +411,7 @@ public String workspaceResourceId() { * Set the workspaceResourceId property: Resource Id of the log analytics workspace which the data will be ingested * to. This property is required to create an application with this API version. Applications from older versions * will not have this property. - * + * * @param workspaceResourceId the workspaceResourceId value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -417,7 +425,7 @@ public ApplicationInsightsComponentInner withWorkspaceResourceId(String workspac /** * Get the laMigrationDate property: The date which the component got migrated to LA, in ISO 8601 format. - * + * * @return the laMigrationDate value. */ public OffsetDateTime laMigrationDate() { @@ -426,7 +434,7 @@ public OffsetDateTime laMigrationDate() { /** * Get the privateLinkScopedResources property: List of linked private link scope resources. - * + * * @return the privateLinkScopedResources value. */ public List privateLinkScopedResources() { @@ -436,7 +444,7 @@ public List privateLinkScopedResources() { /** * Get the publicNetworkAccessForIngestion property: The network access type for accessing Application Insights * ingestion. - * + * * @return the publicNetworkAccessForIngestion value. */ public PublicNetworkAccessType publicNetworkAccessForIngestion() { @@ -446,12 +454,12 @@ public PublicNetworkAccessType publicNetworkAccessForIngestion() { /** * Set the publicNetworkAccessForIngestion property: The network access type for accessing Application Insights * ingestion. - * + * * @param publicNetworkAccessForIngestion the publicNetworkAccessForIngestion value to set. * @return the ApplicationInsightsComponentInner object itself. */ - public ApplicationInsightsComponentInner withPublicNetworkAccessForIngestion( - PublicNetworkAccessType publicNetworkAccessForIngestion) { + public ApplicationInsightsComponentInner + withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion) { if (this.innerProperties() == null) { this.innerProperties = new ApplicationInsightsComponentProperties(); } @@ -461,7 +469,7 @@ public ApplicationInsightsComponentInner withPublicNetworkAccessForIngestion( /** * Get the publicNetworkAccessForQuery property: The network access type for accessing Application Insights query. - * + * * @return the publicNetworkAccessForQuery value. */ public PublicNetworkAccessType publicNetworkAccessForQuery() { @@ -470,12 +478,12 @@ public PublicNetworkAccessType publicNetworkAccessForQuery() { /** * Set the publicNetworkAccessForQuery property: The network access type for accessing Application Insights query. - * + * * @param publicNetworkAccessForQuery the publicNetworkAccessForQuery value to set. * @return the ApplicationInsightsComponentInner object itself. */ - public ApplicationInsightsComponentInner withPublicNetworkAccessForQuery( - PublicNetworkAccessType publicNetworkAccessForQuery) { + public ApplicationInsightsComponentInner + withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery) { if (this.innerProperties() == null) { this.innerProperties = new ApplicationInsightsComponentProperties(); } @@ -485,7 +493,7 @@ public ApplicationInsightsComponentInner withPublicNetworkAccessForQuery( /** * Get the ingestionMode property: Indicates the flow of the ingestion. - * + * * @return the ingestionMode value. */ public IngestionMode ingestionMode() { @@ -494,7 +502,7 @@ public IngestionMode ingestionMode() { /** * Set the ingestionMode property: Indicates the flow of the ingestion. - * + * * @param ingestionMode the ingestionMode value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -508,7 +516,7 @@ public ApplicationInsightsComponentInner withIngestionMode(IngestionMode ingesti /** * Get the disableLocalAuth property: Disable Non-AAD based Auth. - * + * * @return the disableLocalAuth value. */ public Boolean disableLocalAuth() { @@ -517,7 +525,7 @@ public Boolean disableLocalAuth() { /** * Set the disableLocalAuth property: Disable Non-AAD based Auth. - * + * * @param disableLocalAuth the disableLocalAuth value to set. * @return the ApplicationInsightsComponentInner object itself. */ @@ -532,7 +540,7 @@ public ApplicationInsightsComponentInner withDisableLocalAuth(Boolean disableLoc /** * Get the forceCustomerStorageForProfiler property: Force users to create their own storage account for profiler * and debugger. - * + * * @return the forceCustomerStorageForProfiler value. */ public Boolean forceCustomerStorageForProfiler() { @@ -542,12 +550,12 @@ public Boolean forceCustomerStorageForProfiler() { /** * Set the forceCustomerStorageForProfiler property: Force users to create their own storage account for profiler * and debugger. - * + * * @param forceCustomerStorageForProfiler the forceCustomerStorageForProfiler value to set. * @return the ApplicationInsightsComponentInner object itself. */ - public ApplicationInsightsComponentInner withForceCustomerStorageForProfiler( - Boolean forceCustomerStorageForProfiler) { + public ApplicationInsightsComponentInner + withForceCustomerStorageForProfiler(Boolean forceCustomerStorageForProfiler) { if (this.innerProperties() == null) { this.innerProperties = new ApplicationInsightsComponentProperties(); } @@ -557,17 +565,15 @@ public ApplicationInsightsComponentInner withForceCustomerStorageForProfiler( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (kind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kind in model ApplicationInsightsComponentInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property kind in model ApplicationInsightsComponentInner")); } if (innerProperties() != null) { innerProperties().validate(); 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 5d85a2959967c..3805e6cec663c 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties that define a ProactiveDetection configuration. */ +/** + * Properties that define a ProactiveDetection configuration. + */ @Fluent public final class ApplicationInsightsComponentProactiveDetectionConfigurationInner { /* @@ -48,13 +50,15 @@ public final class ApplicationInsightsComponentProactiveDetectionConfigurationIn @JsonProperty(value = "RuleDefinitions") private ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions ruleDefinitions; - /** Creates an instance of ApplicationInsightsComponentProactiveDetectionConfigurationInner class. */ + /** + * Creates an instance of ApplicationInsightsComponentProactiveDetectionConfigurationInner class. + */ public ApplicationInsightsComponentProactiveDetectionConfigurationInner() { } /** * Get the name property: The rule name. - * + * * @return the name value. */ public String name() { @@ -63,7 +67,7 @@ public String name() { /** * Set the name property: The rule name. - * + * * @param name the name value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. */ @@ -74,7 +78,7 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationInner withName /** * Get the enabled property: A flag that indicates whether this rule is enabled by the user. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -83,7 +87,7 @@ public Boolean enabled() { /** * Set the enabled property: A flag that indicates whether this rule is enabled by the user. - * + * * @param enabled the enabled value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. */ @@ -95,7 +99,7 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationInner withEnab /** * Get the sendEmailsToSubscriptionOwners property: A flag that indicated whether notifications on this rule should * be sent to subscription owners. - * + * * @return the sendEmailsToSubscriptionOwners value. */ public Boolean sendEmailsToSubscriptionOwners() { @@ -105,19 +109,19 @@ public Boolean sendEmailsToSubscriptionOwners() { /** * Set the sendEmailsToSubscriptionOwners property: A flag that indicated whether notifications on this rule should * be sent to subscription owners. - * + * * @param sendEmailsToSubscriptionOwners the sendEmailsToSubscriptionOwners value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. */ - public ApplicationInsightsComponentProactiveDetectionConfigurationInner withSendEmailsToSubscriptionOwners( - Boolean sendEmailsToSubscriptionOwners) { + public ApplicationInsightsComponentProactiveDetectionConfigurationInner + withSendEmailsToSubscriptionOwners(Boolean sendEmailsToSubscriptionOwners) { this.sendEmailsToSubscriptionOwners = sendEmailsToSubscriptionOwners; return this; } /** * Get the customEmails property: Custom email addresses for this rule notifications. - * + * * @return the customEmails value. */ public List customEmails() { @@ -126,19 +130,19 @@ public List customEmails() { /** * Set the customEmails property: Custom email addresses for this rule notifications. - * + * * @param customEmails the customEmails value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. */ - public ApplicationInsightsComponentProactiveDetectionConfigurationInner withCustomEmails( - List customEmails) { + public ApplicationInsightsComponentProactiveDetectionConfigurationInner + withCustomEmails(List customEmails) { this.customEmails = customEmails; return this; } /** * Get the lastUpdatedTime property: The last time this rule was updated. - * + * * @return the lastUpdatedTime value. */ public String lastUpdatedTime() { @@ -147,12 +151,12 @@ public String lastUpdatedTime() { /** * Set the lastUpdatedTime property: The last time this rule was updated. - * + * * @param lastUpdatedTime the lastUpdatedTime value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. */ - public ApplicationInsightsComponentProactiveDetectionConfigurationInner withLastUpdatedTime( - String lastUpdatedTime) { + public ApplicationInsightsComponentProactiveDetectionConfigurationInner + withLastUpdatedTime(String lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; return this; } @@ -160,7 +164,7 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationInner withLast /** * Get the ruleDefinitions property: Static definitions of the ProactiveDetection configuration rule (same values * for all components). - * + * * @return the ruleDefinitions value. */ public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions ruleDefinitions() { @@ -170,7 +174,7 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinition /** * Set the ruleDefinitions property: Static definitions of the ProactiveDetection configuration rule (same values * for all components). - * + * * @param ruleDefinitions the ruleDefinitions value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. */ @@ -182,7 +186,7 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationInner withRule /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java index 556d4e0ca95fe..cac345028ea93 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 @@ -16,7 +16,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Properties that define an Application Insights component resource. */ +/** + * Properties that define an Application Insights component resource. + */ @Fluent public final class ApplicationInsightsComponentProperties { /* @@ -178,14 +180,16 @@ public final class ApplicationInsightsComponentProperties { @JsonProperty(value = "ForceCustomerStorageForProfiler") private Boolean forceCustomerStorageForProfiler; - /** Creates an instance of ApplicationInsightsComponentProperties class. */ + /** + * Creates an instance of ApplicationInsightsComponentProperties class. + */ public ApplicationInsightsComponentProperties() { } /** - * Get the applicationId property: The unique ID of your application. This field mirrors the 'Name' field and cannot - * be changed. - * + * Get the applicationId property: The unique ID of your application. This field mirrors the 'Name' field and + * cannot be changed. + * * @return the applicationId value. */ public String applicationId() { @@ -194,7 +198,7 @@ public String applicationId() { /** * Get the appId property: Application Insights Unique ID for your Application. - * + * * @return the appId value. */ public String appId() { @@ -203,7 +207,7 @@ public String appId() { /** * Get the name property: Application name. - * + * * @return the name value. */ public String name() { @@ -212,7 +216,7 @@ public String name() { /** * Get the applicationType property: Type of application being monitored. - * + * * @return the applicationType value. */ public ApplicationType applicationType() { @@ -221,7 +225,7 @@ public ApplicationType applicationType() { /** * Set the applicationType property: Type of application being monitored. - * + * * @param applicationType the applicationType value to set. * @return the ApplicationInsightsComponentProperties object itself. */ @@ -233,7 +237,7 @@ public ApplicationInsightsComponentProperties withApplicationType(ApplicationTyp /** * Get the flowType property: Used by the Application Insights system to determine what kind of flow this component * was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. - * + * * @return the flowType value. */ public FlowType flowType() { @@ -243,7 +247,7 @@ public FlowType flowType() { /** * Set the flowType property: Used by the Application Insights system to determine what kind of flow this component * was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. - * + * * @param flowType the flowType value to set. * @return the ApplicationInsightsComponentProperties object itself. */ @@ -255,7 +259,7 @@ public ApplicationInsightsComponentProperties withFlowType(FlowType flowType) { /** * Get the requestSource property: Describes what tool created this Application Insights component. Customers using * this API should set this to the default 'rest'. - * + * * @return the requestSource value. */ public RequestSource requestSource() { @@ -265,7 +269,7 @@ public RequestSource requestSource() { /** * Set the requestSource property: Describes what tool created this Application Insights component. Customers using * this API should set this to the default 'rest'. - * + * * @param requestSource the requestSource value to set. * @return the ApplicationInsightsComponentProperties object itself. */ @@ -276,9 +280,9 @@ public ApplicationInsightsComponentProperties withRequestSource(RequestSource re /** * Get the instrumentationKey property: Application Insights Instrumentation key. A read-only value that - * applications can use to identify the destination for all telemetry sent to Azure Application Insights. This value - * will be supplied upon construction of each new Application Insights component. - * + * applications can use to identify the destination for all telemetry sent to Azure Application Insights. This + * value will be supplied upon construction of each new Application Insights component. + * * @return the instrumentationKey value. */ public String instrumentationKey() { @@ -287,7 +291,7 @@ public String instrumentationKey() { /** * Get the creationDate property: Creation Date for the Application Insights component, in ISO 8601 format. - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -296,7 +300,7 @@ public OffsetDateTime creationDate() { /** * Get the tenantId property: Azure Tenant Id. - * + * * @return the tenantId value. */ public String tenantId() { @@ -306,7 +310,7 @@ public String tenantId() { /** * Get the hockeyAppId property: The unique application ID created when a new application is added to HockeyApp, * used for communications with HockeyApp. - * + * * @return the hockeyAppId value. */ public String hockeyAppId() { @@ -316,7 +320,7 @@ public String hockeyAppId() { /** * Set the hockeyAppId property: The unique application ID created when a new application is added to HockeyApp, * used for communications with HockeyApp. - * + * * @param hockeyAppId the hockeyAppId value to set. * @return the ApplicationInsightsComponentProperties object itself. */ @@ -328,7 +332,7 @@ public ApplicationInsightsComponentProperties withHockeyAppId(String hockeyAppId /** * Get the hockeyAppToken property: Token used to authenticate communications with between Application Insights and * HockeyApp. - * + * * @return the hockeyAppToken value. */ public String hockeyAppToken() { @@ -337,9 +341,9 @@ public String hockeyAppToken() { /** * Get the provisioningState property: Current state of this component: whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value but are able to read from it. Values will - * include Succeeded, Deploying, Canceled, and Failed. - * + * within the resource group it is defined. Users cannot change this value but are able to read from it. Values + * will include Succeeded, Deploying, Canceled, and Failed. + * * @return the provisioningState value. */ public String provisioningState() { @@ -349,7 +353,7 @@ public String provisioningState() { /** * Get the samplingPercentage property: Percentage of the data produced by the application being monitored that is * being sampled for Application Insights telemetry. - * + * * @return the samplingPercentage value. */ public Double samplingPercentage() { @@ -359,7 +363,7 @@ public Double samplingPercentage() { /** * Set the samplingPercentage property: Percentage of the data produced by the application being monitored that is * being sampled for Application Insights telemetry. - * + * * @param samplingPercentage the samplingPercentage value to set. * @return the ApplicationInsightsComponentProperties object itself. */ @@ -370,7 +374,7 @@ public ApplicationInsightsComponentProperties withSamplingPercentage(Double samp /** * Get the connectionString property: Application Insights component connection string. - * + * * @return the connectionString value. */ public String connectionString() { @@ -379,7 +383,7 @@ public String connectionString() { /** * Get the retentionInDays property: Retention period in days. - * + * * @return the retentionInDays value. */ public Integer retentionInDays() { @@ -388,7 +392,7 @@ public Integer retentionInDays() { /** * Set the retentionInDays property: Retention period in days. - * + * * @param retentionInDays the retentionInDays value to set. * @return the ApplicationInsightsComponentProperties object itself. */ @@ -399,7 +403,7 @@ public ApplicationInsightsComponentProperties withRetentionInDays(Integer retent /** * Get the disableIpMasking property: Disable IP masking. - * + * * @return the disableIpMasking value. */ public Boolean disableIpMasking() { @@ -408,7 +412,7 @@ public Boolean disableIpMasking() { /** * Set the disableIpMasking property: Disable IP masking. - * + * * @param disableIpMasking the disableIpMasking value to set. * @return the ApplicationInsightsComponentProperties object itself. */ @@ -419,7 +423,7 @@ public ApplicationInsightsComponentProperties withDisableIpMasking(Boolean disab /** * Get the immediatePurgeDataOn30Days property: Purge data immediately after 30 days. - * + * * @return the immediatePurgeDataOn30Days value. */ public Boolean immediatePurgeDataOn30Days() { @@ -428,7 +432,7 @@ public Boolean immediatePurgeDataOn30Days() { /** * Set the immediatePurgeDataOn30Days property: Purge data immediately after 30 days. - * + * * @param immediatePurgeDataOn30Days the immediatePurgeDataOn30Days value to set. * @return the ApplicationInsightsComponentProperties object itself. */ @@ -441,7 +445,7 @@ public ApplicationInsightsComponentProperties withImmediatePurgeDataOn30Days(Boo * Get the workspaceResourceId property: Resource Id of the log analytics workspace which the data will be ingested * to. This property is required to create an application with this API version. Applications from older versions * will not have this property. - * + * * @return the workspaceResourceId value. */ public String workspaceResourceId() { @@ -452,7 +456,7 @@ public String workspaceResourceId() { * Set the workspaceResourceId property: Resource Id of the log analytics workspace which the data will be ingested * to. This property is required to create an application with this API version. Applications from older versions * will not have this property. - * + * * @param workspaceResourceId the workspaceResourceId value to set. * @return the ApplicationInsightsComponentProperties object itself. */ @@ -463,7 +467,7 @@ public ApplicationInsightsComponentProperties withWorkspaceResourceId(String wor /** * Get the laMigrationDate property: The date which the component got migrated to LA, in ISO 8601 format. - * + * * @return the laMigrationDate value. */ public OffsetDateTime laMigrationDate() { @@ -472,7 +476,7 @@ public OffsetDateTime laMigrationDate() { /** * Get the privateLinkScopedResources property: List of linked private link scope resources. - * + * * @return the privateLinkScopedResources value. */ public List privateLinkScopedResources() { @@ -482,7 +486,7 @@ public List privateLinkScopedResources() { /** * Get the publicNetworkAccessForIngestion property: The network access type for accessing Application Insights * ingestion. - * + * * @return the publicNetworkAccessForIngestion value. */ public PublicNetworkAccessType publicNetworkAccessForIngestion() { @@ -492,19 +496,19 @@ public PublicNetworkAccessType publicNetworkAccessForIngestion() { /** * Set the publicNetworkAccessForIngestion property: The network access type for accessing Application Insights * ingestion. - * + * * @param publicNetworkAccessForIngestion the publicNetworkAccessForIngestion value to set. * @return the ApplicationInsightsComponentProperties object itself. */ - public ApplicationInsightsComponentProperties withPublicNetworkAccessForIngestion( - PublicNetworkAccessType publicNetworkAccessForIngestion) { + public ApplicationInsightsComponentProperties + withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion) { this.publicNetworkAccessForIngestion = publicNetworkAccessForIngestion; return this; } /** * Get the publicNetworkAccessForQuery property: The network access type for accessing Application Insights query. - * + * * @return the publicNetworkAccessForQuery value. */ public PublicNetworkAccessType publicNetworkAccessForQuery() { @@ -513,19 +517,19 @@ public PublicNetworkAccessType publicNetworkAccessForQuery() { /** * Set the publicNetworkAccessForQuery property: The network access type for accessing Application Insights query. - * + * * @param publicNetworkAccessForQuery the publicNetworkAccessForQuery value to set. * @return the ApplicationInsightsComponentProperties object itself. */ - public ApplicationInsightsComponentProperties withPublicNetworkAccessForQuery( - PublicNetworkAccessType publicNetworkAccessForQuery) { + public ApplicationInsightsComponentProperties + withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery) { this.publicNetworkAccessForQuery = publicNetworkAccessForQuery; return this; } /** * Get the ingestionMode property: Indicates the flow of the ingestion. - * + * * @return the ingestionMode value. */ public IngestionMode ingestionMode() { @@ -534,7 +538,7 @@ public IngestionMode ingestionMode() { /** * Set the ingestionMode property: Indicates the flow of the ingestion. - * + * * @param ingestionMode the ingestionMode value to set. * @return the ApplicationInsightsComponentProperties object itself. */ @@ -545,7 +549,7 @@ public ApplicationInsightsComponentProperties withIngestionMode(IngestionMode in /** * Get the disableLocalAuth property: Disable Non-AAD based Auth. - * + * * @return the disableLocalAuth value. */ public Boolean disableLocalAuth() { @@ -554,7 +558,7 @@ public Boolean disableLocalAuth() { /** * Set the disableLocalAuth property: Disable Non-AAD based Auth. - * + * * @param disableLocalAuth the disableLocalAuth value to set. * @return the ApplicationInsightsComponentProperties object itself. */ @@ -566,7 +570,7 @@ public ApplicationInsightsComponentProperties withDisableLocalAuth(Boolean disab /** * Get the forceCustomerStorageForProfiler property: Force users to create their own storage account for profiler * and debugger. - * + * * @return the forceCustomerStorageForProfiler value. */ public Boolean forceCustomerStorageForProfiler() { @@ -576,27 +580,25 @@ public Boolean forceCustomerStorageForProfiler() { /** * Set the forceCustomerStorageForProfiler property: Force users to create their own storage account for profiler * and debugger. - * + * * @param forceCustomerStorageForProfiler the forceCustomerStorageForProfiler value to set. * @return the ApplicationInsightsComponentProperties object itself. */ - public ApplicationInsightsComponentProperties withForceCustomerStorageForProfiler( - Boolean forceCustomerStorageForProfiler) { + public ApplicationInsightsComponentProperties + withForceCustomerStorageForProfiler(Boolean forceCustomerStorageForProfiler) { this.forceCustomerStorageForProfiler = forceCustomerStorageForProfiler; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (applicationType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property applicationType in model ApplicationInsightsComponentProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property applicationType in model ApplicationInsightsComponentProperties")); } if (privateLinkScopedResources() != null) { privateLinkScopedResources().forEach(e -> e.validate()); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java index 82749296f2728..3a1551fb8f026 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** An Application Insights component daily data volume cap status. */ +/** + * An Application Insights component daily data volume cap status. + */ @Immutable public final class ApplicationInsightsComponentQuotaStatusInner { /* @@ -28,13 +30,15 @@ public final class ApplicationInsightsComponentQuotaStatusInner { @JsonProperty(value = "ExpirationTime", access = JsonProperty.Access.WRITE_ONLY) private String expirationTime; - /** Creates an instance of ApplicationInsightsComponentQuotaStatusInner class. */ + /** + * Creates an instance of ApplicationInsightsComponentQuotaStatusInner class. + */ public ApplicationInsightsComponentQuotaStatusInner() { } /** * Get the appId property: The Application ID for the Application Insights component. - * + * * @return the appId value. */ public String appId() { @@ -43,7 +47,7 @@ public String appId() { /** * Get the shouldBeThrottled property: The daily data volume cap is met, and data ingestion will be stopped. - * + * * @return the shouldBeThrottled value. */ public Boolean shouldBeThrottled() { @@ -53,7 +57,7 @@ public Boolean shouldBeThrottled() { /** * Get the expirationTime property: Date and time when the daily data volume cap will be reset, and data ingestion * will resume. - * + * * @return the expirationTime value. */ public String expirationTime() { @@ -62,7 +66,7 @@ public String expirationTime() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java index dd2c01d597608..9f50d583a9b75 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties that define a web test location available to an Application Insights Component. */ +/** + * Properties that define a web test location available to an Application Insights Component. + */ @Immutable public final class ApplicationInsightsComponentWebTestLocationInner { /* @@ -22,13 +24,15 @@ public final class ApplicationInsightsComponentWebTestLocationInner { @JsonProperty(value = "Tag", access = JsonProperty.Access.WRITE_ONLY) private String tag; - /** Creates an instance of ApplicationInsightsComponentWebTestLocationInner class. */ + /** + * Creates an instance of ApplicationInsightsComponentWebTestLocationInner class. + */ public ApplicationInsightsComponentWebTestLocationInner() { } /** * Get the displayName property: The display name of the web test location. - * + * * @return the displayName value. */ public String displayName() { @@ -37,7 +41,7 @@ public String displayName() { /** * Get the tag property: Internally defined geographic location tag. - * + * * @return the tag value. */ public String tag() { @@ -46,7 +50,7 @@ public String tag() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java new file mode 100644 index 0000000000000..a8a75ad74a6a6 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An Application Insights component linked storage accounts. + */ +@Fluent +public final class ComponentLinkedStorageAccountsInner extends ProxyResource { + /* + * The properties of the linked storage accounts. + */ + @JsonProperty(value = "properties") + private LinkedStorageAccountsProperties innerProperties; + + /** + * Creates an instance of ComponentLinkedStorageAccountsInner class. + */ + public ComponentLinkedStorageAccountsInner() { + } + + /** + * Get the innerProperties property: The properties of the linked storage accounts. + * + * @return the innerProperties value. + */ + private LinkedStorageAccountsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the linkedStorageAccount property: Linked storage account resource ID. + * + * @return the linkedStorageAccount value. + */ + public String linkedStorageAccount() { + return this.innerProperties() == null ? null : this.innerProperties().linkedStorageAccount(); + } + + /** + * Set the linkedStorageAccount property: Linked storage account resource ID. + * + * @param linkedStorageAccount the linkedStorageAccount value to set. + * @return the ComponentLinkedStorageAccountsInner object itself. + */ + public ComponentLinkedStorageAccountsInner withLinkedStorageAccount(String linkedStorageAccount) { + if (this.innerProperties() == null) { + this.innerProperties = new LinkedStorageAccountsProperties(); + } + this.innerProperties().withLinkedStorageAccount(linkedStorageAccount); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java index 17740139d0fb1..e71f197e3910f 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 @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Response containing operationId for a specific purge action. */ +/** + * Response containing operationId for a specific purge action. + */ @Fluent public final class ComponentPurgeResponseInner { /* @@ -17,13 +19,15 @@ public final class ComponentPurgeResponseInner { @JsonProperty(value = "operationId", required = true) private String operationId; - /** Creates an instance of ComponentPurgeResponseInner class. */ + /** + * Creates an instance of ComponentPurgeResponseInner class. + */ public ComponentPurgeResponseInner() { } /** * Get the operationId property: Id to use when querying for status for a particular purge operation. - * + * * @return the operationId value. */ public String operationId() { @@ -32,7 +36,7 @@ public String operationId() { /** * Set the operationId property: Id to use when querying for status for a particular purge operation. - * + * * @param operationId the operationId value to set. * @return the ComponentPurgeResponseInner object itself. */ @@ -43,15 +47,13 @@ public ComponentPurgeResponseInner withOperationId(String operationId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (operationId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property operationId in model ComponentPurgeResponseInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property operationId in model ComponentPurgeResponseInner")); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java index 3add07f21c1ed..f8f8086b810a8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.applicationinsights.models.PurgeState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Response containing status for a specific purge operation. */ +/** + * Response containing status for a specific purge operation. + */ @Fluent public final class ComponentPurgeStatusResponseInner { /* @@ -18,13 +20,15 @@ public final class ComponentPurgeStatusResponseInner { @JsonProperty(value = "status", required = true) private PurgeState status; - /** Creates an instance of ComponentPurgeStatusResponseInner class. */ + /** + * Creates an instance of ComponentPurgeStatusResponseInner class. + */ public ComponentPurgeStatusResponseInner() { } /** * Get the status property: Status of the operation represented by the requested Id. - * + * * @return the status value. */ public PurgeState status() { @@ -33,7 +37,7 @@ public PurgeState 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. */ @@ -44,15 +48,13 @@ public ComponentPurgeStatusResponseInner withStatus(PurgeState status) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (status() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property status in model ComponentPurgeStatusResponseInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property status in model ComponentPurgeStatusResponseInner")); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java new file mode 100644 index 0000000000000..9b8e79e4351fa --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An Application Insights component linked storage account. + */ +@Fluent +public final class LinkedStorageAccountsProperties { + /* + * Linked storage account resource ID + */ + @JsonProperty(value = "linkedStorageAccount") + private String linkedStorageAccount; + + /** + * Creates an instance of LinkedStorageAccountsProperties class. + */ + public LinkedStorageAccountsProperties() { + } + + /** + * Get the linkedStorageAccount property: Linked storage account resource ID. + * + * @return the linkedStorageAccount value. + */ + public String linkedStorageAccount() { + return this.linkedStorageAccount; + } + + /** + * Set the linkedStorageAccount property: Linked storage account resource ID. + * + * @param linkedStorageAccount the linkedStorageAccount value to set. + * @return the LinkedStorageAccountsProperties object itself. + */ + public LinkedStorageAccountsProperties withLinkedStorageAccount(String linkedStorageAccount) { + this.linkedStorageAccount = linkedStorageAccount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java index e6c8a9c28385f..ef3e3b2d78788 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The response to a live token query. */ +/** + * The response to a live token query. + */ @Immutable public final class LiveTokenResponseInner { /* @@ -16,13 +18,15 @@ public final class LiveTokenResponseInner { @JsonProperty(value = "liveToken", access = JsonProperty.Access.WRITE_ONLY) private String liveToken; - /** Creates an instance of LiveTokenResponseInner class. */ + /** + * Creates an instance of LiveTokenResponseInner class. + */ public LiveTokenResponseInner() { } /** * Get the liveToken property: JWT token for accessing live metrics stream data. - * + * * @return the liveToken value. */ public String liveToken() { @@ -31,7 +35,7 @@ public String liveToken() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookInner.java deleted file mode 100644 index 55ff07eea9cc3..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookInner.java +++ /dev/null @@ -1,324 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentity; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookResource; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** An Application Insights private workbook definition. */ -@Fluent -public final class MyWorkbookInner extends MyWorkbookResource { - /* - * The kind of workbook. Choices are user and shared. - */ - @JsonProperty(value = "kind") - private Kind kind; - - /* - * Metadata describing a workbook for an Azure resource. - */ - @JsonProperty(value = "properties") - private MyWorkbookProperties innerProperties; - - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of MyWorkbookInner class. */ - public MyWorkbookInner() { - } - - /** - * Get the kind property: The kind of workbook. Choices are user and shared. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of workbook. Choices are user and shared. - * - * @param kind the kind value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the innerProperties property: Metadata describing a workbook for an Azure resource. - * - * @return the innerProperties value. - */ - private MyWorkbookProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withIdentity(MyWorkbookManagedIdentity identity) { - super.withIdentity(identity); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withId(String id) { - super.withId(id); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withType(String type) { - super.withType(type); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withEtag(Map etag) { - super.withEtag(etag); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the displayName property: The user-defined name of the private workbook. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The user-defined name of the private workbook. - * - * @param displayName the displayName value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new MyWorkbookProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the serializedData property: Configuration of this particular private workbook. Configuration data is a - * string containing valid JSON. - * - * @return the serializedData value. - */ - public String serializedData() { - return this.innerProperties() == null ? null : this.innerProperties().serializedData(); - } - - /** - * Set the serializedData property: Configuration of this particular private workbook. Configuration data is a - * string containing valid JSON. - * - * @param serializedData the serializedData value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withSerializedData(String serializedData) { - if (this.innerProperties() == null) { - this.innerProperties = new MyWorkbookProperties(); - } - this.innerProperties().withSerializedData(serializedData); - return this; - } - - /** - * Get the version property: This instance's version of the data model. This can change as new features are added - * that can be marked private workbook. - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Set the version property: This instance's version of the data model. This can change as new features are added - * that can be marked private workbook. - * - * @param version the version value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withVersion(String version) { - if (this.innerProperties() == null) { - this.innerProperties = new MyWorkbookProperties(); - } - this.innerProperties().withVersion(version); - return this; - } - - /** - * Get the timeModified property: Date and time in UTC of the last modification that was made to this private - * workbook definition. - * - * @return the timeModified value. - */ - public String timeModified() { - return this.innerProperties() == null ? null : this.innerProperties().timeModified(); - } - - /** - * Get the category property: Workbook category, as defined by the user at creation time. - * - * @return the category value. - */ - 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 MyWorkbookInner object itself. - */ - public MyWorkbookInner withCategory(String category) { - if (this.innerProperties() == null) { - this.innerProperties = new MyWorkbookProperties(); - } - this.innerProperties().withCategory(category); - return this; - } - - /** - * Get the tags property: A list of 0 or more tags that are associated with this private workbook definition. - * - * @return the tags value. - */ - public List tagsPropertiesTags() { - return this.innerProperties() == null ? null : this.innerProperties().tags(); - } - - /** - * Set the tags property: A list of 0 or more tags that are associated with this private workbook definition. - * - * @param tags the tags value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withTagsPropertiesTags(List tags) { - if (this.innerProperties() == null) { - this.innerProperties = new MyWorkbookProperties(); - } - this.innerProperties().withTags(tags); - return this; - } - - /** - * Get the userId property: Unique user id of the specific user that owns this private workbook. - * - * @return the userId value. - */ - public String userId() { - return this.innerProperties() == null ? null : this.innerProperties().userId(); - } - - /** - * Get the sourceId property: Optional resourceId for a source resource. - * - * @return the sourceId value. - */ - public String sourceId() { - return this.innerProperties() == null ? null : this.innerProperties().sourceId(); - } - - /** - * Set the sourceId property: Optional resourceId for a source resource. - * - * @param sourceId the sourceId value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withSourceId(String sourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new MyWorkbookProperties(); - } - this.innerProperties().withSourceId(sourceId); - return this; - } - - /** - * Get the storageUri property: BYOS Storage Account URI. - * - * @return the storageUri value. - */ - public String storageUri() { - return this.innerProperties() == null ? null : this.innerProperties().storageUri(); - } - - /** - * Set the storageUri property: BYOS Storage Account URI. - * - * @param storageUri the storageUri value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withStorageUri(String storageUri) { - if (this.innerProperties() == null) { - this.innerProperties = new MyWorkbookProperties(); - } - this.innerProperties().withStorageUri(storageUri); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookProperties.java deleted file mode 100644 index fd8c2f01eef10..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookProperties.java +++ /dev/null @@ -1,263 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Properties that contain a private workbook. */ -@Fluent -public final class MyWorkbookProperties { - /* - * The user-defined name of the private workbook. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * Configuration of this particular private workbook. Configuration data is a string containing valid JSON - */ - @JsonProperty(value = "serializedData", required = true) - private String serializedData; - - /* - * This instance's version of the data model. This can change as new features are added that can be marked private - * workbook. - */ - @JsonProperty(value = "version") - private String version; - - /* - * Date and time in UTC of the last modification that was made to this private workbook definition. - */ - @JsonProperty(value = "timeModified", access = JsonProperty.Access.WRITE_ONLY) - private String timeModified; - - /* - * Workbook category, as defined by the user at creation time. - */ - @JsonProperty(value = "category", required = true) - private String category; - - /* - * A list of 0 or more tags that are associated with this private workbook definition - */ - @JsonProperty(value = "tags") - private List tags; - - /* - * Unique user id of the specific user that owns this private workbook. - */ - @JsonProperty(value = "userId", access = JsonProperty.Access.WRITE_ONLY) - private String userId; - - /* - * Optional resourceId for a source resource. - */ - @JsonProperty(value = "sourceId") - private String sourceId; - - /* - * BYOS Storage Account URI - */ - @JsonProperty(value = "storageUri") - private String storageUri; - - /** Creates an instance of MyWorkbookProperties class. */ - public MyWorkbookProperties() { - } - - /** - * Get the displayName property: The user-defined name of the private workbook. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The user-defined name of the private workbook. - * - * @param displayName the displayName value to set. - * @return the MyWorkbookProperties object itself. - */ - public MyWorkbookProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the serializedData property: Configuration of this particular private workbook. Configuration data is a - * string containing valid JSON. - * - * @return the serializedData value. - */ - public String serializedData() { - return this.serializedData; - } - - /** - * Set the serializedData property: Configuration of this particular private workbook. Configuration data is a - * string containing valid JSON. - * - * @param serializedData the serializedData value to set. - * @return the MyWorkbookProperties object itself. - */ - public MyWorkbookProperties withSerializedData(String serializedData) { - this.serializedData = serializedData; - return this; - } - - /** - * Get the version property: This instance's version of the data model. This can change as new features are added - * that can be marked private workbook. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: This instance's version of the data model. This can change as new features are added - * that can be marked private workbook. - * - * @param version the version value to set. - * @return the MyWorkbookProperties object itself. - */ - public MyWorkbookProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the timeModified property: Date and time in UTC of the last modification that was made to this private - * workbook definition. - * - * @return the timeModified value. - */ - public String timeModified() { - return this.timeModified; - } - - /** - * Get the category property: Workbook category, as defined by the user at creation time. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Workbook category, as defined by the user at creation time. - * - * @param category the category value to set. - * @return the MyWorkbookProperties object itself. - */ - public MyWorkbookProperties withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the tags property: A list of 0 or more tags that are associated with this private workbook definition. - * - * @return the tags value. - */ - public List tags() { - return this.tags; - } - - /** - * Set the tags property: A list of 0 or more tags that are associated with this private workbook definition. - * - * @param tags the tags value to set. - * @return the MyWorkbookProperties object itself. - */ - public MyWorkbookProperties withTags(List tags) { - this.tags = tags; - return this; - } - - /** - * Get the userId property: Unique user id of the specific user that owns this private workbook. - * - * @return the userId value. - */ - public String userId() { - return this.userId; - } - - /** - * Get the sourceId property: Optional resourceId for a source resource. - * - * @return the sourceId value. - */ - public String sourceId() { - return this.sourceId; - } - - /** - * Set the sourceId property: Optional resourceId for a source resource. - * - * @param sourceId the sourceId value to set. - * @return the MyWorkbookProperties object itself. - */ - public MyWorkbookProperties withSourceId(String sourceId) { - this.sourceId = sourceId; - return this; - } - - /** - * Get the storageUri property: BYOS Storage Account URI. - * - * @return the storageUri value. - */ - public String storageUri() { - return this.storageUri; - } - - /** - * Set the storageUri property: BYOS Storage Account URI. - * - * @param storageUri the storageUri value to set. - * @return the MyWorkbookProperties object itself. - */ - public MyWorkbookProperties withStorageUri(String storageUri) { - this.storageUri = storageUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model MyWorkbookProperties")); - } - if (serializedData() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serializedData in model MyWorkbookProperties")); - } - if (category() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property category in model MyWorkbookProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MyWorkbookProperties.class); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java index 4a3d048c8df7d..b1ceb31333974 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.applicationinsights.models.OperationDisplay; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Workbooks REST API operation. */ +/** + * Azure Workbooks REST API operation. + */ @Fluent public final class OperationInner { /* @@ -23,13 +25,15 @@ public final class OperationInner { @JsonProperty(value = "display") private OperationDisplay display; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: Operation name: {provider}/{resource}/{operation}. - * + * * @return the name value. */ public String name() { @@ -38,7 +42,7 @@ public String name() { /** * Set the name property: Operation name: {provider}/{resource}/{operation}. - * + * * @param name the name value to set. * @return the OperationInner object itself. */ @@ -49,7 +53,7 @@ public OperationInner withName(String name) { /** * Get the display property: The object that represents the operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -58,7 +62,7 @@ public OperationDisplay display() { /** * Set the display property: The object that represents the operation. - * + * * @param display the display value to set. * @return the OperationInner object itself. */ @@ -69,7 +73,7 @@ public OperationInner withDisplay(OperationDisplay display) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestInner.java index 4d597cb797d67..d7362aa4812b2 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 @@ -15,7 +15,9 @@ import java.util.List; import java.util.Map; -/** An Application Insights WebTest definition. */ +/** + * An Application Insights WebTest definition. + */ @Fluent public final class WebTestInner extends WebtestsResource { /* @@ -30,13 +32,15 @@ public final class WebTestInner extends WebtestsResource { @JsonProperty(value = "properties") private WebTestProperties innerProperties; - /** Creates an instance of WebTestInner class. */ + /** + * Creates an instance of WebTestInner class. + */ public WebTestInner() { } /** * Get the kind property: The kind of WebTest that this web test watches. Choices are ping, multistep and standard. - * + * * @return the kind value. */ public WebTestKind kind() { @@ -45,7 +49,7 @@ public WebTestKind kind() { /** * Set the kind property: The kind of WebTest that this web test watches. Choices are ping, multistep and standard. - * + * * @param kind the kind value to set. * @return the WebTestInner object itself. */ @@ -56,21 +60,25 @@ public WebTestInner withKind(WebTestKind kind) { /** * Get the innerProperties property: Metadata describing a web test for an Azure resource. - * + * * @return the innerProperties value. */ private WebTestProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WebTestInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WebTestInner withTags(Map tags) { super.withTags(tags); @@ -80,7 +88,7 @@ public WebTestInner withTags(Map tags) { /** * Get the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name * field. - * + * * @return the syntheticMonitorId value. */ public String syntheticMonitorId() { @@ -90,7 +98,7 @@ public String syntheticMonitorId() { /** * Set the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name * field. - * + * * @param syntheticMonitorId the syntheticMonitorId value to set. * @return the WebTestInner object itself. */ @@ -104,7 +112,7 @@ public WebTestInner withSyntheticMonitorId(String syntheticMonitorId) { /** * Get the webTestName property: User defined name if this WebTest. - * + * * @return the webTestName value. */ public String webTestName() { @@ -113,7 +121,7 @@ public String webTestName() { /** * Set the webTestName property: User defined name if this WebTest. - * + * * @param webTestName the webTestName value to set. * @return the WebTestInner object itself. */ @@ -127,7 +135,7 @@ public WebTestInner withWebTestName(String webTestName) { /** * Get the description property: User defined description for this WebTest. - * + * * @return the description value. */ public String description() { @@ -136,7 +144,7 @@ public String description() { /** * Set the description property: User defined description for this WebTest. - * + * * @param description the description value to set. * @return the WebTestInner object itself. */ @@ -150,7 +158,7 @@ public WebTestInner withDescription(String description) { /** * Get the enabled property: Is the test actively being monitored. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -159,7 +167,7 @@ public Boolean enabled() { /** * Set the enabled property: Is the test actively being monitored. - * + * * @param enabled the enabled value to set. * @return the WebTestInner object itself. */ @@ -173,7 +181,7 @@ public WebTestInner withEnabled(Boolean enabled) { /** * Get the frequency property: Interval in seconds between test runs for this WebTest. Default value is 300. - * + * * @return the frequency value. */ public Integer frequency() { @@ -182,7 +190,7 @@ public Integer frequency() { /** * Set the frequency property: Interval in seconds between test runs for this WebTest. Default value is 300. - * + * * @param frequency the frequency value to set. * @return the WebTestInner object itself. */ @@ -196,7 +204,7 @@ public WebTestInner withFrequency(Integer frequency) { /** * Get the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30. - * + * * @return the timeout value. */ public Integer timeout() { @@ -205,7 +213,7 @@ public Integer timeout() { /** * Set the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30. - * + * * @param timeout the timeout value to set. * @return the WebTestInner object itself. */ @@ -219,7 +227,7 @@ public WebTestInner withTimeout(Integer timeout) { /** * Get the webTestKind property: The kind of web test this is, valid choices are ping, multistep and standard. - * + * * @return the webTestKind value. */ public WebTestKind webTestKind() { @@ -228,7 +236,7 @@ public WebTestKind webTestKind() { /** * Set the webTestKind property: The kind of web test this is, valid choices are ping, multistep and standard. - * + * * @param webTestKind the webTestKind value to set. * @return the WebTestInner object itself. */ @@ -242,7 +250,7 @@ public WebTestInner withWebTestKind(WebTestKind webTestKind) { /** * Get the retryEnabled property: Allow for retries should this WebTest fail. - * + * * @return the retryEnabled value. */ public Boolean retryEnabled() { @@ -251,7 +259,7 @@ public Boolean retryEnabled() { /** * Set the retryEnabled property: Allow for retries should this WebTest fail. - * + * * @param retryEnabled the retryEnabled value to set. * @return the WebTestInner object itself. */ @@ -266,7 +274,7 @@ public WebTestInner withRetryEnabled(Boolean retryEnabled) { /** * Get the locations property: A list of where to physically run the tests from to give global coverage for * accessibility of your application. - * + * * @return the locations value. */ public List locations() { @@ -276,7 +284,7 @@ public List locations() { /** * Set the locations property: A list of where to physically run the tests from to give global coverage for * accessibility of your application. - * + * * @param locations the locations value to set. * @return the WebTestInner object itself. */ @@ -290,7 +298,7 @@ public WebTestInner withLocations(List locations) { /** * Get the configuration property: An XML configuration specification for a WebTest. - * + * * @return the configuration value. */ public WebTestPropertiesConfiguration configuration() { @@ -299,7 +307,7 @@ public WebTestPropertiesConfiguration configuration() { /** * Set the configuration property: An XML configuration specification for a WebTest. - * + * * @param configuration the configuration value to set. * @return the WebTestInner object itself. */ @@ -313,9 +321,9 @@ public WebTestInner withConfiguration(WebTestPropertiesConfiguration configurati /** * Get the provisioningState property: Current state of this component, whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value but are able to read from it. Values will - * include Succeeded, Deploying, Canceled, and Failed. - * + * within the resource group it is defined. Users cannot change this value but are able to read from it. Values + * will include Succeeded, Deploying, Canceled, and Failed. + * * @return the provisioningState value. */ public String provisioningState() { @@ -324,7 +332,7 @@ public String provisioningState() { /** * Get the request property: The collection of request properties. - * + * * @return the request value. */ public WebTestPropertiesRequest request() { @@ -333,7 +341,7 @@ public WebTestPropertiesRequest request() { /** * Set the request property: The collection of request properties. - * + * * @param request the request value to set. * @return the WebTestInner object itself. */ @@ -347,7 +355,7 @@ public WebTestInner withRequest(WebTestPropertiesRequest request) { /** * Get the validationRules property: The collection of validation rule properties. - * + * * @return the validationRules value. */ public WebTestPropertiesValidationRules validationRules() { @@ -356,7 +364,7 @@ public WebTestPropertiesValidationRules validationRules() { /** * Set the validationRules property: The collection of validation rule properties. - * + * * @param validationRules the validationRules value to set. * @return the WebTestInner object itself. */ @@ -370,7 +378,7 @@ public WebTestInner withValidationRules(WebTestPropertiesValidationRules validat /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 0f7959dc39986..082aeaf7127cb 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 @@ -14,7 +14,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Metadata describing a web test for an Azure resource. */ +/** + * Metadata describing a web test for an Azure resource. + */ @Fluent public final class WebTestProperties { /* @@ -97,14 +99,16 @@ public final class WebTestProperties { @JsonProperty(value = "ValidationRules") private WebTestPropertiesValidationRules validationRules; - /** Creates an instance of WebTestProperties class. */ + /** + * Creates an instance of WebTestProperties class. + */ public WebTestProperties() { } /** * Get the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name * field. - * + * * @return the syntheticMonitorId value. */ public String syntheticMonitorId() { @@ -114,7 +118,7 @@ public String syntheticMonitorId() { /** * Set the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name * field. - * + * * @param syntheticMonitorId the syntheticMonitorId value to set. * @return the WebTestProperties object itself. */ @@ -125,7 +129,7 @@ public WebTestProperties withSyntheticMonitorId(String syntheticMonitorId) { /** * Get the webTestName property: User defined name if this WebTest. - * + * * @return the webTestName value. */ public String webTestName() { @@ -134,7 +138,7 @@ public String webTestName() { /** * Set the webTestName property: User defined name if this WebTest. - * + * * @param webTestName the webTestName value to set. * @return the WebTestProperties object itself. */ @@ -145,7 +149,7 @@ public WebTestProperties withWebTestName(String webTestName) { /** * Get the description property: User defined description for this WebTest. - * + * * @return the description value. */ public String description() { @@ -154,7 +158,7 @@ public String description() { /** * Set the description property: User defined description for this WebTest. - * + * * @param description the description value to set. * @return the WebTestProperties object itself. */ @@ -165,7 +169,7 @@ public WebTestProperties withDescription(String description) { /** * Get the enabled property: Is the test actively being monitored. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -174,7 +178,7 @@ public Boolean enabled() { /** * Set the enabled property: Is the test actively being monitored. - * + * * @param enabled the enabled value to set. * @return the WebTestProperties object itself. */ @@ -185,7 +189,7 @@ public WebTestProperties withEnabled(Boolean enabled) { /** * Get the frequency property: Interval in seconds between test runs for this WebTest. Default value is 300. - * + * * @return the frequency value. */ public Integer frequency() { @@ -194,7 +198,7 @@ public Integer frequency() { /** * Set the frequency property: Interval in seconds between test runs for this WebTest. Default value is 300. - * + * * @param frequency the frequency value to set. * @return the WebTestProperties object itself. */ @@ -205,7 +209,7 @@ public WebTestProperties withFrequency(Integer frequency) { /** * Get the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30. - * + * * @return the timeout value. */ public Integer timeout() { @@ -214,7 +218,7 @@ public Integer timeout() { /** * Set the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30. - * + * * @param timeout the timeout value to set. * @return the WebTestProperties object itself. */ @@ -225,7 +229,7 @@ public WebTestProperties withTimeout(Integer timeout) { /** * Get the webTestKind property: The kind of web test this is, valid choices are ping, multistep and standard. - * + * * @return the webTestKind value. */ public WebTestKind webTestKind() { @@ -234,7 +238,7 @@ public WebTestKind webTestKind() { /** * Set the webTestKind property: The kind of web test this is, valid choices are ping, multistep and standard. - * + * * @param webTestKind the webTestKind value to set. * @return the WebTestProperties object itself. */ @@ -245,7 +249,7 @@ public WebTestProperties withWebTestKind(WebTestKind webTestKind) { /** * Get the retryEnabled property: Allow for retries should this WebTest fail. - * + * * @return the retryEnabled value. */ public Boolean retryEnabled() { @@ -254,7 +258,7 @@ public Boolean retryEnabled() { /** * Set the retryEnabled property: Allow for retries should this WebTest fail. - * + * * @param retryEnabled the retryEnabled value to set. * @return the WebTestProperties object itself. */ @@ -266,7 +270,7 @@ public WebTestProperties withRetryEnabled(Boolean retryEnabled) { /** * Get the locations property: A list of where to physically run the tests from to give global coverage for * accessibility of your application. - * + * * @return the locations value. */ public List locations() { @@ -276,7 +280,7 @@ public List locations() { /** * Set the locations property: A list of where to physically run the tests from to give global coverage for * accessibility of your application. - * + * * @param locations the locations value to set. * @return the WebTestProperties object itself. */ @@ -287,7 +291,7 @@ public WebTestProperties withLocations(List locations) { /** * Get the configuration property: An XML configuration specification for a WebTest. - * + * * @return the configuration value. */ public WebTestPropertiesConfiguration configuration() { @@ -296,7 +300,7 @@ public WebTestPropertiesConfiguration configuration() { /** * Set the configuration property: An XML configuration specification for a WebTest. - * + * * @param configuration the configuration value to set. * @return the WebTestProperties object itself. */ @@ -307,9 +311,9 @@ public WebTestProperties withConfiguration(WebTestPropertiesConfiguration config /** * Get the provisioningState property: Current state of this component, whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value but are able to read from it. Values will - * include Succeeded, Deploying, Canceled, and Failed. - * + * within the resource group it is defined. Users cannot change this value but are able to read from it. Values + * will include Succeeded, Deploying, Canceled, and Failed. + * * @return the provisioningState value. */ public String provisioningState() { @@ -318,7 +322,7 @@ public String provisioningState() { /** * Get the request property: The collection of request properties. - * + * * @return the request value. */ public WebTestPropertiesRequest request() { @@ -327,7 +331,7 @@ public WebTestPropertiesRequest request() { /** * Set the request property: The collection of request properties. - * + * * @param request the request value to set. * @return the WebTestProperties object itself. */ @@ -338,7 +342,7 @@ public WebTestProperties withRequest(WebTestPropertiesRequest request) { /** * Get the validationRules property: The collection of validation rule properties. - * + * * @return the validationRules value. */ public WebTestPropertiesValidationRules validationRules() { @@ -347,7 +351,7 @@ public WebTestPropertiesValidationRules validationRules() { /** * Set the validationRules property: The collection of validation rule properties. - * + * * @param validationRules the validationRules value to set. * @return the WebTestProperties object itself. */ @@ -358,30 +362,25 @@ public WebTestProperties withValidationRules(WebTestPropertiesValidationRules va /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (syntheticMonitorId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property syntheticMonitorId in model WebTestProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property syntheticMonitorId in model WebTestProperties")); } if (webTestName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property webTestName in model WebTestProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property webTestName in model WebTestProperties")); } if (webTestKind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property webTestKind in model WebTestProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property webTestKind in model WebTestProperties")); } if (locations() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property locations in model WebTestProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property locations in model WebTestProperties")); } else { locations().forEach(e -> e.validate()); } 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 687c996e84b78..b8553ad5142a8 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Work item configuration associated with an application insights resource. */ +/** + * Work item configuration associated with an application insights resource. + */ @Fluent public final class WorkItemConfigurationInner { /* @@ -40,13 +42,15 @@ public final class WorkItemConfigurationInner { @JsonProperty(value = "ConfigProperties") private String configProperties; - /** Creates an instance of WorkItemConfigurationInner class. */ + /** + * Creates an instance of WorkItemConfigurationInner class. + */ public WorkItemConfigurationInner() { } /** * Get the connectorId property: Connector identifier where work item is created. - * + * * @return the connectorId value. */ public String connectorId() { @@ -55,7 +59,7 @@ public String connectorId() { /** * Set the connectorId property: Connector identifier where work item is created. - * + * * @param connectorId the connectorId value to set. * @return the WorkItemConfigurationInner object itself. */ @@ -66,7 +70,7 @@ public WorkItemConfigurationInner withConnectorId(String connectorId) { /** * Get the configDisplayName property: Configuration friendly name. - * + * * @return the configDisplayName value. */ public String configDisplayName() { @@ -75,7 +79,7 @@ public String configDisplayName() { /** * Set the configDisplayName property: Configuration friendly name. - * + * * @param configDisplayName the configDisplayName value to set. * @return the WorkItemConfigurationInner object itself. */ @@ -86,7 +90,7 @@ public WorkItemConfigurationInner withConfigDisplayName(String configDisplayName /** * Get the isDefault property: Boolean value indicating whether configuration is default. - * + * * @return the isDefault value. */ public Boolean isDefault() { @@ -95,7 +99,7 @@ public Boolean isDefault() { /** * Set the isDefault property: Boolean value indicating whether configuration is default. - * + * * @param isDefault the isDefault value to set. * @return the WorkItemConfigurationInner object itself. */ @@ -106,7 +110,7 @@ public WorkItemConfigurationInner withIsDefault(Boolean isDefault) { /** * Get the id property: Unique Id for work item. - * + * * @return the id value. */ public String id() { @@ -115,7 +119,7 @@ public String id() { /** * Set the id property: Unique Id for work item. - * + * * @param id the id value to set. * @return the WorkItemConfigurationInner object itself. */ @@ -126,7 +130,7 @@ public WorkItemConfigurationInner withId(String id) { /** * Get the configProperties property: Serialized JSON object for detailed properties. - * + * * @return the configProperties value. */ public String configProperties() { @@ -135,7 +139,7 @@ public String configProperties() { /** * Set the configProperties property: Serialized JSON object for detailed properties. - * + * * @param configProperties the configProperties value to set. * @return the WorkItemConfigurationInner object itself. */ @@ -146,7 +150,7 @@ public WorkItemConfigurationInner withConfigProperties(String configProperties) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java index 3d38d764aea77..0b22ba3d5a0b6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java @@ -14,7 +14,9 @@ import java.util.List; import java.util.Map; -/** A workbook definition. */ +/** + * A workbook definition. + */ @Fluent public final class WorkbookInner extends WorkbookResource { /* @@ -29,13 +31,15 @@ public final class WorkbookInner extends WorkbookResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of WorkbookInner class. */ + /** + * Creates an instance of WorkbookInner class. + */ public WorkbookInner() { } /** * Get the innerProperties property: Metadata describing a workbook for an Azure resource. - * + * * @return the innerProperties value. */ private WorkbookProperties innerProperties() { @@ -44,42 +48,52 @@ private WorkbookProperties innerProperties() { /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkbookInner withIdentity(WorkbookResourceIdentity identity) { super.withIdentity(identity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkbookInner withKind(WorkbookSharedTypeKind kind) { super.withKind(kind); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkbookInner withEtag(String etag) { super.withEtag(etag); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkbookInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkbookInner withTags(Map tags) { super.withTags(tags); @@ -88,7 +102,7 @@ public WorkbookInner withTags(Map tags) { /** * Get the displayName property: The user-defined name (display name) of the workbook. - * + * * @return the displayName value. */ public String displayName() { @@ -97,7 +111,7 @@ public String displayName() { /** * Set the displayName property: The user-defined name (display name) of the workbook. - * + * * @param displayName the displayName value to set. * @return the WorkbookInner object itself. */ @@ -112,7 +126,7 @@ public WorkbookInner withDisplayName(String displayName) { /** * Get the serializedData property: Configuration of this particular workbook. Configuration data is a string * containing valid JSON. - * + * * @return the serializedData value. */ public String serializedData() { @@ -122,7 +136,7 @@ public String 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 WorkbookInner object itself. */ @@ -135,9 +149,9 @@ public WorkbookInner withSerializedData(String serializedData) { } /** - * Get the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook in - * serializedData. - * + * Get the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook + * in serializedData. + * * @return the version value. */ public String version() { @@ -145,9 +159,9 @@ public String version() { } /** - * Set the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook in - * serializedData. - * + * Set the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook + * in serializedData. + * * @param version the version value to set. * @return the WorkbookInner object itself. */ @@ -162,7 +176,7 @@ public WorkbookInner withVersion(String version) { /** * Get the timeModified property: Date and time in UTC of the last modification that was made to this workbook * definition. - * + * * @return the timeModified value. */ public OffsetDateTime timeModified() { @@ -171,7 +185,7 @@ public OffsetDateTime timeModified() { /** * Get the category property: Workbook category, as defined by the user at creation time. - * + * * @return the category value. */ public String category() { @@ -180,7 +194,7 @@ public String category() { /** * Set the category property: Workbook category, as defined by the user at creation time. - * + * * @param category the category value to set. * @return the WorkbookInner object itself. */ @@ -194,7 +208,7 @@ public WorkbookInner withCategory(String category) { /** * Get the tags property: Being deprecated, please use the other tags field. - * + * * @return the tags value. */ public List tagsPropertiesTags() { @@ -203,7 +217,7 @@ public List tagsPropertiesTags() { /** * Set the tags property: Being deprecated, please use the other tags field. - * + * * @param tags the tags value to set. * @return the WorkbookInner object itself. */ @@ -217,7 +231,7 @@ public WorkbookInner withTagsPropertiesTags(List tags) { /** * Get the userId property: Unique user id of the specific user that owns this workbook. - * + * * @return the userId value. */ public String userId() { @@ -226,7 +240,7 @@ public String userId() { /** * Get the sourceId property: ResourceId for a source resource. - * + * * @return the sourceId value. */ public String sourceId() { @@ -235,7 +249,7 @@ public String sourceId() { /** * Set the sourceId property: ResourceId for a source resource. - * + * * @param sourceId the sourceId value to set. * @return the WorkbookInner object itself. */ @@ -249,7 +263,7 @@ public WorkbookInner withSourceId(String sourceId) { /** * Get the storageUri property: The resourceId to the storage account when bring your own storage is used. - * + * * @return the storageUri value. */ public String storageUri() { @@ -258,7 +272,7 @@ public String 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 WorkbookInner object itself. */ @@ -272,7 +286,7 @@ public WorkbookInner withStorageUri(String storageUri) { /** * Get the description property: The description of the workbook. - * + * * @return the description value. */ public String description() { @@ -281,7 +295,7 @@ public String description() { /** * Set the description property: The description of the workbook. - * + * * @param description the description value to set. * @return the WorkbookInner object itself. */ @@ -295,7 +309,7 @@ public WorkbookInner withDescription(String description) { /** * Get the revision property: The unique revision id for this workbook definition. - * + * * @return the revision value. */ public String revision() { @@ -304,7 +318,7 @@ public String revision() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 20d9d41c2c29e..7c26a626d61d8 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 @@ -10,7 +10,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Properties that contain a workbook. */ +/** + * Properties that contain a workbook. + */ @Fluent public final class WorkbookProperties { /* @@ -79,13 +81,15 @@ public final class WorkbookProperties { @JsonProperty(value = "revision", access = JsonProperty.Access.WRITE_ONLY) private String revision; - /** Creates an instance of WorkbookProperties class. */ + /** + * Creates an instance of WorkbookProperties class. + */ public WorkbookProperties() { } /** * Get the displayName property: The user-defined name (display name) of the workbook. - * + * * @return the displayName value. */ public String displayName() { @@ -94,7 +98,7 @@ public String displayName() { /** * Set the displayName property: The user-defined name (display name) of the workbook. - * + * * @param displayName the displayName value to set. * @return the WorkbookProperties object itself. */ @@ -106,7 +110,7 @@ public WorkbookProperties withDisplayName(String displayName) { /** * Get the serializedData property: Configuration of this particular workbook. Configuration data is a string * containing valid JSON. - * + * * @return the serializedData value. */ public String serializedData() { @@ -116,7 +120,7 @@ public String serializedData() { /** * Set the serializedData property: Configuration of this particular workbook. Configuration data is a string * containing valid JSON. - * + * * @param serializedData the serializedData value to set. * @return the WorkbookProperties object itself. */ @@ -126,9 +130,9 @@ public WorkbookProperties withSerializedData(String serializedData) { } /** - * Get the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook in - * serializedData. - * + * Get the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook + * in serializedData. + * * @return the version value. */ public String version() { @@ -136,9 +140,9 @@ public String version() { } /** - * Set the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook in - * serializedData. - * + * Set the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook + * in serializedData. + * * @param version the version value to set. * @return the WorkbookProperties object itself. */ @@ -150,7 +154,7 @@ public WorkbookProperties withVersion(String version) { /** * Get the timeModified property: Date and time in UTC of the last modification that was made to this workbook * definition. - * + * * @return the timeModified value. */ public OffsetDateTime timeModified() { @@ -159,7 +163,7 @@ public OffsetDateTime timeModified() { /** * Get the category property: Workbook category, as defined by the user at creation time. - * + * * @return the category value. */ public String category() { @@ -168,7 +172,7 @@ public String category() { /** * Set the category property: Workbook category, as defined by the user at creation time. - * + * * @param category the category value to set. * @return the WorkbookProperties object itself. */ @@ -179,7 +183,7 @@ public WorkbookProperties withCategory(String category) { /** * Get the tags property: Being deprecated, please use the other tags field. - * + * * @return the tags value. */ public List tags() { @@ -188,7 +192,7 @@ public List tags() { /** * Set the tags property: Being deprecated, please use the other tags field. - * + * * @param tags the tags value to set. * @return the WorkbookProperties object itself. */ @@ -199,7 +203,7 @@ public WorkbookProperties withTags(List tags) { /** * Get the userId property: Unique user id of the specific user that owns this workbook. - * + * * @return the userId value. */ public String userId() { @@ -208,7 +212,7 @@ public String userId() { /** * Get the sourceId property: ResourceId for a source resource. - * + * * @return the sourceId value. */ public String sourceId() { @@ -217,7 +221,7 @@ public String sourceId() { /** * Set the sourceId property: ResourceId for a source resource. - * + * * @param sourceId the sourceId value to set. * @return the WorkbookProperties object itself. */ @@ -228,7 +232,7 @@ public WorkbookProperties withSourceId(String sourceId) { /** * Get the storageUri property: The resourceId to the storage account when bring your own storage is used. - * + * * @return the storageUri value. */ public String storageUri() { @@ -237,7 +241,7 @@ public String storageUri() { /** * Set the storageUri property: The resourceId to the storage account when bring your own storage is used. - * + * * @param storageUri the storageUri value to set. * @return the WorkbookProperties object itself. */ @@ -248,7 +252,7 @@ public WorkbookProperties withStorageUri(String storageUri) { /** * Get the description property: The description of the workbook. - * + * * @return the description value. */ public String description() { @@ -257,7 +261,7 @@ public String description() { /** * Set the description property: The description of the workbook. - * + * * @param description the description value to set. * @return the WorkbookProperties object itself. */ @@ -268,7 +272,7 @@ public WorkbookProperties withDescription(String description) { /** * Get the revision property: The unique revision id for this workbook definition. - * + * * @return the revision value. */ public String revision() { @@ -277,25 +281,21 @@ public String revision() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property displayName in model WorkbookProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property displayName in model WorkbookProperties")); } if (serializedData() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serializedData in model WorkbookProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property serializedData in model WorkbookProperties")); } if (category() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property category in model WorkbookProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property category in model WorkbookProperties")); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java index 350b986b2b06d..fae431182ec3c 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties that contain a workbook for PATCH operation. */ +/** + * Properties that contain a workbook for PATCH operation. + */ @Fluent public final class WorkbookPropertiesUpdateParameters { /* @@ -47,13 +49,15 @@ public final class WorkbookPropertiesUpdateParameters { @JsonProperty(value = "revision") private String revision; - /** Creates an instance of WorkbookPropertiesUpdateParameters class. */ + /** + * Creates an instance of WorkbookPropertiesUpdateParameters class. + */ public WorkbookPropertiesUpdateParameters() { } /** * Get the displayName property: The user-defined name (display name) of the workbook. - * + * * @return the displayName value. */ public String displayName() { @@ -62,7 +66,7 @@ public String displayName() { /** * Set the displayName property: The user-defined name (display name) of the workbook. - * + * * @param displayName the displayName value to set. * @return the WorkbookPropertiesUpdateParameters object itself. */ @@ -74,7 +78,7 @@ public WorkbookPropertiesUpdateParameters withDisplayName(String displayName) { /** * Get the serializedData property: Configuration of this particular workbook. Configuration data is a string * containing valid JSON. - * + * * @return the serializedData value. */ public String serializedData() { @@ -84,7 +88,7 @@ public String serializedData() { /** * Set the serializedData property: Configuration of this particular workbook. Configuration data is a string * containing valid JSON. - * + * * @param serializedData the serializedData value to set. * @return the WorkbookPropertiesUpdateParameters object itself. */ @@ -95,7 +99,7 @@ public WorkbookPropertiesUpdateParameters withSerializedData(String serializedDa /** * Get the category property: Workbook category, as defined by the user at creation time. - * + * * @return the category value. */ public String category() { @@ -104,7 +108,7 @@ public String category() { /** * Set the category property: Workbook category, as defined by the user at creation time. - * + * * @param category the category value to set. * @return the WorkbookPropertiesUpdateParameters object itself. */ @@ -115,7 +119,7 @@ public WorkbookPropertiesUpdateParameters withCategory(String category) { /** * Get the tags property: A list of 0 or more tags that are associated with this workbook definition. - * + * * @return the tags value. */ public List tags() { @@ -124,7 +128,7 @@ public List tags() { /** * Set the tags property: A list of 0 or more tags that are associated with this workbook definition. - * + * * @param tags the tags value to set. * @return the WorkbookPropertiesUpdateParameters object itself. */ @@ -135,7 +139,7 @@ public WorkbookPropertiesUpdateParameters withTags(List tags) { /** * Get the description property: The description of the workbook. - * + * * @return the description value. */ public String description() { @@ -144,7 +148,7 @@ public String description() { /** * Set the description property: The description of the workbook. - * + * * @param description the description value to set. * @return the WorkbookPropertiesUpdateParameters object itself. */ @@ -155,7 +159,7 @@ public WorkbookPropertiesUpdateParameters withDescription(String description) { /** * Get the revision property: The unique revision id for this workbook definition. - * + * * @return the revision value. */ public String revision() { @@ -164,7 +168,7 @@ public String revision() { /** * Set the revision property: The unique revision id for this workbook definition. - * + * * @param revision the revision value to set. * @return the WorkbookPropertiesUpdateParameters object itself. */ @@ -175,7 +179,7 @@ public WorkbookPropertiesUpdateParameters withRevision(String revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java index ab41289cd9d12..31831c63f024a 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 @@ -12,7 +12,9 @@ import java.util.List; import java.util.Map; -/** An Application Insights workbook template definition. */ +/** + * An Application Insights workbook template definition. + */ @Fluent public final class WorkbookTemplateInner extends WorkbookTemplateResource { /* @@ -21,27 +23,33 @@ public final class WorkbookTemplateInner extends WorkbookTemplateResource { @JsonProperty(value = "properties") private WorkbookTemplateProperties innerProperties; - /** Creates an instance of WorkbookTemplateInner class. */ + /** + * Creates an instance of WorkbookTemplateInner class. + */ public WorkbookTemplateInner() { } /** * Get the innerProperties property: Metadata describing a workbook template for an Azure resource. - * + * * @return the innerProperties value. */ private WorkbookTemplateProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkbookTemplateInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkbookTemplateInner withTags(Map tags) { super.withTags(tags); @@ -49,9 +57,9 @@ public WorkbookTemplateInner withTags(Map tags) { } /** - * Get the priority property: Priority of the template. Determines which template to open when a workbook gallery is - * opened in viewer mode. - * + * Get the priority property: Priority of the template. Determines which template to open when a workbook gallery + * is opened in viewer mode. + * * @return the priority value. */ public Integer priority() { @@ -59,9 +67,9 @@ public Integer priority() { } /** - * Set the priority property: Priority of the template. Determines which template to open when a workbook gallery is - * opened in viewer mode. - * + * Set the priority property: Priority of the template. Determines which template to open when a workbook gallery + * is opened in viewer mode. + * * @param priority the priority value to set. * @return the WorkbookTemplateInner object itself. */ @@ -75,7 +83,7 @@ public WorkbookTemplateInner withPriority(Integer priority) { /** * Get the author property: Information about the author of the workbook template. - * + * * @return the author value. */ public String author() { @@ -84,7 +92,7 @@ public String author() { /** * Set the author property: Information about the author of the workbook template. - * + * * @param author the author value to set. * @return the WorkbookTemplateInner object itself. */ @@ -98,7 +106,7 @@ public WorkbookTemplateInner withAuthor(String author) { /** * Get the templateData property: Valid JSON object containing workbook template payload. - * + * * @return the templateData value. */ public Object templateData() { @@ -107,7 +115,7 @@ public Object templateData() { /** * Set the templateData property: Valid JSON object containing workbook template payload. - * + * * @param templateData the templateData value to set. * @return the WorkbookTemplateInner object itself. */ @@ -121,7 +129,7 @@ public WorkbookTemplateInner withTemplateData(Object templateData) { /** * Get the galleries property: Workbook galleries supported by the template. - * + * * @return the galleries value. */ public List galleries() { @@ -130,7 +138,7 @@ public List galleries() { /** * Set the galleries property: Workbook galleries supported by the template. - * + * * @param galleries the galleries value to set. * @return the WorkbookTemplateInner object itself. */ @@ -145,7 +153,7 @@ public WorkbookTemplateInner withGalleries(List galleri /** * Get the localized property: Key value pair of localized gallery. Each key is the locale code of languages * supported by the Azure portal. - * + * * @return the localized value. */ public Map> localized() { @@ -155,7 +163,7 @@ public Map> localized() { /** * Set the localized property: Key value pair of localized gallery. Each key is the locale code of languages * supported by the Azure portal. - * + * * @param localized the localized value to set. * @return the WorkbookTemplateInner object itself. */ @@ -169,7 +177,7 @@ public WorkbookTemplateInner withLocalized(Map> localized; - /** Creates an instance of WorkbookTemplateProperties class. */ + /** + * Creates an instance of WorkbookTemplateProperties class. + */ public WorkbookTemplateProperties() { } /** - * Get the priority property: Priority of the template. Determines which template to open when a workbook gallery is - * opened in viewer mode. - * + * Get the priority property: Priority of the template. Determines which template to open when a workbook gallery + * is opened in viewer mode. + * * @return the priority value. */ public Integer priority() { @@ -62,9 +66,9 @@ public Integer priority() { } /** - * Set the priority property: Priority of the template. Determines which template to open when a workbook gallery is - * opened in viewer mode. - * + * Set the priority property: Priority of the template. Determines which template to open when a workbook gallery + * is opened in viewer mode. + * * @param priority the priority value to set. * @return the WorkbookTemplateProperties object itself. */ @@ -75,7 +79,7 @@ public WorkbookTemplateProperties withPriority(Integer priority) { /** * Get the author property: Information about the author of the workbook template. - * + * * @return the author value. */ public String author() { @@ -84,7 +88,7 @@ public String author() { /** * Set the author property: Information about the author of the workbook template. - * + * * @param author the author value to set. * @return the WorkbookTemplateProperties object itself. */ @@ -95,7 +99,7 @@ public WorkbookTemplateProperties withAuthor(String author) { /** * Get the templateData property: Valid JSON object containing workbook template payload. - * + * * @return the templateData value. */ public Object templateData() { @@ -104,7 +108,7 @@ public Object templateData() { /** * Set the templateData property: Valid JSON object containing workbook template payload. - * + * * @param templateData the templateData value to set. * @return the WorkbookTemplateProperties object itself. */ @@ -115,7 +119,7 @@ public WorkbookTemplateProperties withTemplateData(Object templateData) { /** * Get the galleries property: Workbook galleries supported by the template. - * + * * @return the galleries value. */ public List galleries() { @@ -124,7 +128,7 @@ public List galleries() { /** * Set the galleries property: Workbook galleries supported by the template. - * + * * @param galleries the galleries value to set. * @return the WorkbookTemplateProperties object itself. */ @@ -136,7 +140,7 @@ public WorkbookTemplateProperties withGalleries(List ga /** * Get the localized property: Key value pair of localized gallery. Each key is the locale code of languages * supported by the Azure portal. - * + * * @return the localized value. */ public Map> localized() { @@ -146,7 +150,7 @@ public Map> localized() { /** * Set the localized property: Key value pair of localized gallery. Each key is the locale code of languages * supported by the Azure portal. - * + * * @param localized the localized value to set. * @return the WorkbookTemplateProperties object itself. */ @@ -157,33 +161,26 @@ public WorkbookTemplateProperties withLocalized(Map e.validate()); } if (localized() != null) { - localized() - .values() - .forEach( - e -> { - if (e != null) { - e.forEach(e1 -> e1.validate()); - } - }); + localized().values().forEach(e -> { + if (e != null) { + e.forEach(e1 -> e1.validate()); + } + }); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/package-info.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/package-info.java index 397d1c84bbde9..0cbe207e2c0b2 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 @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for ApplicationInsightsManagementClient. Composite Swagger for Application - * Insights Management Client. + * Package containing the inner data models for ApplicationInsightsManagementClient. + * Composite Swagger for Application Insights Management Client. */ 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 9476e4ce65f79..201b4763aeef0 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 @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for ApplicationInsightsManagementClient. Composite Swagger for Application - * Insights Management Client. + * Package containing the service clients for ApplicationInsightsManagementClient. + * Composite Swagger for Application Insights Management Client. */ 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 f21a9d83ae47b..83dbd2eebf35c 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 @@ -32,22 +32,28 @@ import java.util.List; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AnalyticsItemsClient. */ +/** + * An instance of this class provides access to all the operations defined in AnalyticsItemsClient. + */ public final class AnalyticsItemsClientImpl implements AnalyticsItemsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AnalyticsItemsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of AnalyticsItemsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AnalyticsItemsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(AnalyticsItemsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(AnalyticsItemsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -58,112 +64,81 @@ public final class AnalyticsItemsClientImpl implements AnalyticsItemsClient { @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface AnalyticsItemsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}") - @ExpectedResponses({200}) + @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("$host") String endpoint, @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, + @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); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item") - @ExpectedResponses({200}) + @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, + Mono> get(@HostParam("$host") String endpoint, @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, + @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); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> put( - @HostParam("$host") String endpoint, + Mono> put(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @PathParam("scopePath") ItemScopePath scopePath, - @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("scopePath") ItemScopePath scopePath, @QueryParam("api-version") String apiVersion, @QueryParam("overrideItem") Boolean overrideItem, @BodyParam("application/json") ApplicationInsightsComponentAnalyticsItemInner itemProperties, - @HeaderParam("Accept") String accept, - Context context); + @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}/{scopePath}/item") - @ExpectedResponses({200}) + @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("$host") String endpoint, @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("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); } /** * 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. + * 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. + * 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. + * only return the item information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Analytics Items defined within an Application Insights component along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> listWithResponseAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -178,63 +153,41 @@ private Mono>> lis 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(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, scopePath, apiVersion, 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. + * 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. + * 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. + * 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}. + * 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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -249,37 +202,26 @@ private Mono>> lis 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); + 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. - * + * * @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. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Analytics Items defined within an Application Insights component on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { + private Mono> listAsync(String resourceGroupName, + String resourceName, ItemScopePath scopePath) { final ItemScope scope = null; final ItemTypeParameter type = null; final Boolean includeContent = null; @@ -289,16 +231,16 @@ private Mono> listAsync( /** * 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. + * 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. + * 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. + * 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. @@ -306,13 +248,8 @@ private Mono> listAsync( * @return a list of Analytics Items defined within an Application Insights component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent, + 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(); @@ -320,19 +257,19 @@ public Response> listWithRe /** * 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. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Analytics Items defined within an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { + public List list(String resourceGroupName, String resourceName, + ItemScopePath scopePath) { final ItemScope scope = null; final ItemTypeParameter type = null; final Boolean includeContent = null; @@ -342,33 +279,29 @@ public List list( /** * 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. + * users with access to the Application Insights component. * @param id The Id of a specific item defined in the Application Insights component. * @param name The name of a specific item defined in the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific Analytics Items defined within an Application Insights component along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -383,30 +316,18 @@ private Mono> getWithRe 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(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, scopePath, apiVersion, 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. + * 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. @@ -414,27 +335,19 @@ private Mono> getWithRe * @throws 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}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -449,36 +362,26 @@ private Mono> getWithRe 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); + 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. - * + * * @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. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific Analytics Items defined within an Application Insights component on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { + private Mono getAsync(String resourceGroupName, String resourceName, + ItemScopePath scopePath) { final String id = null; final String name = null; return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) @@ -487,11 +390,11 @@ private Mono getAsync( /** * 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. + * 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. @@ -501,31 +404,26 @@ private Mono getAsync( * @return a specific Analytics Items defined within an Application Insights component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { + public Response getWithResponse(String resourceGroupName, + String resourceName, ItemScopePath scopePath, String id, String name, Context context) { return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name, context).block(); } /** * Gets a specific Analytics Items defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific Analytics Items defined within an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentAnalyticsItemInner get( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { + public ApplicationInsightsComponentAnalyticsItemInner get(String resourceGroupName, String resourceName, + ItemScopePath scopePath) { final String id = null; final String name = null; return getWithResponse(resourceGroupName, resourceName, scopePath, id, name, Context.NONE).getValue(); @@ -533,39 +431,32 @@ public ApplicationInsightsComponentAnalyticsItemInner get( /** * 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. + * 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. + * Insights component. * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. + * already exists. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @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}. + * 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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -585,60 +476,40 @@ private Mono> putWithRe final String apiVersion = "2015-05-01"; 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(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, scopePath, apiVersion, overrideItem, itemProperties, accept, 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. + * 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. + * Insights component. * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. + * 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}. + * 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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -658,41 +529,28 @@ private Mono> putWithRe 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); + 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. - * + * * @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. + * 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. + * 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 properties that define an Analytics item that is associated to an Application Insights component on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties) { + private Mono putAsync(String resourceGroupName, String resourceName, + ItemScopePath scopePath, ApplicationInsightsComponentAnalyticsItemInner itemProperties) { final Boolean overrideItem = null; return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -700,54 +558,47 @@ private Mono putAsync( /** * 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. + * 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. + * Insights component. * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. + * 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}. + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem, - Context context) { + public Response putWithResponse(String resourceGroupName, + String resourceName, ItemScopePath scopePath, ApplicationInsightsComponentAnalyticsItemInner itemProperties, + Boolean overrideItem, Context context) { return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem, context) .block(); } /** * Adds or Updates a specific Analytics Item within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. + * 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. + * 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 properties that define an Analytics item that is associated to an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentAnalyticsItemInner put( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties) { + public ApplicationInsightsComponentAnalyticsItemInner put(String resourceGroupName, String resourceName, + ItemScopePath scopePath, ApplicationInsightsComponentAnalyticsItemInner itemProperties) { final Boolean overrideItem = null; return putWithResponse(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem, Context.NONE) .getValue(); @@ -755,11 +606,11 @@ public ApplicationInsightsComponentAnalyticsItemInner put( /** * 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. + * users with access to the Application Insights component. * @param id The Id of a specific item defined in the Application Insights component. * @param name The name of a specific item defined in the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -768,19 +619,15 @@ public ApplicationInsightsComponentAnalyticsItemInner put( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -794,29 +641,18 @@ private Mono> deleteWithResponseAsync( } 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(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, scopePath, apiVersion, 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. + * 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. @@ -826,24 +662,15 @@ private Mono> deleteWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -857,26 +684,17 @@ private Mono> deleteWithResponseAsync( } 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); + 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. - * + * * @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. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -892,11 +710,11 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, It /** * 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. + * 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. @@ -906,23 +724,18 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, It * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { + public Response deleteWithResponse(String resourceGroupName, String resourceName, ItemScopePath scopePath, + String id, String name, Context context) { return deleteWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name, context).block(); } /** * 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. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. 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 54464dafaeaab..57abb82586b13 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 @@ -26,33 +26,20 @@ public final class AnalyticsItemsImpl implements AnalyticsItems { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public AnalyticsItemsImpl( - AnalyticsItemsClient innerClient, + public AnalyticsItemsImpl(AnalyticsItemsClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response> listWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent, + public Response> listWithResponse(String resourceGroupName, + String resourceName, ItemScopePath scopePath, ItemScope scope, ItemTypeParameter type, Boolean includeContent, Context context) { - Response> inner = - this - .serviceClient() - .listWithResponse(resourceGroupName, resourceName, scopePath, scope, type, includeContent, 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() + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + inner.getValue().stream() .map(inner1 -> new ApplicationInsightsComponentAnalyticsItemImpl(inner1, this.manager())) .collect(Collectors.toList())); } else { @@ -60,46 +47,35 @@ public Response> listWithRespons } } - public List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName, scopePath); + public List list(String resourceGroupName, String resourceName, + ItemScopePath scopePath) { + List inner + = this.serviceClient().list(resourceGroupName, resourceName, scopePath); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ApplicationInsightsComponentAnalyticsItemImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new ApplicationInsightsComponentAnalyticsItemImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } } - public Response getWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, scopePath, id, name, context); + public Response getWithResponse(String resourceGroupName, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentAnalyticsItemImpl(inner.getValue(), this.manager())); } else { return null; } } - public ApplicationInsightsComponentAnalyticsItem get( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { - ApplicationInsightsComponentAnalyticsItemInner inner = - this.serviceClient().get(resourceGroupName, resourceName, scopePath); + public ApplicationInsightsComponentAnalyticsItem get(String resourceGroupName, String resourceName, + ItemScopePath scopePath) { + ApplicationInsightsComponentAnalyticsItemInner inner + = this.serviceClient().get(resourceGroupName, resourceName, scopePath); if (inner != null) { return new ApplicationInsightsComponentAnalyticsItemImpl(inner, this.manager()); } else { @@ -107,35 +83,23 @@ public ApplicationInsightsComponentAnalyticsItem get( } } - public Response putWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem, - Context context) { - Response inner = - this - .serviceClient() - .putWithResponse(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem, context); + public Response putWithResponse(String resourceGroupName, + String resourceName, ItemScopePath scopePath, ApplicationInsightsComponentAnalyticsItemInner itemProperties, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentAnalyticsItemImpl(inner.getValue(), this.manager())); } else { return null; } } - public ApplicationInsightsComponentAnalyticsItem put( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties) { - ApplicationInsightsComponentAnalyticsItemInner inner = - this.serviceClient().put(resourceGroupName, resourceName, scopePath, itemProperties); + public ApplicationInsightsComponentAnalyticsItem put(String resourceGroupName, String resourceName, + ItemScopePath scopePath, ApplicationInsightsComponentAnalyticsItemInner itemProperties) { + ApplicationInsightsComponentAnalyticsItemInner inner + = this.serviceClient().put(resourceGroupName, resourceName, scopePath, itemProperties); if (inner != null) { return new ApplicationInsightsComponentAnalyticsItemImpl(inner, this.manager()); } else { @@ -143,13 +107,8 @@ public ApplicationInsightsComponentAnalyticsItem put( } } - public Response deleteWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { + public Response deleteWithResponse(String resourceGroupName, String resourceName, ItemScopePath scopePath, + String id, String name, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, scopePath, id, name, context); } 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 f6340d77058ab..f0f63d5802372 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 @@ -13,8 +13,7 @@ public final class AnnotationImpl implements Annotation { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - AnnotationImpl( - AnnotationInner innerObject, + AnnotationImpl(AnnotationInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 0df869f59b528..e5a1d0415251c 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 @@ -35,22 +35,28 @@ import java.util.List; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AnnotationsClient. */ +/** + * An instance of this class provides access to all the operations defined in AnnotationsClient. + */ public final class AnnotationsClientImpl implements AnnotationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AnnotationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of AnnotationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AnnotationsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(AnnotationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(AnnotationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -61,70 +67,48 @@ public final class AnnotationsClientImpl implements AnnotationsClient { @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface AnnotationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations") - @ExpectedResponses({200}) + @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, - @QueryParam("start") String start, - @QueryParam("end") String end, - @HeaderParam("Accept") String accept, + Mono> list(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @QueryParam("start") String start, @QueryParam("end") String end, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") AnnotationInner annotationProperties, - @HeaderParam("Accept") String accept, + 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") AnnotationInner annotationProperties, @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}/Annotations/{annotationId}") - @ExpectedResponses({200}) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("annotationId") String annotationId, - Context context); + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("annotationId") String annotationId, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("annotationId") String annotationId, - @HeaderParam("Accept") String accept, - Context context); + Mono>> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("annotationId") String annotationId, @HeaderParam("Accept") String accept, Context context); } /** * Gets the list of annotations for a component for given time range. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -133,26 +117,22 @@ Mono>> get( * @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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, String start, String end) { + 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.")); + 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.")); + 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.")); @@ -166,29 +146,16 @@ private Mono> listSinglePageAsync( 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)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .withContext(context -> 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the list of annotations for a component for given time range. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -198,26 +165,22 @@ private Mono> listSinglePageAsync( * @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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, String start, String end, Context context) { + 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.")); + 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.")); + 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.")); @@ -232,25 +195,15 @@ private Mono> listSinglePageAsync( 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)); + .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)); } /** * Gets the list of annotations for a component for given time range. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -258,18 +211,18 @@ private Mono> listSinglePageAsync( * @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 as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName, String start, String end) { + private PagedFlux listAsync(String resourceGroupName, String resourceName, String start, + String end) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, start, end)); } /** * Gets the list of annotations for a component for given time range. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -278,18 +231,18 @@ private PagedFlux listAsync( * @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 as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName, String start, String end, Context context) { + private PagedFlux listAsync(String resourceGroupName, String resourceName, String start, + String end, Context context) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, start, end, context)); } /** * Gets the list of annotations for a component for given time range. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -297,18 +250,18 @@ private PagedFlux listAsync( * @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 - * PagedIterable}. + * @return the list of annotations for a component for given time range as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, String start, String end) { + public PagedIterable list(String resourceGroupName, String resourceName, String start, + String end) { return new PagedIterable<>(listAsync(resourceGroupName, resourceName, start, end)); } /** * Gets the list of annotations for a component for given time range. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -317,45 +270,41 @@ public PagedIterable list( * @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 - * PagedIterable}. + * @return the list of annotations for a component for given time range as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, String start, String end, Context context) { + public PagedIterable list(String resourceGroupName, String resourceName, String start, String end, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, resourceName, start, end, context)); } /** * 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. + * Insights component. * @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) { + 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.")); + 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.")); + 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.")); @@ -369,28 +318,18 @@ private Mono>> createWithResponseAsync( final String apiVersion = "2015-05-01"; 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, annotationProperties, accept, 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. + * 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. @@ -398,23 +337,19 @@ private Mono>> createWithResponseAsync( * @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) { + 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.")); + 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.")); + 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.")); @@ -428,44 +363,36 @@ private Mono>> createWithResponseAsync( 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); + return service.create(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, annotationProperties, accept, context); } /** * 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. + * Insights component. * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createAsync( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { + private Mono> createAsync(String resourceGroupName, String resourceName, + AnnotationInner annotationProperties) { return createWithResponseAsync(resourceGroupName, resourceName, annotationProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. + * 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. @@ -473,32 +400,32 @@ private Mono> createAsync( * @return array of Annotation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> createWithResponse( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context) { + public Response> createWithResponse(String resourceGroupName, String resourceName, + AnnotationInner annotationProperties, Context context) { return createWithResponseAsync(resourceGroupName, resourceName, annotationProperties, context).block(); } /** * 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. + * Insights component. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List create( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { + public List create(String resourceGroupName, String resourceName, + AnnotationInner annotationProperties) { return createWithResponse(resourceGroupName, resourceName, annotationProperties, Context.NONE).getValue(); } /** * 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. @@ -508,23 +435,19 @@ public List create( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String annotationId) { + 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.")); + 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.")); + 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.")); @@ -534,23 +457,14 @@ private Mono> deleteWithResponseAsync( } final String apiVersion = "2015-05-01"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - annotationId, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, + 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. @@ -561,23 +475,19 @@ private Mono> deleteWithResponseAsync( * @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) { + 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.")); + 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.")); + 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.")); @@ -587,20 +497,13 @@ private Mono> deleteWithResponseAsync( } 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); + return service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, annotationId, context); } /** * 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. @@ -616,7 +519,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * 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. @@ -627,14 +530,14 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context) { + public Response deleteWithResponse(String resourceGroupName, String resourceName, String annotationId, + Context context) { return deleteWithResponseAsync(resourceGroupName, resourceName, annotationId, context).block(); } /** * 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. @@ -649,7 +552,7 @@ public void delete(String resourceGroupName, String resourceName, String annotat /** * 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. @@ -659,23 +562,19 @@ public void delete(String resourceGroupName, String resourceName, String annotat * @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) { + 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.")); + 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.")); + 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.")); @@ -686,24 +585,14 @@ private Mono>> getWithResponseAsync( 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, - annotationId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, + 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. @@ -714,23 +603,19 @@ private Mono>> getWithResponseAsync( * @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) { + 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.")); + 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.")); + 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.")); @@ -741,21 +626,13 @@ private Mono>> getWithResponseAsync( 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); + return service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, annotationId, accept, context); } /** * 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. @@ -772,7 +649,7 @@ private Mono> getAsync(String resourceGroupName, String re /** * 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. @@ -783,14 +660,14 @@ private Mono> getAsync(String resourceGroupName, String re * @return the annotation for given id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> getWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context) { + public Response> getWithResponse(String resourceGroupName, String resourceName, + String annotationId, Context context) { return getWithResponseAsync(resourceGroupName, resourceName, annotationId, context).block(); } /** * 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. 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 fd1133b807aa2..5597ce7fd4f43 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 @@ -24,8 +24,7 @@ public final class AnnotationsImpl implements Annotations { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public AnnotationsImpl( - AnnotationsClient innerClient, + public AnnotationsImpl(AnnotationsClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -33,53 +32,42 @@ public AnnotationsImpl( public PagedIterable list(String resourceGroupName, String resourceName, String start, String end) { PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName, start, end); - return Utils.mapPage(inner, inner1 -> new AnnotationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AnnotationImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String resourceName, String start, String end, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName, start, end, context); - return Utils.mapPage(inner, inner1 -> new AnnotationImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String resourceName, String start, String end, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, start, end, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AnnotationImpl(inner1, this.manager())); } - public Response> createWithResponse( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context) { - Response> inner = - this.serviceClient().createWithResponse(resourceGroupName, resourceName, annotationProperties, context); + public Response> createWithResponse(String resourceGroupName, String resourceName, + 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())); + 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; } } - public List create( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { - List inner = - this.serviceClient().create(resourceGroupName, resourceName, annotationProperties); + public List create(String resourceGroupName, String resourceName, + AnnotationInner annotationProperties) { + List inner + = this.serviceClient().create(resourceGroupName, resourceName, annotationProperties); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new AnnotationImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new AnnotationImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } } - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context) { + public Response deleteWithResponse(String resourceGroupName, String resourceName, String annotationId, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, annotationId, context); } @@ -87,20 +75,13 @@ public void delete(String resourceGroupName, String resourceName, String annotat this.serviceClient().delete(resourceGroupName, resourceName, annotationId); } - public Response> getWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context) { - Response> inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, annotationId, context); + public Response> getWithResponse(String resourceGroupName, String resourceName, + 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())); + 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; } @@ -109,12 +90,8 @@ public Response> getWithResponse( public List get(String resourceGroupName, String resourceName, String annotationId) { List inner = this.serviceClient().get(resourceGroupName, resourceName, annotationId); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new AnnotationImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new AnnotationImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } 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 d7d5e9101e8be..feb77f6f5ded0 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 @@ -34,17 +34,23 @@ import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentApiKeyListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ApiKeysClient. */ +/** + * An instance of this class provides access to all the operations defined in ApiKeysClient. + */ public final class ApiKeysClientImpl implements ApiKeysClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ApiKeysService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of ApiKeysClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ApiKeysClientImpl(ApplicationInsightsManagementClientImpl client) { @@ -59,95 +65,69 @@ public final class ApiKeysClientImpl implements ApiKeysClient { @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface ApiKeysService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys") - @ExpectedResponses({200}) + @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, - @HeaderParam("Accept") String accept, - Context context); + 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); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ApiKeyRequest apiKeyProperties, - @HeaderParam("Accept") String accept, + 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") ApiKeyRequest apiKeyProperties, @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}) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("keyId") String keyId, - @HeaderParam("Accept") String accept, - Context context); + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @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}) + @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("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("keyId") String keyId, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("keyId") String keyId, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of API keys of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + 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.")); @@ -155,27 +135,16 @@ private Mono> listSingleP 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of API keys 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. @@ -183,26 +152,22 @@ private Mono> listSingleP * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + 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.")); @@ -211,23 +176,15 @@ private Mono> listSingleP 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)); + .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)); } /** * Gets a list of API keys of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,14 +193,14 @@ private Mono> listSingleP * @return a list of API keys of an Application Insights component as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName) { + private PagedFlux listAsync(String resourceGroupName, + String resourceName) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName)); } /** * Gets a list of API keys 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. @@ -253,14 +210,14 @@ private PagedFlux listAsync( * @return a list of API keys of an Application Insights component as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName, Context context) { + private PagedFlux listAsync(String resourceGroupName, String resourceName, + Context context) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context)); } /** * Gets a list of API keys of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -275,7 +232,7 @@ public PagedIterable list(String resour /** * Gets a list of API keys 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. @@ -285,42 +242,38 @@ public PagedIterable list(String resour * @return a list of API keys of an Application Insights component as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, resourceName, 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 - * component. + * 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 properties that define an API key of an Application Insights Component along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { + 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.")); + 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.")); + 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.")); @@ -334,53 +287,39 @@ private Mono> createWithRespon final String apiVersion = "2015-05-01"; 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, apiKeyProperties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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 - * component. + * 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context) { + 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.")); + 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.")); + 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.")); @@ -394,45 +333,37 @@ private Mono> createWithRespon 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); + 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 - * component. + * 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 properties that define an API key of an Application Insights Component on successful completion of {@link - * Mono}. + * @return properties that define an API key of an Application Insights Component on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { + private Mono createAsync(String resourceGroupName, String resourceName, + ApiKeyRequest apiKeyProperties) { return createWithResponseAsync(resourceGroupName, resourceName, apiKeyProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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 - * component. + * 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. @@ -440,32 +371,32 @@ private Mono createAsync( * @return properties that define an API key of an Application Insights Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context) { + public Response createWithResponse(String resourceGroupName, + String resourceName, ApiKeyRequest apiKeyProperties, Context context) { return createWithResponseAsync(resourceGroupName, resourceName, apiKeyProperties, context).block(); } /** * 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 - * component. + * 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 properties that define an API key of an Application Insights Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentApiKeyInner create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { + public ApplicationInsightsComponentApiKeyInner create(String resourceGroupName, String resourceName, + ApiKeyRequest apiKeyProperties) { return createWithResponse(resourceGroupName, resourceName, apiKeyProperties, Context.NONE).getValue(); } /** * 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. @@ -473,26 +404,22 @@ public ApplicationInsightsComponentApiKeyInner create( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define an API key of an Application Insights Component along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String keyId) { + 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.")); + 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.")); + 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.")); @@ -503,24 +430,14 @@ private Mono> deleteWithRespon final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - keyId, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, + 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. @@ -529,26 +446,22 @@ private Mono> deleteWithRespon * @throws 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String keyId, Context context) { + 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.")); + 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.")); + 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.")); @@ -559,40 +472,32 @@ private Mono> deleteWithRespon 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); + return service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, keyId, accept, context); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link - * Mono}. + * @return properties that define an API key of an Application Insights Component on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String resourceName, String keyId) { + private Mono deleteAsync(String resourceGroupName, String resourceName, + String keyId) { return deleteWithResponseAsync(resourceGroupName, resourceName, keyId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -603,14 +508,14 @@ private Mono deleteAsync( * @return properties that define an API key of an Application Insights Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context) { + public Response deleteWithResponse(String resourceGroupName, + String resourceName, String keyId, Context context) { return deleteWithResponseAsync(resourceGroupName, resourceName, keyId, context).block(); } /** * 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. @@ -626,7 +531,7 @@ public ApplicationInsightsComponentApiKeyInner delete(String resourceGroupName, /** * 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. @@ -636,23 +541,19 @@ public ApplicationInsightsComponentApiKeyInner delete(String resourceGroupName, * @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) { + 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.")); + 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.")); + 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.")); @@ -663,24 +564,14 @@ private Mono> getWithResponseA 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, - keyId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, + 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. @@ -691,23 +582,19 @@ private Mono> getWithResponseA * @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) { + 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.")); + 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.")); + 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.")); @@ -718,21 +605,13 @@ private Mono> getWithResponseA 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); + return service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, keyId, accept, context); } /** * 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. @@ -742,15 +621,15 @@ private Mono> getWithResponseA * @return the API Key for this key id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, String keyId) { + private Mono getAsync(String resourceGroupName, String resourceName, + String keyId) { return getWithResponseAsync(resourceGroupName, resourceName, keyId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -761,14 +640,14 @@ private Mono getAsync( * @return the API Key for this key id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context) { + public Response getWithResponse(String resourceGroupName, + String resourceName, String keyId, Context context) { return getWithResponseAsync(resourceGroupName, resourceName, keyId, context).block(); } /** * 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. 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 fed98f799dfb3..71ecd08d787d1 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 @@ -22,45 +22,43 @@ public final class ApiKeysImpl implements ApiKeys { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public ApiKeysImpl( - ApiKeysClient innerClient, + public ApiKeysImpl(ApiKeysClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String resourceName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentApiKeyImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ApplicationInsightsComponentApiKeyImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName, context); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentApiKeyImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ApplicationInsightsComponentApiKeyImpl(inner1, this.manager())); } - public Response createWithResponse( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context) { - Response inner = - this.serviceClient().createWithResponse(resourceGroupName, resourceName, apiKeyProperties, context); + public Response createWithResponse(String resourceGroupName, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); } else { return null; } } - public ApplicationInsightsComponentApiKey create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { - ApplicationInsightsComponentApiKeyInner inner = - this.serviceClient().create(resourceGroupName, resourceName, apiKeyProperties); + public ApplicationInsightsComponentApiKey create(String resourceGroupName, String resourceName, + ApiKeyRequest apiKeyProperties) { + ApplicationInsightsComponentApiKeyInner inner + = this.serviceClient().create(resourceGroupName, resourceName, apiKeyProperties); if (inner != null) { return new ApplicationInsightsComponentApiKeyImpl(inner, this.manager()); } else { @@ -68,15 +66,12 @@ public ApplicationInsightsComponentApiKey create( } } - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context) { - Response inner = - this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, keyId, context); + public Response deleteWithResponse(String resourceGroupName, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); } else { return null; @@ -84,8 +79,8 @@ public Response deleteWithResponse( } public ApplicationInsightsComponentApiKey delete(String resourceGroupName, String resourceName, String keyId) { - ApplicationInsightsComponentApiKeyInner inner = - this.serviceClient().delete(resourceGroupName, resourceName, keyId); + ApplicationInsightsComponentApiKeyInner inner + = this.serviceClient().delete(resourceGroupName, resourceName, keyId); if (inner != null) { return new ApplicationInsightsComponentApiKeyImpl(inner, this.manager()); } else { @@ -93,15 +88,12 @@ public ApplicationInsightsComponentApiKey delete(String resourceGroupName, Strin } } - public Response getWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, keyId, context); + public Response getWithResponse(String resourceGroupName, String resourceName, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); } else { return null; @@ -109,8 +101,8 @@ public Response getWithResponse( } public ApplicationInsightsComponentApiKey get(String resourceGroupName, String resourceName, String keyId) { - ApplicationInsightsComponentApiKeyInner inner = - this.serviceClient().get(resourceGroupName, resourceName, keyId); + ApplicationInsightsComponentApiKeyInner inner + = this.serviceClient().get(resourceGroupName, resourceName, keyId); if (inner != null) { return new ApplicationInsightsComponentApiKeyImpl(inner, this.manager()); } else { 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 cffbb8132df79..1d19364be539d 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 @@ -15,8 +15,7 @@ public final class ApplicationInsightsComponentAnalyticsItemImpl implements Appl private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - ApplicationInsightsComponentAnalyticsItemImpl( - ApplicationInsightsComponentAnalyticsItemInner innerObject, + ApplicationInsightsComponentAnalyticsItemImpl(ApplicationInsightsComponentAnalyticsItemInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 34cc80397f98a..70e48c3874bc5 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 @@ -14,8 +14,7 @@ public final class ApplicationInsightsComponentApiKeyImpl implements Application private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - ApplicationInsightsComponentApiKeyImpl( - ApplicationInsightsComponentApiKeyInner innerObject, + ApplicationInsightsComponentApiKeyImpl(ApplicationInsightsComponentApiKeyInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 b86b405574e4a..7548ca27fe30d 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 @@ -16,8 +16,7 @@ public final class ApplicationInsightsComponentAvailableFeaturesImpl private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - ApplicationInsightsComponentAvailableFeaturesImpl( - ApplicationInsightsComponentAvailableFeaturesInner innerObject, + ApplicationInsightsComponentAvailableFeaturesImpl(ApplicationInsightsComponentAvailableFeaturesInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 7d1291accc623..fec17b1511e12 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 @@ -16,8 +16,7 @@ public final class ApplicationInsightsComponentBillingFeaturesImpl private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - ApplicationInsightsComponentBillingFeaturesImpl( - ApplicationInsightsComponentBillingFeaturesInner innerObject, + ApplicationInsightsComponentBillingFeaturesImpl(ApplicationInsightsComponentBillingFeaturesInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 8317f75860217..5b11fb162ca5e 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 @@ -15,8 +15,7 @@ public final class ApplicationInsightsComponentFavoriteImpl implements Applicati private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - ApplicationInsightsComponentFavoriteImpl( - ApplicationInsightsComponentFavoriteInner innerObject, + ApplicationInsightsComponentFavoriteImpl(ApplicationInsightsComponentFavoriteInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 402d3bdf7e4fa..2a0148e09f292 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 @@ -23,10 +23,8 @@ import java.util.List; import java.util.Map; -public final class ApplicationInsightsComponentImpl - implements ApplicationInsightsComponent, - ApplicationInsightsComponent.Definition, - ApplicationInsightsComponent.Update { +public final class ApplicationInsightsComponentImpl implements ApplicationInsightsComponent, + ApplicationInsightsComponent.Definition, ApplicationInsightsComponent.Update { private ApplicationInsightsComponentInner innerObject; private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; @@ -201,27 +199,19 @@ public ApplicationInsightsComponentImpl withExistingResourceGroup(String resourc } public ApplicationInsightsComponent create() { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getComponents() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), Context.NONE).getValue(); return this; } public ApplicationInsightsComponent create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getComponents() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), context).getValue(); return this; } - ApplicationInsightsComponentImpl( - String name, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { + ApplicationInsightsComponentImpl(String name, + com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = new ApplicationInsightsComponentInner(); this.serviceManager = serviceManager; this.resourceName = name; @@ -233,51 +223,34 @@ public ApplicationInsightsComponentImpl update() { } public ApplicationInsightsComponent apply() { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .updateTagsWithResponse(resourceGroupName, resourceName, updateComponentTags, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getComponents() + .updateTagsWithResponse(resourceGroupName, resourceName, updateComponentTags, Context.NONE).getValue(); return this; } public ApplicationInsightsComponent apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .updateTagsWithResponse(resourceGroupName, resourceName, updateComponentTags, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getComponents() + .updateTagsWithResponse(resourceGroupName, resourceName, updateComponentTags, context).getValue(); return this; } - ApplicationInsightsComponentImpl( - ApplicationInsightsComponentInner innerObject, + ApplicationInsightsComponentImpl(ApplicationInsightsComponentInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "components"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "components"); } public ApplicationInsightsComponent refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getComponents() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); return this; } public ApplicationInsightsComponent refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getComponents() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, context).getValue(); return this; } @@ -364,14 +337,14 @@ public ApplicationInsightsComponentImpl withWorkspaceResourceId(String workspace return this; } - public ApplicationInsightsComponentImpl withPublicNetworkAccessForIngestion( - PublicNetworkAccessType publicNetworkAccessForIngestion) { + public ApplicationInsightsComponentImpl + withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion) { this.innerModel().withPublicNetworkAccessForIngestion(publicNetworkAccessForIngestion); return this; } - public ApplicationInsightsComponentImpl withPublicNetworkAccessForQuery( - PublicNetworkAccessType publicNetworkAccessForQuery) { + public ApplicationInsightsComponentImpl + withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery) { this.innerModel().withPublicNetworkAccessForQuery(publicNetworkAccessForQuery); return this; } @@ -386,8 +359,8 @@ public ApplicationInsightsComponentImpl withDisableLocalAuth(Boolean disableLoca return this; } - public ApplicationInsightsComponentImpl withForceCustomerStorageForProfiler( - Boolean forceCustomerStorageForProfiler) { + public ApplicationInsightsComponentImpl + withForceCustomerStorageForProfiler(Boolean forceCustomerStorageForProfiler) { this.innerModel().withForceCustomerStorageForProfiler(forceCustomerStorageForProfiler); return this; } 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 981122afd40ee..ad2fbb09429b3 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 @@ -12,8 +12,7 @@ public final class ApplicationInsightsComponentQuotaStatusImpl implements Applic private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - ApplicationInsightsComponentQuotaStatusImpl( - ApplicationInsightsComponentQuotaStatusInner innerObject, + ApplicationInsightsComponentQuotaStatusImpl(ApplicationInsightsComponentQuotaStatusInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 d93373b979fe6..7a9504e7a0b26 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 @@ -13,8 +13,7 @@ public final class ApplicationInsightsComponentWebTestLocationImpl private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - ApplicationInsightsComponentWebTestLocationImpl( - ApplicationInsightsComponentWebTestLocationInner innerObject, + ApplicationInsightsComponentWebTestLocationImpl(ApplicationInsightsComponentWebTestLocationInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 5737226d855c1..95c50fa94c2bc 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 @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the ApplicationInsightsManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {ApplicationInsightsManagementClientImpl.class}) +/** + * A builder for creating a new instance of the ApplicationInsightsManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { ApplicationInsightsManagementClientImpl.class }) public final class ApplicationInsightsManagementClientBuilder { /* * The ID of the target subscription. @@ -24,7 +26,7 @@ public final class ApplicationInsightsManagementClientBuilder { /** * Sets The ID of the target subscription. - * + * * @param subscriptionId the subscriptionId value. * @return the ApplicationInsightsManagementClientBuilder. */ @@ -40,7 +42,7 @@ public ApplicationInsightsManagementClientBuilder subscriptionId(String subscrip /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the ApplicationInsightsManagementClientBuilder. */ @@ -56,7 +58,7 @@ public ApplicationInsightsManagementClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the ApplicationInsightsManagementClientBuilder. */ @@ -72,7 +74,7 @@ public ApplicationInsightsManagementClientBuilder environment(AzureEnvironment e /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the ApplicationInsightsManagementClientBuilder. */ @@ -88,7 +90,7 @@ public ApplicationInsightsManagementClientBuilder pipeline(HttpPipeline pipeline /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the ApplicationInsightsManagementClientBuilder. */ @@ -104,7 +106,7 @@ public ApplicationInsightsManagementClientBuilder defaultPollInterval(Duration d /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the ApplicationInsightsManagementClientBuilder. */ @@ -115,30 +117,20 @@ public ApplicationInsightsManagementClientBuilder serializerAdapter(SerializerAd /** * Builds an instance of ApplicationInsightsManagementClientImpl with the provided parameters. - * + * * @return an instance of ApplicationInsightsManagementClientImpl. */ public ApplicationInsightsManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - ApplicationInsightsManagementClientImpl client = - new ApplicationInsightsManagementClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + ApplicationInsightsManagementClientImpl client = new ApplicationInsightsManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java index a35ee5472398d..cc15220ddf533 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 @@ -29,12 +29,12 @@ import com.azure.resourcemanager.applicationinsights.fluent.ComponentAvailableFeaturesClient; import com.azure.resourcemanager.applicationinsights.fluent.ComponentCurrentBillingFeaturesClient; import com.azure.resourcemanager.applicationinsights.fluent.ComponentFeatureCapabilitiesClient; +import com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient; import com.azure.resourcemanager.applicationinsights.fluent.ComponentQuotaStatusClient; import com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient; import com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient; import com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient; import com.azure.resourcemanager.applicationinsights.fluent.LiveTokensClient; -import com.azure.resourcemanager.applicationinsights.fluent.MyWorkbooksClient; import com.azure.resourcemanager.applicationinsights.fluent.OperationsClient; import com.azure.resourcemanager.applicationinsights.fluent.ProactiveDetectionConfigurationsClient; import com.azure.resourcemanager.applicationinsights.fluent.WebTestLocationsClient; @@ -51,300 +51,350 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the ApplicationInsightsManagementClientImpl type. */ +/** + * Initializes a new instance of the ApplicationInsightsManagementClientImpl type. + */ @ServiceClient(builder = ApplicationInsightsManagementClientBuilder.class) public final class ApplicationInsightsManagementClientImpl implements ApplicationInsightsManagementClient { - /** The ID of the target subscription. */ + /** + * The ID of the target subscription. + */ private final String subscriptionId; /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The ComponentsClient object to access its operations. */ + /** + * The ComponentsClient object to access its operations. + */ private final ComponentsClient components; /** * Gets the ComponentsClient object to access its operations. - * + * * @return the ComponentsClient object. */ public ComponentsClient getComponents() { return this.components; } - /** The AnnotationsClient object to access its operations. */ + /** + * The AnnotationsClient object to access its operations. + */ private final AnnotationsClient annotations; /** * Gets the AnnotationsClient object to access its operations. - * + * * @return the AnnotationsClient object. */ public AnnotationsClient getAnnotations() { return this.annotations; } - /** The ApiKeysClient object to access its operations. */ + /** + * The ApiKeysClient object to access its operations. + */ private final ApiKeysClient apiKeys; /** * Gets the ApiKeysClient object to access its operations. - * + * * @return the ApiKeysClient object. */ public ApiKeysClient getApiKeys() { return this.apiKeys; } - /** The ExportConfigurationsClient object to access its operations. */ + /** + * The ExportConfigurationsClient object to access its operations. + */ private final ExportConfigurationsClient exportConfigurations; /** * Gets the ExportConfigurationsClient object to access its operations. - * + * * @return the ExportConfigurationsClient object. */ public ExportConfigurationsClient getExportConfigurations() { return this.exportConfigurations; } - /** The ComponentCurrentBillingFeaturesClient object to access its operations. */ + /** + * The ComponentCurrentBillingFeaturesClient object to access its operations. + */ private final ComponentCurrentBillingFeaturesClient componentCurrentBillingFeatures; /** * Gets the ComponentCurrentBillingFeaturesClient object to access its operations. - * + * * @return the ComponentCurrentBillingFeaturesClient object. */ public ComponentCurrentBillingFeaturesClient getComponentCurrentBillingFeatures() { return this.componentCurrentBillingFeatures; } - /** The ComponentQuotaStatusClient object to access its operations. */ + /** + * The ComponentQuotaStatusClient object to access its operations. + */ private final ComponentQuotaStatusClient componentQuotaStatus; /** * Gets the ComponentQuotaStatusClient object to access its operations. - * + * * @return the ComponentQuotaStatusClient object. */ public ComponentQuotaStatusClient getComponentQuotaStatus() { return this.componentQuotaStatus; } - /** The ComponentFeatureCapabilitiesClient object to access its operations. */ + /** + * The ComponentFeatureCapabilitiesClient object to access its operations. + */ private final ComponentFeatureCapabilitiesClient componentFeatureCapabilities; /** * Gets the ComponentFeatureCapabilitiesClient object to access its operations. - * + * * @return the ComponentFeatureCapabilitiesClient object. */ public ComponentFeatureCapabilitiesClient getComponentFeatureCapabilities() { return this.componentFeatureCapabilities; } - /** The ComponentAvailableFeaturesClient object to access its operations. */ + /** + * The ComponentAvailableFeaturesClient object to access its operations. + */ private final ComponentAvailableFeaturesClient componentAvailableFeatures; /** * Gets the ComponentAvailableFeaturesClient object to access its operations. - * + * * @return the ComponentAvailableFeaturesClient object. */ public ComponentAvailableFeaturesClient getComponentAvailableFeatures() { return this.componentAvailableFeatures; } - /** The ProactiveDetectionConfigurationsClient object to access its operations. */ + /** + * The ProactiveDetectionConfigurationsClient object to access its operations. + */ private final ProactiveDetectionConfigurationsClient proactiveDetectionConfigurations; /** * Gets the ProactiveDetectionConfigurationsClient object to access its operations. - * + * * @return the ProactiveDetectionConfigurationsClient object. */ public ProactiveDetectionConfigurationsClient getProactiveDetectionConfigurations() { return this.proactiveDetectionConfigurations; } - /** The WorkItemConfigurationsClient object to access its operations. */ + /** + * The WorkItemConfigurationsClient object to access its operations. + */ private final WorkItemConfigurationsClient workItemConfigurations; /** * Gets the WorkItemConfigurationsClient object to access its operations. - * + * * @return the WorkItemConfigurationsClient object. */ public WorkItemConfigurationsClient getWorkItemConfigurations() { return this.workItemConfigurations; } - /** The FavoritesClient object to access its operations. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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 AnalyticsItemsClient object to access its operations. + */ private final AnalyticsItemsClient analyticsItems; /** * Gets the AnalyticsItemsClient object to access its operations. - * + * * @return the AnalyticsItemsClient object. */ public AnalyticsItemsClient getAnalyticsItems() { return this.analyticsItems; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The WorkbookTemplatesClient object to access its operations. */ + /** + * The WorkbookTemplatesClient object to access its operations. + */ private final WorkbookTemplatesClient workbookTemplates; /** * Gets the WorkbookTemplatesClient object to access its operations. - * + * * @return the WorkbookTemplatesClient object. */ public WorkbookTemplatesClient getWorkbookTemplates() { return this.workbookTemplates; } - /** The MyWorkbooksClient object to access its operations. */ - private final MyWorkbooksClient myWorkbooks; - /** - * Gets the MyWorkbooksClient object to access its operations. - * - * @return the MyWorkbooksClient object. + * The WorkbooksClient object to access its operations. */ - public MyWorkbooksClient getMyWorkbooks() { - return this.myWorkbooks; - } - - /** 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 LiveTokensClient object to access its operations. */ + /** + * The LiveTokensClient object to access its operations. + */ private final LiveTokensClient liveTokens; /** * Gets the LiveTokensClient object to access its operations. - * + * * @return the LiveTokensClient object. */ public LiveTokensClient getLiveTokens() { return this.liveTokens; } + /** + * 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; + } + /** * Initializes an instance of ApplicationInsightsManagementClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -352,13 +402,8 @@ public LiveTokensClient getLiveTokens() { * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ - ApplicationInsightsManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + ApplicationInsightsManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; @@ -380,14 +425,14 @@ public LiveTokensClient getLiveTokens() { this.analyticsItems = new AnalyticsItemsClientImpl(this); this.operations = new OperationsClientImpl(this); this.workbookTemplates = new WorkbookTemplatesClientImpl(this); - this.myWorkbooks = new MyWorkbooksClientImpl(this); this.workbooks = new WorkbooksClientImpl(this); this.liveTokens = new LiveTokensClientImpl(this); + this.componentLinkedStorageAccountsOperations = new ComponentLinkedStorageAccountsOperationsClientImpl(this); } /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -396,7 +441,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -406,7 +451,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -416,26 +461,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -448,19 +482,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } diff --git a/sdk/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 223bcd0b2587e..3791849c3b794 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 @@ -25,24 +25,28 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ComponentAvailableFeaturesClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentAvailableFeaturesClient. + */ public final class ComponentAvailableFeaturesClientImpl implements ComponentAvailableFeaturesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ComponentAvailableFeaturesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of ComponentAvailableFeaturesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ComponentAvailableFeaturesClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create( - ComponentAvailableFeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ComponentAvailableFeaturesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -53,50 +57,41 @@ public final class ComponentAvailableFeaturesClientImpl implements ComponentAvai @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface ComponentAvailableFeaturesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/getavailablebillingfeatures") - @ExpectedResponses({200}) + @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, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@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); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + 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.")); @@ -104,23 +99,14 @@ private Mono> getWi 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), 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. @@ -128,26 +114,22 @@ private Mono> getWi * @throws 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + 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.")); @@ -155,20 +137,13 @@ private Mono> getWi 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); + return service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, accept, context); } /** * Returns all available features of the application insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,14 +152,14 @@ private Mono> getWi * @return an Application Insights component available features on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName) { + private Mono getAsync(String resourceGroupName, + String resourceName) { return getWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -194,14 +169,14 @@ private Mono getAsync( * @return an Application Insights component available features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response getWithResponse(String resourceGroupName, + String resourceName, Context context) { return getWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 c5c04b13f586d..2bf83f70cbb3b 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 @@ -20,22 +20,18 @@ public final class ComponentAvailableFeaturesImpl implements ComponentAvailableF private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public ComponentAvailableFeaturesImpl( - ComponentAvailableFeaturesClient innerClient, + public ComponentAvailableFeaturesImpl(ComponentAvailableFeaturesClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); + public Response getWithResponse(String resourceGroupName, + String resourceName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentAvailableFeaturesImpl(inner.getValue(), this.manager())); } else { return null; @@ -43,8 +39,8 @@ public Response getWithResponse( } public ApplicationInsightsComponentAvailableFeatures get(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentAvailableFeaturesInner inner = - this.serviceClient().get(resourceGroupName, resourceName); + ApplicationInsightsComponentAvailableFeaturesInner inner + = this.serviceClient().get(resourceGroupName, resourceName); if (inner != null) { return new ApplicationInsightsComponentAvailableFeaturesImpl(inner, this.manager()); } else { 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 3ea8f0b6a0361..c29ba11acf235 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 @@ -27,95 +27,83 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ComponentCurrentBillingFeaturesClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentCurrentBillingFeaturesClient. + */ public final class ComponentCurrentBillingFeaturesClientImpl implements ComponentCurrentBillingFeaturesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ComponentCurrentBillingFeaturesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of ComponentCurrentBillingFeaturesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ComponentCurrentBillingFeaturesClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create( - ComponentCurrentBillingFeaturesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ComponentCurrentBillingFeaturesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ApplicationInsightsManagementClientComponentCurrentBillingFeatures to - * be used by the proxy service to perform REST calls. + * The interface defining all the services for ApplicationInsightsManagementClientComponentCurrentBillingFeatures + * to be used by the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface ComponentCurrentBillingFeaturesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures") - @ExpectedResponses({200}) + @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, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@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); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @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("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, @BodyParam("application/json") ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * Returns current billing features for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + 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.")); @@ -123,23 +111,14 @@ private Mono> getWith 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), 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. @@ -147,26 +126,22 @@ private Mono> getWith * @throws 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + 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.")); @@ -174,20 +149,13 @@ private Mono> getWith 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); + return service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, accept, context); } /** * Returns current billing features for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -196,14 +164,14 @@ private Mono> getWith * @return an Application Insights component billing features on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName) { + private Mono getAsync(String resourceGroupName, + String resourceName) { return getWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -213,14 +181,14 @@ private Mono getAsync( * @return an Application Insights component billing features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response getWithResponse(String resourceGroupName, + String resourceName, Context context) { return getWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -235,157 +203,122 @@ public ApplicationInsightsComponentBillingFeaturesInner get(String resourceGroup /** * 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. + * 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 billing features along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, + 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.")); + 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.")); + 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.")); + 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"; 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, billingFeaturesProperties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. + * 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - Context context) { + 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.")); + 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.")); + 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.")); + 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); + 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. + * 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 billing features on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { + private Mono updateAsync(String resourceGroupName, + String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { return updateWithResponseAsync(resourceGroupName, resourceName, billingFeaturesProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. + * 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. @@ -393,30 +326,26 @@ private Mono updateAsync( * @return an Application Insights component billing features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, + public Response updateWithResponse(String resourceGroupName, + String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, Context context) { return updateWithResponseAsync(resourceGroupName, resourceName, billingFeaturesProperties, context).block(); } /** * 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. + * 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 billing features. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentBillingFeaturesInner update( - String resourceGroupName, - String resourceName, + public ApplicationInsightsComponentBillingFeaturesInner update(String resourceGroupName, String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { return updateWithResponse(resourceGroupName, resourceName, billingFeaturesProperties, Context.NONE).getValue(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java index b2d95c3b1f09e..6b85091aacaa8 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 @@ -20,22 +20,18 @@ public final class ComponentCurrentBillingFeaturesImpl implements ComponentCurre private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public ComponentCurrentBillingFeaturesImpl( - ComponentCurrentBillingFeaturesClient innerClient, + public ComponentCurrentBillingFeaturesImpl(ComponentCurrentBillingFeaturesClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); + public Response getWithResponse(String resourceGroupName, + String resourceName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentBillingFeaturesImpl(inner.getValue(), this.manager())); } else { return null; @@ -43,8 +39,8 @@ public Response getWithResponse( } public ApplicationInsightsComponentBillingFeatures get(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentBillingFeaturesInner inner = - this.serviceClient().get(resourceGroupName, resourceName); + ApplicationInsightsComponentBillingFeaturesInner inner + = this.serviceClient().get(resourceGroupName, resourceName); if (inner != null) { return new ApplicationInsightsComponentBillingFeaturesImpl(inner, this.manager()); } else { @@ -52,32 +48,23 @@ public ApplicationInsightsComponentBillingFeatures get(String resourceGroupName, } } - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, + public Response updateWithResponse(String resourceGroupName, + String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse(resourceGroupName, resourceName, billingFeaturesProperties, context); + Response inner = this.serviceClient() + .updateWithResponse(resourceGroupName, resourceName, billingFeaturesProperties, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentBillingFeaturesImpl(inner.getValue(), this.manager())); } else { return null; } } - public ApplicationInsightsComponentBillingFeatures update( - String resourceGroupName, - String resourceName, + public ApplicationInsightsComponentBillingFeatures update(String resourceGroupName, String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { - ApplicationInsightsComponentBillingFeaturesInner inner = - this.serviceClient().update(resourceGroupName, resourceName, billingFeaturesProperties); + ApplicationInsightsComponentBillingFeaturesInner inner + = this.serviceClient().update(resourceGroupName, resourceName, billingFeaturesProperties); if (inner != null) { return new ApplicationInsightsComponentBillingFeaturesImpl(inner, this.manager()); } else { 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 61662951a0c25..d74e0ebdc2bc5 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 @@ -25,78 +25,73 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ComponentFeatureCapabilitiesClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentFeatureCapabilitiesClient. + */ public final class ComponentFeatureCapabilitiesClientImpl implements ComponentFeatureCapabilitiesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ComponentFeatureCapabilitiesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of ComponentFeatureCapabilitiesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ComponentFeatureCapabilitiesClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create( - ComponentFeatureCapabilitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ComponentFeatureCapabilitiesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ApplicationInsightsManagementClientComponentFeatureCapabilities to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for ApplicationInsightsManagementClientComponentFeatureCapabilities to + * be used by the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface ComponentFeatureCapabilitiesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/featurecapabilities") - @ExpectedResponses({200}) + @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, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@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); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + 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.")); @@ -104,23 +99,14 @@ private Mono> get 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), 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. @@ -128,26 +114,22 @@ private Mono> get * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + 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.")); @@ -155,20 +137,13 @@ private Mono> get 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); + return service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, accept, context); } /** * Returns feature capabilities of the application insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,14 +152,14 @@ private Mono> get * @return an Application Insights component feature capabilities on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName) { + private Mono getAsync(String resourceGroupName, + String resourceName) { return getWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -194,14 +169,14 @@ private Mono getAsync( * @return an Application Insights component feature capabilities along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response getWithResponse(String resourceGroupName, + String resourceName, Context context) { return getWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 b51c6e81ccd34..b634309c19d6f 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 @@ -20,22 +20,18 @@ public final class ComponentFeatureCapabilitiesImpl implements ComponentFeatureC private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public ComponentFeatureCapabilitiesImpl( - ComponentFeatureCapabilitiesClient innerClient, + public ComponentFeatureCapabilitiesImpl(ComponentFeatureCapabilitiesClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); + public Response getWithResponse(String resourceGroupName, + String resourceName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentFeatureCapabilitiesImpl(inner.getValue(), this.manager())); } else { return null; @@ -43,8 +39,8 @@ public Response getWithResponse } public ApplicationInsightsComponentFeatureCapabilities get(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentFeatureCapabilitiesInner inner = - this.serviceClient().get(resourceGroupName, resourceName); + ApplicationInsightsComponentFeatureCapabilitiesInner inner + = this.serviceClient().get(resourceGroupName, resourceName); if (inner != null) { return new ApplicationInsightsComponentFeatureCapabilitiesImpl(inner, this.manager()); } else { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java new file mode 100644 index 0000000000000..d5c55c9111e0b --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner; +import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts; +import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsPatch; +import com.azure.resourcemanager.applicationinsights.models.StorageType; + +public final class ComponentLinkedStorageAccountsImpl implements ComponentLinkedStorageAccounts, + ComponentLinkedStorageAccounts.Definition, ComponentLinkedStorageAccounts.Update { + private ComponentLinkedStorageAccountsInner innerObject; + + private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String linkedStorageAccount() { + return this.innerModel().linkedStorageAccount(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ComponentLinkedStorageAccountsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private StorageType storageType; + + private ComponentLinkedStorageAccountsPatch updateLinkedStorageAccountsProperties; + + public ComponentLinkedStorageAccountsImpl withExistingComponent(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public ComponentLinkedStorageAccounts create() { + this.innerObject = serviceManager.serviceClient().getComponentLinkedStorageAccountsOperations() + .createAndUpdateWithResponse(resourceGroupName, resourceName, storageType, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ComponentLinkedStorageAccounts create(Context context) { + this.innerObject = serviceManager.serviceClient().getComponentLinkedStorageAccountsOperations() + .createAndUpdateWithResponse(resourceGroupName, resourceName, storageType, this.innerModel(), context) + .getValue(); + return this; + } + + ComponentLinkedStorageAccountsImpl(StorageType name, + com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { + this.innerObject = new ComponentLinkedStorageAccountsInner(); + this.serviceManager = serviceManager; + this.storageType = name; + } + + public ComponentLinkedStorageAccountsImpl update() { + this.updateLinkedStorageAccountsProperties = new ComponentLinkedStorageAccountsPatch(); + return this; + } + + public ComponentLinkedStorageAccounts apply() { + this.innerObject = serviceManager.serviceClient().getComponentLinkedStorageAccountsOperations() + .updateWithResponse(resourceGroupName, resourceName, storageType, updateLinkedStorageAccountsProperties, + Context.NONE) + .getValue(); + return this; + } + + public ComponentLinkedStorageAccounts apply(Context context) { + this.innerObject = serviceManager.serviceClient().getComponentLinkedStorageAccountsOperations() + .updateWithResponse(resourceGroupName, resourceName, storageType, updateLinkedStorageAccountsProperties, + context) + .getValue(); + return this; + } + + ComponentLinkedStorageAccountsImpl(ComponentLinkedStorageAccountsInner innerObject, + com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "components"); + this.storageType = StorageType + .fromString(ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "linkedStorageAccounts")); + } + + public ComponentLinkedStorageAccounts refresh() { + this.innerObject = serviceManager.serviceClient().getComponentLinkedStorageAccountsOperations() + .getWithResponse(resourceGroupName, resourceName, storageType, Context.NONE).getValue(); + return this; + } + + public ComponentLinkedStorageAccounts refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getComponentLinkedStorageAccountsOperations() + .getWithResponse(resourceGroupName, resourceName, storageType, context).getValue(); + return this; + } + + public ComponentLinkedStorageAccountsImpl withLinkedStorageAccount(String linkedStorageAccount) { + if (isInCreateMode()) { + this.innerModel().withLinkedStorageAccount(linkedStorageAccount); + return this; + } else { + this.updateLinkedStorageAccountsProperties.withLinkedStorageAccount(linkedStorageAccount); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java new file mode 100644 index 0000000000000..9149b73188107 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java @@ -0,0 +1,701 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient; +import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner; +import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsPatch; +import com.azure.resourcemanager.applicationinsights.models.StorageType; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * ComponentLinkedStorageAccountsOperationsClient. + */ +public final class ComponentLinkedStorageAccountsOperationsClientImpl + implements ComponentLinkedStorageAccountsOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ComponentLinkedStorageAccountsOperationsService service; + + /** + * The service client containing this operation class. + */ + private final ApplicationInsightsManagementClientImpl client; + + /** + * Initializes an instance of ComponentLinkedStorageAccountsOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ComponentLinkedStorageAccountsOperationsClientImpl(ApplicationInsightsManagementClientImpl client) { + this.service = RestProxy.create(ComponentLinkedStorageAccountsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for + * ApplicationInsightsManagementClientComponentLinkedStorageAccountsOperations to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ApplicationInsightsM") + public interface ComponentLinkedStorageAccountsOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("storageType") StorageType storageType, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createAndUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("storageType") StorageType storageType, + @BodyParam("application/json") ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("storageType") StorageType storageType, + @BodyParam("application/json") ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("storageType") StorageType storageType, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Returns the current linked storage settings for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, StorageType storageType) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (storageType == null) { + return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); + } + final String apiVersion = "2020-03-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, storageType, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the current linked storage settings for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts 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. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String resourceName, + StorageType storageType) { + return getWithResponseAsync(resourceGroupName, resourceName, storageType) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + StorageType storageType, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, storageType, context).block(); + } + + /** + * Returns the current linked storage settings for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentLinkedStorageAccountsInner get(String resourceGroupName, String resourceName, + StorageType storageType) { + return getWithResponse(resourceGroupName, resourceName, storageType, Context.NONE).getValue(); + } + + /** + * Replace current linked storage account for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage accounts for + * an Application Insights component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (storageType == null) { + return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); + } + if (linkedStorageAccountsProperties == null) { + return Mono.error(new IllegalArgumentException( + "Parameter linkedStorageAccountsProperties is required and cannot be null.")); + } else { + linkedStorageAccountsProperties.validate(); + } + final String apiVersion = "2020-03-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createAndUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, storageType, linkedStorageAccountsProperties, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Replace current linked storage account for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage accounts for + * an Application Insights component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts 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. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage accounts for + * an Application Insights component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAndUpdateAsync(String resourceGroupName, + String resourceName, StorageType storageType, + ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties) { + return createAndUpdateWithResponseAsync(resourceGroupName, resourceName, storageType, + linkedStorageAccountsProperties).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createAndUpdateWithResponse(String resourceGroupName, + String resourceName, StorageType storageType, + ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties, Context context) { + return createAndUpdateWithResponseAsync(resourceGroupName, resourceName, storageType, + linkedStorageAccountsProperties, context).block(); + } + + /** + * Replace current linked storage account for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage accounts for + * an Application Insights component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentLinkedStorageAccountsInner createAndUpdate(String resourceGroupName, String resourceName, + StorageType storageType, ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties) { + return createAndUpdateWithResponse(resourceGroupName, resourceName, storageType, + linkedStorageAccountsProperties, Context.NONE).getValue(); + } + + /** + * Update linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked storage accounts + * for an Application Insights component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (storageType == null) { + return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); + } + if (linkedStorageAccountsProperties == null) { + return Mono.error(new IllegalArgumentException( + "Parameter linkedStorageAccountsProperties is required and cannot be null.")); + } else { + linkedStorageAccountsProperties.validate(); + } + final String apiVersion = "2020-03-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, storageType, linkedStorageAccountsProperties, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked storage accounts + * for an Application Insights component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts 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. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked storage accounts + * for an Application Insights component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String resourceName, + StorageType storageType, ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties) { + return updateWithResponseAsync(resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, + String resourceName, StorageType storageType, + ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties, Context context) { + return updateWithResponseAsync(resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, + context).block(); + } + + /** + * Update linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked storage accounts + * for an Application Insights component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentLinkedStorageAccountsInner update(String resourceGroupName, String resourceName, + StorageType storageType, ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties) { + return updateWithResponse(resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, + Context.NONE).getValue(); + } + + /** + * Delete linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, + StorageType storageType) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (storageType == null) { + return Mono.error(new IllegalArgumentException("Parameter storageType is required and cannot be null.")); + } + final String apiVersion = "2020-03-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, storageType, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@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. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, StorageType storageType) { + return deleteWithResponseAsync(resourceGroupName, resourceName, storageType).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String resourceName, StorageType storageType, + Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, storageType, context).block(); + } + + /** + * Delete linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, StorageType storageType) { + deleteWithResponse(resourceGroupName, resourceName, storageType, Context.NONE); + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java new file mode 100644 index 0000000000000..5ea29b91b337f --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.applicationinsights.fluent.ComponentLinkedStorageAccountsOperationsClient; +import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner; +import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts; +import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsOperations; +import com.azure.resourcemanager.applicationinsights.models.StorageType; + +public final class ComponentLinkedStorageAccountsOperationsImpl implements ComponentLinkedStorageAccountsOperations { + private static final ClientLogger LOGGER = new ClientLogger(ComponentLinkedStorageAccountsOperationsImpl.class); + + private final ComponentLinkedStorageAccountsOperationsClient innerClient; + + private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; + + public ComponentLinkedStorageAccountsOperationsImpl(ComponentLinkedStorageAccountsOperationsClient innerClient, + com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String resourceName, + StorageType storageType, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, storageType, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ComponentLinkedStorageAccountsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ComponentLinkedStorageAccounts get(String resourceGroupName, String resourceName, StorageType storageType) { + ComponentLinkedStorageAccountsInner inner + = this.serviceClient().get(resourceGroupName, resourceName, storageType); + if (inner != null) { + return new ComponentLinkedStorageAccountsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse(String resourceGroupName, String resourceName, StorageType storageType, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, storageType, context); + } + + public void delete(String resourceGroupName, String resourceName, StorageType storageType) { + this.serviceClient().delete(resourceGroupName, resourceName, storageType); + } + + public ComponentLinkedStorageAccounts getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "components"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String storageTypeLocal = ResourceManagerUtils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (storageTypeLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); + } + StorageType storageType = StorageType.fromString(storageTypeLocal); + return this.getWithResponse(resourceGroupName, resourceName, storageType, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "components"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String storageTypeLocal = ResourceManagerUtils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (storageTypeLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); + } + StorageType storageType = StorageType.fromString(storageTypeLocal); + return this.getWithResponse(resourceGroupName, resourceName, storageType, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "components"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String storageTypeLocal = ResourceManagerUtils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (storageTypeLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); + } + StorageType storageType = StorageType.fromString(storageTypeLocal); + this.deleteWithResponse(resourceGroupName, resourceName, storageType, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "components"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String storageTypeLocal = ResourceManagerUtils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (storageTypeLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); + } + StorageType storageType = StorageType.fromString(storageTypeLocal); + return this.deleteWithResponse(resourceGroupName, resourceName, storageType, context); + } + + private ComponentLinkedStorageAccountsOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { + return this.serviceManager; + } + + public ComponentLinkedStorageAccountsImpl define(StorageType name) { + return new ComponentLinkedStorageAccountsImpl(name, this.manager()); + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeResponseImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeResponseImpl.java index ddcaf5433d5de..85512726b6b4a 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 @@ -12,8 +12,7 @@ public final class ComponentPurgeResponseImpl implements ComponentPurgeResponse private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - ComponentPurgeResponseImpl( - ComponentPurgeResponseInner innerObject, + ComponentPurgeResponseImpl(ComponentPurgeResponseInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 b1c493b0247cf..5b24ee8a92928 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 @@ -13,8 +13,7 @@ public final class ComponentPurgeStatusResponseImpl implements ComponentPurgeSta private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - ComponentPurgeStatusResponseImpl( - ComponentPurgeStatusResponseInner innerObject, + ComponentPurgeStatusResponseImpl(ComponentPurgeStatusResponseInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 dc520eb34ba8d..fc74778e2c473 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 @@ -25,77 +25,73 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ComponentQuotaStatusClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentQuotaStatusClient. + */ public final class ComponentQuotaStatusClientImpl implements ComponentQuotaStatusClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ComponentQuotaStatusService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of ComponentQuotaStatusClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ComponentQuotaStatusClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create(ComponentQuotaStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ComponentQuotaStatusService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ApplicationInsightsManagementClientComponentQuotaStatus to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ApplicationInsightsManagementClientComponentQuotaStatus to be used + * by the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface ComponentQuotaStatusService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/quotastatus") - @ExpectedResponses({200}) + @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, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@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); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + 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.")); @@ -103,23 +99,14 @@ private Mono> getWithResp 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), 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. @@ -127,26 +114,22 @@ private Mono> getWithResp * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + 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.")); @@ -154,20 +137,13 @@ private Mono> getWithResp 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); + 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. - * + * * @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. @@ -182,7 +158,7 @@ private Mono getAsync(String resou /** * 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. @@ -192,14 +168,14 @@ private Mono getAsync(String resou * @return an Application Insights component daily data volume cap status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response getWithResponse(String resourceGroupName, + String resourceName, Context context) { return getWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 6bab8ad35f654..8914f6b657aa0 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 @@ -20,22 +20,18 @@ public final class ComponentQuotaStatusImpl implements ComponentQuotaStatus { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public ComponentQuotaStatusImpl( - ComponentQuotaStatusClient innerClient, + public ComponentQuotaStatusImpl(ComponentQuotaStatusClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); + public Response getWithResponse(String resourceGroupName, + String resourceName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentQuotaStatusImpl(inner.getValue(), this.manager())); } else { return null; 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 1b9fc7129d7ee..336a3364fee46 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 @@ -39,253 +39,191 @@ import com.azure.resourcemanager.applicationinsights.models.TagsResource; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ComponentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentsClient. + */ public final class ComponentsClientImpl implements ComponentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ComponentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of ComponentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ComponentsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(ComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ApplicationInsightsManagementClientComponents to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for ApplicationInsightsManagementClientComponents to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface ComponentsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/components") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components") + @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> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") - @ExpectedResponses({200, 204}) + @Headers({ "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("$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); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") + @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> 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); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") + @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, + 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); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}") + @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, + 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); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @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, + 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); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}") - @ExpectedResponses({200}) + @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, - @PathParam("purgeId") String purgeId, - @HeaderParam("Accept") String accept, - Context context); + Mono> getPurgeStatus(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("purgeId") String purgeId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String 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.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())); } /** * 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String 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)); + 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}. + * @return a list of all Application Insights components within a subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -294,27 +232,27 @@ private PagedFlux 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 - * PagedFlux}. + * @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)); + 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}. + * @return a list of all Application Insights components within a subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -323,13 +261,13 @@ public 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 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 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) { @@ -338,155 +276,118 @@ public PagedIterable list(Context context) { /** * Gets a list of Application Insights components within a 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 a list of Application Insights components within a resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (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.")); + 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)) + .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())); } /** * 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 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (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.")); + 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 - .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)); + .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)); } /** * Gets a list of Application Insights components within a 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 a list of Application Insights components within a resource group as paginated response with {@link - * PagedFlux}. + * @return a list of Application Insights components within a resource group as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * 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 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 - * PagedFlux}. + * @return a list of Application Insights components within a 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), + private PagedFlux listByResourceGroupAsync(String resourceGroupName, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Gets a list of Application Insights components within a 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 a list of Application Insights components within a resource group as paginated response with {@link - * PagedIterable}. + * @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) { @@ -495,24 +396,24 @@ public PagedIterable listByResourceGroup(Stri /** * 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 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 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) { + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** * Deletes an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -523,20 +424,16 @@ public PagedIterable listByResourceGroup( @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.")); + 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.")); + 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.")); @@ -544,23 +441,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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)) + .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())); } /** * 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. @@ -570,23 +458,19 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + 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.")); @@ -594,20 +478,13 @@ private Mono> deleteWithResponseAsync( final String apiVersion = "2020-02-02"; 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 service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, accept, context); } /** * Deletes an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -622,7 +499,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { /** * 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. @@ -638,7 +515,7 @@ public Response deleteWithResponse(String resourceGroupName, String resour /** * 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. @@ -652,33 +529,29 @@ public void delete(String resourceGroupName, String resourceName) { /** * Returns an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + 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.")); @@ -686,23 +559,14 @@ private Mono> getByResourceGroupWith 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.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, accept, 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. @@ -710,26 +574,22 @@ private Mono> getByResourceGroupWith * @throws 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + 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.")); @@ -737,20 +597,13 @@ private Mono> getByResourceGroupWith 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); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, accept, context); } /** * Returns an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -759,15 +612,15 @@ private Mono> getByResourceGroupWith * @return an Application Insights component definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String resourceName) { + private Mono getByResourceGroupAsync(String resourceGroupName, + String resourceName) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -777,14 +630,14 @@ private Mono getByResourceGroupAsync( * @return an Application Insights component definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** * 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. @@ -800,7 +653,7 @@ public ApplicationInsightsComponentInner getByResourceGroup(String resourceGroup /** * 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. @@ -808,26 +661,22 @@ public ApplicationInsightsComponentInner getByResourceGroup(String resourceGroup * @throws 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties) { + 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.")); + 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.")); + 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.")); @@ -841,25 +690,15 @@ private Mono> createOrUpdateWithResp 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.createOrUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, insightProperties, accept, context)) .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. - * + * * @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. @@ -868,29 +707,22 @@ private Mono> createOrUpdateWithResp * @throws 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentInner insightProperties, - Context context) { + 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.")); + 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.")); + 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.")); @@ -904,22 +736,14 @@ private Mono> createOrUpdateWithResp 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); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, insightProperties, accept, context); } /** * 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. @@ -929,8 +753,8 @@ private Mono> createOrUpdateWithResp * @return an Application Insights component definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties) { + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ApplicationInsightsComponentInner insightProperties) { return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, insightProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -938,7 +762,7 @@ private Mono createOrUpdateAsync( /** * 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. @@ -949,18 +773,15 @@ private Mono createOrUpdateAsync( * @return an Application Insights component definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentInner insightProperties, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, + String resourceName, ApplicationInsightsComponentInner insightProperties, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, insightProperties, context).block(); } /** * 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. @@ -970,14 +791,14 @@ public Response createOrUpdateWithResponse( * @return an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentInner createOrUpdate( - String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties) { + public ApplicationInsightsComponentInner createOrUpdate(String resourceGroupName, String resourceName, + ApplicationInsightsComponentInner insightProperties) { return createOrUpdateWithResponse(resourceGroupName, resourceName, insightProperties, Context.NONE).getValue(); } /** * 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. @@ -985,26 +806,22 @@ public ApplicationInsightsComponentInner createOrUpdate( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Application Insights component definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String resourceName, TagsResource componentTags) { + 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.")); + 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.")); + 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.")); @@ -1017,24 +834,14 @@ private Mono> updateTagsWithResponse 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.updateTags(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, componentTags, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -1043,26 +850,22 @@ private Mono> updateTagsWithResponse * @throws 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String resourceName, TagsResource componentTags, Context context) { + 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.")); + 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.")); + 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.")); @@ -1075,21 +878,13 @@ private Mono> updateTagsWithResponse 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); + return service.updateTags(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, componentTags, accept, context); } /** * 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. @@ -1099,15 +894,15 @@ private Mono> updateTagsWithResponse * @return an Application Insights component definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync( - String resourceGroupName, String resourceName, TagsResource componentTags) { + private Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsResource componentTags) { return updateTagsWithResponseAsync(resourceGroupName, resourceName, componentTags) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -1118,14 +913,14 @@ private Mono updateTagsAsync( * @return an Application Insights component definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse( - String resourceGroupName, String resourceName, TagsResource componentTags, Context context) { + public Response updateTagsWithResponse(String resourceGroupName, + String resourceName, TagsResource componentTags, Context context) { return updateTagsWithResponseAsync(resourceGroupName, resourceName, componentTags, context).block(); } /** * 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. @@ -1135,22 +930,23 @@ public Response updateTagsWithResponse( * @return an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentInner updateTags( - String resourceGroupName, String resourceName, TagsResource componentTags) { + public ApplicationInsightsComponentInner updateTags(String resourceGroupName, String resourceName, + TagsResource componentTags) { return updateTagsWithResponse(resourceGroupName, resourceName, componentTags, Context.NONE).getValue(); } /** * 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 + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the + * execution of purge requests by sending a single command whose predicate includes all user identities that require + * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge + * request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please + * run purge operation (directly on the * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific * resource id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. @@ -1158,26 +954,22 @@ public ApplicationInsightsComponentInner updateTags( * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> purgeWithResponseAsync( - String resourceGroupName, String resourceName, ComponentPurgeBody body) { + 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.")); + 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.")); + 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.")); @@ -1190,32 +982,23 @@ private Mono> purgeWithResponseAsync( 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)) + .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())); } /** * 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 + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the + * execution of purge requests by sending a single command whose predicate includes all user identities that require + * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge + * request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please + * run purge operation (directly on the * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific * resource id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. @@ -1224,26 +1007,22 @@ private Mono> purgeWithResponseAsync( * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> purgeWithResponseAsync( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context) { + 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.")); + 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.")); + 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.")); @@ -1256,29 +1035,22 @@ private Mono> purgeWithResponseAsync( final String apiVersion = "2020-02-02"; 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 service.purge(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, body, accept, context); } /** * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, - * for workspace-based Application Insights resource please run purge operation (directly on the + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the + * execution of purge requests by sending a single command whose predicate includes all user identities that require + * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge + * request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please + * run purge operation (directly on the * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific * resource id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. @@ -1288,23 +1060,24 @@ private Mono> purgeWithResponseAsync( * @return response containing operationId for a specific purge action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono purgeAsync( - String resourceGroupName, String resourceName, ComponentPurgeBody body) { + private Mono purgeAsync(String resourceGroupName, String resourceName, + ComponentPurgeBody body) { return purgeWithResponseAsync(resourceGroupName, resourceName, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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 + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the + * execution of purge requests by sending a single command whose predicate includes all user identities that require + * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge + * request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please + * run purge operation (directly on the * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific * resource id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. @@ -1315,22 +1088,23 @@ private Mono purgeAsync( * @return response containing operationId for a specific purge action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response purgeWithResponse( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context) { + public Response purgeWithResponse(String resourceGroupName, String resourceName, + ComponentPurgeBody body, Context context) { return purgeWithResponseAsync(resourceGroupName, resourceName, body, context).block(); } /** * 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 + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the + * execution of purge requests by sending a single command whose predicate includes all user identities that require + * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge + * request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please + * run purge operation (directly on the * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific * resource id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. @@ -1346,34 +1120,30 @@ public ComponentPurgeResponseInner purge(String resourceGroupName, String resour /** * Get status for an ongoing purge operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) { + 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.")); + 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.")); + 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.")); @@ -1384,24 +1154,14 @@ private Mono> getPurgeStatusWithResp 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), 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. @@ -1409,27 +1169,23 @@ private Mono> getPurgeStatusWithResp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) { + 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.")); + 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.")); + 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.")); @@ -1440,21 +1196,13 @@ private Mono> getPurgeStatusWithResp 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); + return service.getPurgeStatus(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, purgeId, accept, context); } /** * Get status for an ongoing purge operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. @@ -1464,15 +1212,15 @@ private Mono> getPurgeStatusWithResp * @return status for an ongoing purge operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getPurgeStatusAsync( - String resourceGroupName, String resourceName, String purgeId) { + private Mono getPurgeStatusAsync(String resourceGroupName, String resourceName, + String purgeId) { return getPurgeStatusWithResponseAsync(resourceGroupName, resourceName, purgeId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -1483,14 +1231,14 @@ private Mono getPurgeStatusAsync( * @return status for an ongoing purge operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPurgeStatusWithResponse( - String resourceGroupName, String resourceName, String purgeId, Context context) { + public Response getPurgeStatusWithResponse(String resourceGroupName, + String resourceName, String purgeId, Context context) { return getPurgeStatusWithResponseAsync(resourceGroupName, resourceName, purgeId, context).block(); } /** * 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. @@ -1500,21 +1248,22 @@ public Response getPurgeStatusWithResponse( * @return status for an ongoing purge operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentPurgeStatusResponseInner getPurgeStatus( - String resourceGroupName, String resourceName, String purgeId) { + public ComponentPurgeStatusResponseInner getPurgeStatus(String resourceGroupName, String resourceName, + String purgeId) { return getPurgeStatusWithResponse(resourceGroupName, resourceName, purgeId, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes the list of Application Insights Resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1522,140 +1271,104 @@ private Mono> listNextSinglePag return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes the list of Application Insights Resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes the list of Application Insights Resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } 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 0e025ca8ed657..e656af28769b8 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 @@ -26,8 +26,7 @@ public final class ComponentsImpl implements Components { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public ComponentsImpl( - ComponentsClient innerClient, + public ComponentsImpl(ComponentsClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -35,28 +34,32 @@ public ComponentsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); } @@ -64,15 +67,12 @@ 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); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentImpl(inner.getValue(), this.manager())); } else { return null; @@ -80,8 +80,8 @@ public Response getByResourceGroupWithResponse( } public ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + ApplicationInsightsComponentInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); if (inner != null) { return new ApplicationInsightsComponentImpl(inner, this.manager()); } else { @@ -89,15 +89,12 @@ public ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, } } - public Response purgeWithResponse( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context) { - Response inner = - this.serviceClient().purgeWithResponse(resourceGroupName, resourceName, body, context); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ComponentPurgeResponseImpl(inner.getValue(), this.manager())); } else { return null; @@ -113,15 +110,12 @@ public ComponentPurgeResponse purge(String resourceGroupName, String resourceNam } } - public Response getPurgeStatusWithResponse( - String resourceGroupName, String resourceName, String purgeId, Context context) { - Response inner = - this.serviceClient().getPurgeStatusWithResponse(resourceGroupName, resourceName, purgeId, context); + public Response getPurgeStatusWithResponse(String resourceGroupName, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ComponentPurgeStatusResponseImpl(inner.getValue(), this.manager())); } else { return null; @@ -129,8 +123,8 @@ public Response getPurgeStatusWithResponse( } public ComponentPurgeStatusResponse getPurgeStatus(String resourceGroupName, String resourceName, String purgeId) { - ComponentPurgeStatusResponseInner inner = - this.serviceClient().getPurgeStatus(resourceGroupName, resourceName, purgeId); + ComponentPurgeStatusResponseInner inner + = this.serviceClient().getPurgeStatus(resourceGroupName, resourceName, purgeId); if (inner != null) { return new ComponentPurgeStatusResponseImpl(inner, this.manager()); } else { @@ -139,77 +133,57 @@ public ComponentPurgeStatusResponse getPurgeStatus(String resourceGroupName, Str } public ApplicationInsightsComponent getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "components"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "components"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "components"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "components"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "components"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "components"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "components"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "components"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, context); } 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 2231ff155d1f9..f31f2ef5042f8 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 @@ -31,138 +31,113 @@ import java.util.List; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ExportConfigurationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ExportConfigurationsClient. + */ public final class ExportConfigurationsClientImpl implements ExportConfigurationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ExportConfigurationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of ExportConfigurationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ExportConfigurationsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create(ExportConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ExportConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ApplicationInsightsManagementClientExportConfigurations to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ApplicationInsightsManagementClientExportConfigurations to be used + * by the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface ExportConfigurationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration") - @ExpectedResponses({200}) + @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("$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); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @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, + @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); + @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}) + @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, - @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}) + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @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) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("exportId") String exportId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}") - @ExpectedResponses({200}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("exportId") String exportId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, + Mono> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, @PathParam("exportId") String exportId, @BodyParam("application/json") ApplicationInsightsComponentExportRequest exportProperties, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of Continuous Export configuration of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) { + 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.")); + 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.")); + 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.")); @@ -170,50 +145,37 @@ private Mono 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), 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}. + * @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) { + 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.")); + 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.")); + 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.")); @@ -221,55 +183,48 @@ private Mono 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); + 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. - * + * * @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 Continuous Export configuration of an Application Insights component on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, String resourceName) { + private Mono> listAsync(String resourceGroupName, + String resourceName) { return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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}. + * @return a list of Continuous Export configuration of an Application Insights component along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response> + listWithResponse(String resourceGroupName, String resourceName, Context context) { return listWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** * Gets a list of Continuous Export configuration of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -278,42 +233,38 @@ public Response> list * @return a list of Continuous Export configuration of an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List list( - String resourceGroupName, String resourceName) { + public List list(String resourceGroupName, + String resourceName) { return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** * 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. + * 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 Continuous Export configurations along with {@link Response} on successful completion of {@link - * Mono}. + * @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) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (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.")); + 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.")); @@ -327,56 +278,40 @@ private Mono final String apiVersion = "2015-05-01"; 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, exportProperties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. + * 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}. + * @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, + 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.")); + 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.")); + 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.")); @@ -390,44 +325,36 @@ private Mono 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); + 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. + * 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 Continuous Export configurations on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createAsync( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { + private Mono> createAsync(String resourceGroupName, + String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { return createWithResponseAsync(resourceGroupName, resourceName, exportProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. + * 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. @@ -436,34 +363,32 @@ private Mono> createA */ @ServiceMethod(returns = ReturnType.SINGLE) public Response> createWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentExportRequest exportProperties, + String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties, Context context) { return createWithResponseAsync(resourceGroupName, resourceName, exportProperties, context).block(); } /** * 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. + * 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 Continuous Export configurations. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { + public List create(String resourceGroupName, + String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { return createWithResponse(resourceGroupName, resourceName, exportProperties, Context.NONE).getValue(); } /** * 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. @@ -471,26 +396,22 @@ public List create( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define a Continuous Export configuration along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String exportId) { + 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.")); + 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.")); + 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.")); @@ -501,24 +422,14 @@ private Mono> del final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - exportId, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, + 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. @@ -527,26 +438,22 @@ private Mono> del * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String exportId, Context context) { + 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.")); + 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.")); + 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.")); @@ -557,21 +464,13 @@ private Mono> del 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); + 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. - * + * * @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. @@ -581,15 +480,15 @@ private Mono> del * @return properties that define a Continuous Export configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String resourceName, String exportId) { + private Mono deleteAsync(String resourceGroupName, + String resourceName, String exportId) { return deleteWithResponseAsync(resourceGroupName, resourceName, exportId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -600,14 +499,14 @@ private Mono deleteAsync( * @return properties that define a Continuous Export configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context) { + public Response deleteWithResponse(String resourceGroupName, + String resourceName, String exportId, Context context) { return deleteWithResponseAsync(resourceGroupName, resourceName, exportId, context).block(); } /** * 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. @@ -617,14 +516,14 @@ public Response deleteWith * @return properties that define a Continuous Export configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentExportConfigurationInner delete( - String resourceGroupName, String resourceName, String exportId) { + public ApplicationInsightsComponentExportConfigurationInner delete(String resourceGroupName, String resourceName, + String exportId) { return deleteWithResponse(resourceGroupName, resourceName, exportId, Context.NONE).getValue(); } /** * 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. @@ -632,26 +531,22 @@ public ApplicationInsightsComponentExportConfigurationInner delete( * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String exportId) { + 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.")); + 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.")); + 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.")); @@ -662,24 +557,14 @@ private Mono> get 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, - exportId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, + 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. @@ -688,26 +573,22 @@ private Mono> get * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String exportId, Context context) { + 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.")); + 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.")); + 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.")); @@ -718,21 +599,13 @@ private Mono> get 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); + return service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, exportId, accept, context); } /** * 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. @@ -742,15 +615,15 @@ private Mono> get * @return the Continuous Export configuration for this export id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, String exportId) { + private Mono getAsync(String resourceGroupName, + String resourceName, String exportId) { return getWithResponseAsync(resourceGroupName, resourceName, exportId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -761,14 +634,14 @@ private Mono getAsync( * @return the Continuous Export configuration for this export id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context) { + public Response getWithResponse(String resourceGroupName, + String resourceName, String exportId, Context context) { return getWithResponseAsync(resourceGroupName, resourceName, exportId, context).block(); } /** * 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. @@ -778,14 +651,14 @@ public Response getWithRes * @return the Continuous Export configuration for this export id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentExportConfigurationInner get( - String resourceGroupName, String resourceName, String exportId) { + public ApplicationInsightsComponentExportConfigurationInner get(String resourceGroupName, String resourceName, + String exportId) { return getWithResponse(resourceGroupName, resourceName, exportId, Context.NONE).getValue(); } /** * 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. @@ -794,29 +667,23 @@ public ApplicationInsightsComponentExportConfigurationInner get( * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String exportId, + 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.")); + 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.")); + 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.")); @@ -833,25 +700,14 @@ private Mono> upd final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - exportId, - exportProperties, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, exportId, exportProperties, accept, 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. @@ -861,30 +717,23 @@ private Mono> upd * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties, - Context context) { + 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.")); + 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.")); + 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.")); @@ -901,22 +750,13 @@ private Mono> upd 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); + 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. - * + * * @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. @@ -927,18 +767,15 @@ private Mono> upd * @return properties that define a Continuous Export configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties) { + private Mono updateAsync(String resourceGroupName, + String resourceName, String exportId, ApplicationInsightsComponentExportRequest exportProperties) { return updateWithResponseAsync(resourceGroupName, resourceName, exportId, exportProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -950,18 +787,15 @@ private Mono updateAsync( * @return properties that define a Continuous Export configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties, + public Response updateWithResponse(String resourceGroupName, + String resourceName, String exportId, ApplicationInsightsComponentExportRequest exportProperties, Context context) { return updateWithResponseAsync(resourceGroupName, resourceName, exportId, exportProperties, context).block(); } /** * 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. @@ -972,11 +806,8 @@ public Response updateWith * @return properties that define a Continuous Export configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentExportConfigurationInner update( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties) { + public ApplicationInsightsComponentExportConfigurationInner update(String resourceGroupName, String resourceName, + String exportId, ApplicationInsightsComponentExportRequest exportProperties) { return updateWithResponse(resourceGroupName, resourceName, exportId, exportProperties, Context.NONE).getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java index ca429849613c8..19dc64c57d20c 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 @@ -24,25 +24,19 @@ public final class ExportConfigurationsImpl implements ExportConfigurations { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public ExportConfigurationsImpl( - ExportConfigurationsClient innerClient, + public ExportConfigurationsImpl(ExportConfigurationsClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response> listWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response> inner = - this.serviceClient().listWithResponse(resourceGroupName, resourceName, context); + public Response> listWithResponse(String resourceGroupName, + 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() + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + inner.getValue().stream() .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) .collect(Collectors.toList())); } else { @@ -51,35 +45,24 @@ public Response> listWithR } public List list(String resourceGroupName, String resourceName) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName); + List inner + = this.serviceClient().list(resourceGroupName, resourceName); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } } - public Response> createWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentExportRequest exportProperties, - Context context) { - Response> inner = - this.serviceClient().createWithResponse(resourceGroupName, resourceName, exportProperties, context); + public Response> createWithResponse(String resourceGroupName, + 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() + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + inner.getValue().stream() .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) .collect(Collectors.toList())); } else { @@ -87,41 +70,35 @@ public Response> createWit } } - public List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { - List inner = - this.serviceClient().create(resourceGroupName, resourceName, exportProperties); + public List create(String resourceGroupName, String resourceName, + ApplicationInsightsComponentExportRequest exportProperties) { + List inner + = this.serviceClient().create(resourceGroupName, resourceName, exportProperties); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } } - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context) { - Response inner = - this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, exportId, context); + public Response deleteWithResponse(String resourceGroupName, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); } else { return null; } } - public ApplicationInsightsComponentExportConfiguration delete( - String resourceGroupName, String resourceName, String exportId) { - ApplicationInsightsComponentExportConfigurationInner inner = - this.serviceClient().delete(resourceGroupName, resourceName, exportId); + public ApplicationInsightsComponentExportConfiguration delete(String resourceGroupName, String resourceName, + String exportId) { + ApplicationInsightsComponentExportConfigurationInner inner + = this.serviceClient().delete(resourceGroupName, resourceName, exportId); if (inner != null) { return new ApplicationInsightsComponentExportConfigurationImpl(inner, this.manager()); } else { @@ -129,25 +106,22 @@ public ApplicationInsightsComponentExportConfiguration delete( } } - public Response getWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, exportId, context); + public Response getWithResponse(String resourceGroupName, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); } else { return null; } } - public ApplicationInsightsComponentExportConfiguration get( - String resourceGroupName, String resourceName, String exportId) { - ApplicationInsightsComponentExportConfigurationInner inner = - this.serviceClient().get(resourceGroupName, resourceName, exportId); + public ApplicationInsightsComponentExportConfiguration get(String resourceGroupName, String resourceName, + String exportId) { + ApplicationInsightsComponentExportConfigurationInner inner + = this.serviceClient().get(resourceGroupName, resourceName, exportId); if (inner != null) { return new ApplicationInsightsComponentExportConfigurationImpl(inner, this.manager()); } else { @@ -155,34 +129,23 @@ public ApplicationInsightsComponentExportConfiguration get( } } - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties, + public Response updateWithResponse(String resourceGroupName, + String resourceName, String exportId, ApplicationInsightsComponentExportRequest exportProperties, Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse(resourceGroupName, resourceName, exportId, exportProperties, context); + Response inner = this.serviceClient() + .updateWithResponse(resourceGroupName, resourceName, exportId, exportProperties, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); } else { return null; } } - public ApplicationInsightsComponentExportConfiguration update( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties) { - ApplicationInsightsComponentExportConfigurationInner inner = - this.serviceClient().update(resourceGroupName, resourceName, exportId, exportProperties); + public ApplicationInsightsComponentExportConfiguration update(String resourceGroupName, String resourceName, + String exportId, ApplicationInsightsComponentExportRequest exportProperties) { + ApplicationInsightsComponentExportConfigurationInner inner + = this.serviceClient().update(resourceGroupName, resourceName, exportId, exportProperties); if (inner != null) { return new ApplicationInsightsComponentExportConfigurationImpl(inner, this.manager()); } else { 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 b90213028a12d..3b918c7c14de4 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 @@ -34,22 +34,28 @@ import java.util.stream.Collectors; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in FavoritesClient. */ +/** + * An instance of this class provides access to all the operations defined in FavoritesClient. + */ public final class FavoritesClientImpl implements FavoritesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final FavoritesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of FavoritesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ FavoritesClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(FavoritesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(FavoritesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -60,243 +66,166 @@ public final class FavoritesClientImpl implements FavoritesClient { @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface FavoritesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites") - @ExpectedResponses({200}) + @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("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @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); + @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/{favoriteId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("favoriteId") String favoriteId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}") - @ExpectedResponses({200}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("favoriteId") String favoriteId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, + Mono> add(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, @PathParam("favoriteId") String favoriteId, @BodyParam("application/json") ApplicationInsightsComponentFavoriteInner favoriteProperties, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}") - @ExpectedResponses({200}) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, + Mono> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, @PathParam("favoriteId") String favoriteId, @BodyParam("application/json") ApplicationInsightsComponentFavoriteInner favoriteProperties, - @HeaderParam("Accept") String accept, - Context context); + @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}/favorites/{favoriteId}") - @ExpectedResponses({200}) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("favoriteId") String favoriteId, - Context context); + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("favoriteId") String favoriteId, Context context); } /** * Gets a list of favorites defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteType The type of favorite. Value can be either shared or user. * @param sourceType Source type of favorite to return. When left out, the source type defaults to 'other' (not - * present in this enum). + * 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. + * false, only return summary content for favorites. * @param tags Tags that must be present on each favorite returned. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of favorites defined within an Application Insights component along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> listWithResponseAsync( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags) { + 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.")); + 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.")); + 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(",")); + String tagsConverted = (tags == null) ? null : tags.stream() + .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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), 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). + * 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. + * 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}. + * 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) { + 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.")); + 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.")); + 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(",")); + 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); + 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. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of favorites defined within an Application Insights component on successful completion of {@link - * Mono}. + * @return a list of favorites defined within an Application Insights component on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, String resourceName) { + private Mono> listAsync(String resourceGroupName, + String resourceName) { final FavoriteType favoriteType = null; final FavoriteSourceType sourceType = null; final Boolean canFetchContent = null; @@ -307,14 +236,14 @@ private Mono> listAsync( /** * 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). + * 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. + * 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. @@ -323,22 +252,16 @@ private Mono> listAsync( * @return a list of favorites defined within an Application Insights component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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(); + 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(); } /** * Gets a list of favorites defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -352,41 +275,36 @@ public List list(String resourceGroup final FavoriteSourceType sourceType = null; final Boolean canFetchContent = null; final List tags = null; - return listWithResponse( - resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags, Context.NONE) - .getValue(); + return listWithResponse(resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags, + Context.NONE).getValue(); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) { + 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.")); + 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.")); + 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.")); @@ -397,24 +315,14 @@ private Mono> getWithRespons 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, - favoriteId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, + 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. @@ -422,27 +330,23 @@ private Mono> getWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) { + 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.")); + 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.")); + 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.")); @@ -453,21 +357,13 @@ private Mono> getWithRespons 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); + 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. - * + * * @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. @@ -475,18 +371,18 @@ private Mono> getWithRespons * @throws 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 on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, String favoriteId) { + private Mono getAsync(String resourceGroupName, String resourceName, + String favoriteId) { return getWithResponseAsync(resourceGroupName, resourceName, favoriteId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -494,18 +390,18 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component along with {@link - * Response}. + * @return a single favorite by its FavoriteId, defined within an Application Insights component along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context) { + public Response getWithResponse(String resourceGroupName, + String resourceName, String favoriteId, Context context) { return getWithResponseAsync(resourceGroupName, resourceName, favoriteId, context).block(); } /** * 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. @@ -515,46 +411,39 @@ public Response getWithResponse( * @return a single favorite by its FavoriteId, defined within an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentFavoriteInner get( - String resourceGroupName, String resourceName, String favoriteId) { + public ApplicationInsightsComponentFavoriteInner get(String resourceGroupName, String resourceName, + String favoriteId) { return getWithResponse(resourceGroupName, resourceName, favoriteId, Context.NONE).getValue(); } /** * 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. + * 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 properties that define a favorite that is associated to an Application Insights component along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> addWithResponseAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { + 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.")); + 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.")); + 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.")); @@ -571,59 +460,41 @@ private Mono> addWithRespons final String apiVersion = "2015-05-01"; 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, favoriteId, favoriteProperties, accept, 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. + * 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}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> addWithResponseAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, + 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.")); + 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.")); + 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.")); @@ -640,94 +511,76 @@ private Mono> addWithRespons 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); + 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. - * + * * @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. + * 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 properties that define a favorite that is associated to an Application Insights component on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono addAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { + private Mono addAsync(String resourceGroupName, String resourceName, + String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { return addWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. + * 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}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response addWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, + public Response addWithResponse(String resourceGroupName, + String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, Context context) { return addWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties, context).block(); } /** * 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. + * 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 properties that define a favorite that is associated to an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentFavoriteInner add( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { + public ApplicationInsightsComponentFavoriteInner add(String resourceGroupName, String resourceName, + String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { return addWithResponse(resourceGroupName, resourceName, favoriteId, favoriteProperties, Context.NONE) .getValue(); } /** * 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. @@ -736,29 +589,22 @@ public ApplicationInsightsComponentFavoriteInner add( * @throws 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}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { + 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.")); + 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.")); + 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.")); @@ -775,25 +621,14 @@ private Mono> updateWithResp final String apiVersion = "2015-05-01"; 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, favoriteId, favoriteProperties, accept, 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. @@ -803,30 +638,23 @@ private Mono> updateWithResp * @throws 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}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, + 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.")); + 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.")); + 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.")); @@ -843,22 +671,13 @@ private Mono> updateWithResp 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); + 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. - * + * * @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. @@ -867,21 +686,18 @@ private Mono> updateWithResp * @throws 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 on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { + private Mono updateAsync(String resourceGroupName, String resourceName, + String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { return updateWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -891,14 +707,11 @@ private Mono updateAsync( * @throws 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}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, + public Response updateWithResponse(String resourceGroupName, + String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, Context context) { return updateWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties, context) .block(); @@ -906,7 +719,7 @@ public Response updateWithResponse( /** * 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. @@ -917,18 +730,15 @@ public Response updateWithResponse( * @return properties that define a favorite that is associated to an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentFavoriteInner update( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { + public ApplicationInsightsComponentFavoriteInner update(String resourceGroupName, String resourceName, + String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { return updateWithResponse(resourceGroupName, resourceName, favoriteId, favoriteProperties, Context.NONE) .getValue(); } /** * 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. @@ -938,23 +748,19 @@ public ApplicationInsightsComponentFavoriteInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String favoriteId) { + 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.")); + 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.")); + 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.")); @@ -964,23 +770,14 @@ private Mono> deleteWithResponseAsync( } final String apiVersion = "2015-05-01"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - favoriteId, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, + 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. @@ -991,23 +788,19 @@ private Mono> deleteWithResponseAsync( * @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) { + 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.")); + 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.")); + 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.")); @@ -1017,20 +810,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. - * + * * @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. @@ -1046,7 +832,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * 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. @@ -1057,14 +843,14 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context) { + public Response deleteWithResponse(String resourceGroupName, String resourceName, String favoriteId, + Context context) { return deleteWithResponseAsync(resourceGroupName, resourceName, favoriteId, context).block(); } /** * 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. 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 5a84099e1e894..623a9fa6a2478 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 @@ -25,34 +25,20 @@ public final class FavoritesImpl implements Favorites { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public FavoritesImpl( - FavoritesClient innerClient, + public FavoritesImpl(FavoritesClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response> listWithResponse( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags, - Context context) { - Response> inner = - this - .serviceClient() - .listWithResponse( - resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags, context); + public Response> listWithResponse(String resourceGroupName, + String resourceName, FavoriteType favoriteType, FavoriteSourceType sourceType, Boolean canFetchContent, + List tags, Context context) { + 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() + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + inner.getValue().stream() .map(inner1 -> new ApplicationInsightsComponentFavoriteImpl(inner1, this.manager())) .collect(Collectors.toList())); } else { @@ -61,29 +47,23 @@ public Response> listWithResponse( } public List list(String resourceGroupName, String resourceName) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName); + List inner + = this.serviceClient().list(resourceGroupName, resourceName); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ApplicationInsightsComponentFavoriteImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new ApplicationInsightsComponentFavoriteImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } } - public Response getWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, favoriteId, context); + public Response getWithResponse(String resourceGroupName, String resourceName, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); } else { return null; @@ -91,8 +71,8 @@ public Response getWithResponse( } public ApplicationInsightsComponentFavorite get(String resourceGroupName, String resourceName, String favoriteId) { - ApplicationInsightsComponentFavoriteInner inner = - this.serviceClient().get(resourceGroupName, resourceName, favoriteId); + ApplicationInsightsComponentFavoriteInner inner + = this.serviceClient().get(resourceGroupName, resourceName, favoriteId); if (inner != null) { return new ApplicationInsightsComponentFavoriteImpl(inner, this.manager()); } else { @@ -100,34 +80,22 @@ public ApplicationInsightsComponentFavorite get(String resourceGroupName, String } } - public Response addWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context) { - Response inner = - this - .serviceClient() - .addWithResponse(resourceGroupName, resourceName, favoriteId, favoriteProperties, context); + public Response addWithResponse(String resourceGroupName, String resourceName, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); } else { return null; } } - public ApplicationInsightsComponentFavorite add( - String resourceGroupName, - String resourceName, - String favoriteId, + public ApplicationInsightsComponentFavorite add(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { - ApplicationInsightsComponentFavoriteInner inner = - this.serviceClient().add(resourceGroupName, resourceName, favoriteId, favoriteProperties); + ApplicationInsightsComponentFavoriteInner inner + = this.serviceClient().add(resourceGroupName, resourceName, favoriteId, favoriteProperties); if (inner != null) { return new ApplicationInsightsComponentFavoriteImpl(inner, this.manager()); } else { @@ -135,34 +103,23 @@ public ApplicationInsightsComponentFavorite add( } } - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, + public Response updateWithResponse(String resourceGroupName, + String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse(resourceGroupName, resourceName, favoriteId, favoriteProperties, context); + Response inner = this.serviceClient() + .updateWithResponse(resourceGroupName, resourceName, favoriteId, favoriteProperties, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); } else { return null; } } - public ApplicationInsightsComponentFavorite update( - String resourceGroupName, - String resourceName, - String favoriteId, + public ApplicationInsightsComponentFavorite update(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { - ApplicationInsightsComponentFavoriteInner inner = - this.serviceClient().update(resourceGroupName, resourceName, favoriteId, favoriteProperties); + ApplicationInsightsComponentFavoriteInner inner + = this.serviceClient().update(resourceGroupName, resourceName, favoriteId, favoriteProperties); if (inner != null) { return new ApplicationInsightsComponentFavoriteImpl(inner, this.manager()); } else { @@ -170,8 +127,8 @@ public ApplicationInsightsComponentFavorite update( } } - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context) { + public Response deleteWithResponse(String resourceGroupName, String resourceName, String favoriteId, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, favoriteId, context); } 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 b012287eb24d5..b59351a1b1f66 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 @@ -12,8 +12,7 @@ public final class LiveTokenResponseImpl implements LiveTokenResponse { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - LiveTokenResponseImpl( - LiveTokenResponseInner innerObject, + LiveTokenResponseImpl(LiveTokenResponseInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensClientImpl.java index 0c0e5a423e4d6..ef66bcbbec7f5 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 @@ -25,47 +25,50 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.LiveTokenResponseInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in LiveTokensClient. */ +/** + * An instance of this class provides access to all the operations defined in LiveTokensClient. + */ public final class LiveTokensClientImpl implements LiveTokensClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final LiveTokensService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of LiveTokensClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ LiveTokensClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(LiveTokensService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(LiveTokensService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ApplicationInsightsManagementClientLiveTokens to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for ApplicationInsightsManagementClientLiveTokens to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface LiveTokensService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Post("/{resourceUri}/providers/Microsoft.Insights/generatelivetoken") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * **Gets an access token for live metrics stream data.**. - * + * * @param resourceUri The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -75,10 +78,8 @@ Mono> get( @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.")); + 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.")); @@ -92,7 +93,7 @@ private Mono> getWithResponseAsync(String resou /** * **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. @@ -103,10 +104,8 @@ private Mono> getWithResponseAsync(String resou @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.")); + 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.")); @@ -119,7 +118,7 @@ private Mono> getWithResponseAsync(String resou /** * **Gets an access token for live metrics stream data.**. - * + * * @param resourceUri The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -133,7 +132,7 @@ private Mono getAsync(String resourceUri) { /** * **Gets an access token for live metrics stream data.**. - * + * * @param resourceUri The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,7 +147,7 @@ public Response getWithResponse(String resourceUri, Cont /** * **Gets an access token for live metrics stream data.**. - * + * * @param resourceUri The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. 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 1b150364bbad2..91588c440e9eb 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 @@ -20,8 +20,7 @@ public final class LiveTokensImpl implements LiveTokens { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public LiveTokensImpl( - LiveTokensClient innerClient, + public LiveTokensImpl(LiveTokensClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,10 +29,7 @@ public LiveTokensImpl( 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new LiveTokenResponseImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java deleted file mode 100644 index ade2881cdf6e8..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java +++ /dev/null @@ -1,314 +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.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentity; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class MyWorkbookImpl implements MyWorkbook, MyWorkbook.Definition, MyWorkbook.Update { - private MyWorkbookInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public MyWorkbookManagedIdentity identity() { - return this.innerModel().identity(); - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public Map etag() { - Map inner = this.innerModel().etag(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public Kind kind() { - return this.innerModel().kind(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String serializedData() { - return this.innerModel().serializedData(); - } - - public String version() { - return this.innerModel().version(); - } - - public String timeModified() { - return this.innerModel().timeModified(); - } - - public String category() { - return this.innerModel().category(); - } - - public List tagsPropertiesTags() { - List inner = this.innerModel().tagsPropertiesTags(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String userId() { - return this.innerModel().userId(); - } - - public String sourceId() { - return this.innerModel().sourceId(); - } - - public String storageUri() { - return this.innerModel().storageUri(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public MyWorkbookInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String resourceName; - - private String createSourceId; - - private String updateSourceId; - - public MyWorkbookImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public MyWorkbook create() { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .createOrUpdateWithResponse( - resourceGroupName, resourceName, this.innerModel(), createSourceId, Context.NONE) - .getValue(); - return this; - } - - public MyWorkbook create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), createSourceId, context) - .getValue(); - return this; - } - - MyWorkbookImpl( - String name, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = new MyWorkbookInner(); - this.serviceManager = serviceManager; - this.resourceName = name; - this.createSourceId = null; - } - - public MyWorkbookImpl update() { - this.updateSourceId = null; - return this; - } - - public MyWorkbook apply() { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .updateWithResponse(resourceGroupName, resourceName, this.innerModel(), updateSourceId, Context.NONE) - .getValue(); - return this; - } - - public MyWorkbook apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .updateWithResponse(resourceGroupName, resourceName, this.innerModel(), updateSourceId, context) - .getValue(); - return this; - } - - MyWorkbookImpl( - MyWorkbookInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "myWorkbooks"); - } - - public MyWorkbook refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) - .getValue(); - return this; - } - - public MyWorkbook refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) - .getValue(); - return this; - } - - public MyWorkbookImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public MyWorkbookImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public MyWorkbookImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public MyWorkbookImpl withIdentity(MyWorkbookManagedIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public MyWorkbookImpl withName(String name) { - this.innerModel().withName(name); - return this; - } - - public MyWorkbookImpl withType(String type) { - this.innerModel().withType(type); - return this; - } - - public MyWorkbookImpl withEtag(Map etag) { - this.innerModel().withEtag(etag); - return this; - } - - public MyWorkbookImpl withKind(Kind kind) { - this.innerModel().withKind(kind); - return this; - } - - public MyWorkbookImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; - } - - public MyWorkbookImpl withSerializedData(String serializedData) { - this.innerModel().withSerializedData(serializedData); - return this; - } - - public MyWorkbookImpl withVersion(String version) { - this.innerModel().withVersion(version); - return this; - } - - public MyWorkbookImpl withCategory(String category) { - this.innerModel().withCategory(category); - return this; - } - - public MyWorkbookImpl withTagsPropertiesTags(List tagsPropertiesTags) { - this.innerModel().withTagsPropertiesTags(tagsPropertiesTags); - return this; - } - - public MyWorkbookImpl withSourceId(String sourceId) { - this.innerModel().withSourceId(sourceId); - return this; - } - - public MyWorkbookImpl withStorageUri(String storageUri) { - this.innerModel().withStorageUri(storageUri); - return this; - } - - public MyWorkbookImpl withSourceIdParameter(String sourceId) { - if (isInCreateMode()) { - this.createSourceId = sourceId; - return this; - } else { - this.updateSourceId = sourceId; - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java deleted file mode 100644 index fa36814d6044e..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java +++ /dev/null @@ -1,1478 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.applicationinsights.fluent.MyWorkbooksClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbooksListResult; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in MyWorkbooksClient. */ -public final class MyWorkbooksClientImpl implements MyWorkbooksClient { - /** The proxy service used to perform REST calls. */ - private final MyWorkbooksService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of MyWorkbooksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - MyWorkbooksClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(MyWorkbooksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientMyWorkbooks to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - public interface MyWorkbooksService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.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); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/myWorkbooks") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.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); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("sourceId") String sourceId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MyWorkbookInner workbookProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}") - @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("sourceId") String sourceId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MyWorkbookInner workbookProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get all private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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) { - 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 = "2021-03-08"; - 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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, - 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 = "2021-03-08"; - 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 private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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 private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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 private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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 private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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<>( - listByResourceGroupAsync(resourceGroupName, category, tags, sourceId, canFetchContent)); - } - - /** - * Get all private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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<>( - listByResourceGroupAsync(resourceGroupName, category, tags, sourceId, canFetchContent, context)); - } - - /** - * Get all private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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 = "2021-03-08"; - 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 private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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 = "2021-03-08"; - 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 private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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 private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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 private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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)); - } - - /** - * Get all private 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 ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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)); - } - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName along with {@link Response} 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 (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 = "2021-03-08"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName along with {@link Response} 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 (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 = "2021-03-08"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context); - } - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName 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())); - } - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MyWorkbookInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} 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.")); - } - final String apiVersion = "2021-03-08"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} 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 = "2021-03-08"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context); - } - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteWithResponse(resourceGroupName, resourceName, Context.NONE); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, MyWorkbookInner 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 = "2021-03-08"; - 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())); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String resourceName, - MyWorkbookInner 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(); - } - final String apiVersion = "2021-03-08"; - 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); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { - final String sourceId = null; - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context) - .block(); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MyWorkbookInner createOrUpdate( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { - final String sourceId = null; - return createOrUpdateWithResponse(resourceGroupName, resourceName, workbookProperties, sourceId, Context.NONE) - .getValue(); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String resourceName, MyWorkbookInner 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 = "2021-03-08"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - sourceId, - apiVersion, - workbookProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - MyWorkbookInner 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(); - } - final String apiVersion = "2021-03-08"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - sourceId, - apiVersion, - workbookProperties, - accept, - context); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { - final String sourceId = null; - return updateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context).block(); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MyWorkbookInner update(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { - final String sourceId = null; - return updateWithResponse(resourceGroupName, resourceName, workbookProperties, sourceId, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result 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( - 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @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}. - */ - @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.")); - } - 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)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result 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( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksImpl.java deleted file mode 100644 index 21f0ed3a77961..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksImpl.java +++ /dev/null @@ -1,183 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.MyWorkbooksClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbooks; -import java.util.List; - -public final class MyWorkbooksImpl implements MyWorkbooks { - private static final ClientLogger LOGGER = new ClientLogger(MyWorkbooksImpl.class); - - private final MyWorkbooksClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public MyWorkbooksImpl( - MyWorkbooksClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, category); - return Utils.mapPage(inner, inner1 -> new MyWorkbookImpl(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 Utils.mapPage(inner, inner1 -> new MyWorkbookImpl(inner1, this.manager())); - } - - public PagedIterable list(CategoryType category) { - PagedIterable inner = this.serviceClient().list(category); - return Utils.mapPage(inner, inner1 -> new MyWorkbookImpl(inner1, this.manager())); - } - - public PagedIterable list( - CategoryType category, List tags, Boolean canFetchContent, Context context) { - PagedIterable inner = this.serviceClient().list(category, tags, canFetchContent, context); - return Utils.mapPage(inner, inner1 -> new MyWorkbookImpl(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 MyWorkbookImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public MyWorkbook getByResourceGroup(String resourceGroupName, String resourceName) { - MyWorkbookInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); - if (inner != null) { - return new MyWorkbookImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); - } - - public void deleteByResourceGroup(String resourceGroupName, String resourceName) { - this.serviceClient().delete(resourceGroupName, resourceName); - } - - public MyWorkbook getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "myWorkbooks"); - if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'myWorkbooks'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "myWorkbooks"); - if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'myWorkbooks'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "myWorkbooks"); - if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'myWorkbooks'.", id))); - } - this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "myWorkbooks"); - if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'myWorkbooks'.", id))); - } - return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, context); - } - - private MyWorkbooksClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } - - public MyWorkbookImpl define(String name) { - return new MyWorkbookImpl(name, this.manager()); - } -} 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 6d6134702d47f..b882928ccdea0 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 @@ -13,8 +13,7 @@ public final class OperationImpl implements Operation { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - OperationImpl( - OperationInner innerObject, + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java index d9de6f397a5e3..fba1b17820b01 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 @@ -30,122 +30,102 @@ import com.azure.resourcemanager.applicationinsights.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ApplicationInsightsManagementClientOperations to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for ApplicationInsightsManagementClientOperations to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Insights/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Lists all of the available insights REST API operations. - * + * * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String apiVersion = "2021-03-08"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the available insights REST API operations. - * + * * @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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String 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)); + 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)); } /** * Lists all of the available insights REST API operations. - * + * * @throws 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}. @@ -157,7 +137,7 @@ private PagedFlux listAsync() { /** * Lists all of the available insights REST API operations. - * + * * @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. @@ -166,17 +146,17 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all of the available insights REST API operations. - * + * * @throws 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 - * PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -185,13 +165,13 @@ public PagedIterable list() { /** * Lists all of the available insights REST API operations. - * + * * @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 - * PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -200,14 +180,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to list Azure Workbooks operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -215,37 +196,28 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to list Azure Workbooks operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -253,23 +225,13 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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 2b381e9c29628..14d49b659b790 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 @@ -19,8 +19,7 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, + public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public OperationsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { 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 54a156d46a566..548dac24eb8d3 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 @@ -32,24 +32,24 @@ * An instance of this class provides access to all the operations defined in ProactiveDetectionConfigurationsClient. */ public final class ProactiveDetectionConfigurationsClientImpl implements ProactiveDetectionConfigurationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ProactiveDetectionConfigurationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of ProactiveDetectionConfigurationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ProactiveDetectionConfigurationsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create( - ProactiveDetectionConfigurationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ProactiveDetectionConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,82 +60,62 @@ public final class ProactiveDetectionConfigurationsClientImpl implements Proacti @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface ProactiveDetectionConfigurationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs") - @ExpectedResponses({200}) + @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("$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); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}") - @ExpectedResponses({200}) + @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("$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); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @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, - @BodyParam("application/json") - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - @HeaderParam("Accept") String accept, - Context context); + @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, + @BodyParam("application/json") ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of ProactiveDetection configurations of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (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.")); + 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.")); @@ -143,50 +123,37 @@ Mono> 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), 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}. + * @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.")); + 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.")); + 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.")); @@ -194,55 +161,48 @@ Mono> 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); + 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. - * + * * @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 ProactiveDetection configurations of an Application Insights component on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, String resourceName) { + private Mono> + listAsync(String resourceGroupName, String resourceName) { return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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}. + * @return a list of ProactiveDetection configurations of an Application Insights component along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response> + listWithResponse(String resourceGroupName, String resourceName, Context context) { return listWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -251,42 +211,38 @@ public Response list( - String resourceGroupName, String resourceName) { + public List list(String resourceGroupName, + String resourceName) { return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** * 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. + * 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 ProactiveDetection configuration for this configuration id along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String configurationId) { + 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.")); + 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.")); + 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.")); @@ -298,53 +254,39 @@ private Mono - service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - configurationId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, apiVersion, + 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. + * 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String configurationId, Context context) { + 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.")); + 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.")); + 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.")); @@ -356,44 +298,36 @@ private Mono getAsync( - String resourceGroupName, String resourceName, String configurationId) { + private Mono getAsync(String resourceGroupName, + String resourceName, String configurationId) { return getWithResponseAsync(resourceGroupName, resourceName, configurationId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. + * 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. @@ -401,65 +335,59 @@ private Mono g * @return the ProactiveDetection configuration for this configuration id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String configurationId, Context context) { + public Response + getWithResponse(String resourceGroupName, String resourceName, String configurationId, Context context) { return getWithResponseAsync(resourceGroupName, resourceName, configurationId, context).block(); } /** * 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. + * 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 ProactiveDetection configuration for this configuration id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentProactiveDetectionConfigurationInner get( - String resourceGroupName, String resourceName, String configurationId) { + public ApplicationInsightsComponentProactiveDetectionConfigurationInner get(String resourceGroupName, + String resourceName, String configurationId) { return getWithResponse(resourceGroupName, resourceName, configurationId, Context.NONE).getValue(); } /** * 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. + * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. + * configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String configurationId, + 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.")); + 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.")); + 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.")); @@ -469,70 +397,52 @@ private Mono - service - .update( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - configurationId, - proactiveDetectionProperties, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, configurationId, proactiveDetectionProperties, accept, + 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. + * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. + * 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String configurationId, + 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.")); + 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.")); + 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.")); @@ -542,48 +452,35 @@ private Mono updateAsync( - String resourceGroupName, - String resourceName, - String configurationId, + private Mono updateAsync(String resourceGroupName, + String resourceName, String configurationId, ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { return updateWithResponseAsync(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -591,13 +488,13 @@ private Mono u /** * 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. + * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. + * 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. @@ -606,38 +503,32 @@ private Mono u */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String configurationId, + String resourceGroupName, String resourceName, String configurationId, ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, Context context) { - return updateWithResponseAsync( - resourceGroupName, resourceName, configurationId, proactiveDetectionProperties, context) - .block(); + return updateWithResponseAsync(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties, + context).block(); } /** * 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. + * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. + * configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentProactiveDetectionConfigurationInner update( - String resourceGroupName, - String resourceName, - String configurationId, + public ApplicationInsightsComponentProactiveDetectionConfigurationInner update(String resourceGroupName, + String resourceName, String configurationId, ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { - return updateWithResponse( - resourceGroupName, resourceName, configurationId, proactiveDetectionProperties, Context.NONE) - .getValue(); + return updateWithResponse(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties, + Context.NONE).getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java index dcdd4512ed429..cd813f8b24e08 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java @@ -23,72 +23,56 @@ public final class ProactiveDetectionConfigurationsImpl implements ProactiveDete private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public ProactiveDetectionConfigurationsImpl( - ProactiveDetectionConfigurationsClient innerClient, + public ProactiveDetectionConfigurationsImpl(ProactiveDetectionConfigurationsClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response> listWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response> inner = - this.serviceClient().listWithResponse(resourceGroupName, resourceName, context); + public Response> + listWithResponse(String resourceGroupName, 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 ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner1, this.manager())) + 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; } } - public List list( - String resourceGroupName, String resourceName) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName); + public List list(String resourceGroupName, + String resourceName) { + List inner + = this.serviceClient().list(resourceGroupName, resourceName); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map( - inner1 -> - new ApplicationInsightsComponentProactiveDetectionConfigurationImpl( - inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream().map( + inner1 -> new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } } - public Response getWithResponse( - String resourceGroupName, String resourceName, String configurationId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, configurationId, context); + public Response + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner.getValue(), this.manager())); } else { return null; } } - public ApplicationInsightsComponentProactiveDetectionConfiguration get( - String resourceGroupName, String resourceName, String configurationId) { - ApplicationInsightsComponentProactiveDetectionConfigurationInner inner = - this.serviceClient().get(resourceGroupName, resourceName, configurationId); + public ApplicationInsightsComponentProactiveDetectionConfiguration get(String resourceGroupName, + String resourceName, String configurationId) { + ApplicationInsightsComponentProactiveDetectionConfigurationInner inner + = this.serviceClient().get(resourceGroupName, resourceName, configurationId); if (inner != null) { return new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner, this.manager()); } else { @@ -97,34 +81,25 @@ public ApplicationInsightsComponentProactiveDetectionConfiguration get( } public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String configurationId, + String resourceGroupName, String resourceName, String configurationId, ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse( - resourceGroupName, resourceName, configurationId, proactiveDetectionProperties, context); + Response inner + = this.serviceClient().updateWithResponse(resourceGroupName, resourceName, configurationId, + proactiveDetectionProperties, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner.getValue(), this.manager())); } else { return null; } } - public ApplicationInsightsComponentProactiveDetectionConfiguration update( - String resourceGroupName, - String resourceName, - String configurationId, + public ApplicationInsightsComponentProactiveDetectionConfiguration update(String resourceGroupName, + String resourceName, String configurationId, ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { - ApplicationInsightsComponentProactiveDetectionConfigurationInner inner = - this.serviceClient().update(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties); + ApplicationInsightsComponentProactiveDetectionConfigurationInner inner = this.serviceClient() + .update(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties); if (inner != null) { return new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner, this.manager()); } else { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/Utils.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ResourceManagerUtils.java similarity index 90% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/Utils.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ResourceManagerUtils.java index 3f814540fcb4d..89fe3cd50b7e5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/Utils.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ResourceManagerUtils.java @@ -19,8 +19,8 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { - private Utils() { +final class ResourceManagerUtils { + private ResourceManagerUtils() { } static String getValueFromIdByName(String id, String name) { @@ -41,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -74,6 +75,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { @@ -87,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override 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 98b9d33f63276..9833ffc1b8619 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 @@ -141,22 +141,14 @@ public WebTestImpl withExistingResourceGroup(String resourceGroupName) { } public WebTest create() { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .createOrUpdateWithResponse(resourceGroupName, webTestName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWebTests() + .createOrUpdateWithResponse(resourceGroupName, webTestName, this.innerModel(), Context.NONE).getValue(); return this; } public WebTest create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .createOrUpdateWithResponse(resourceGroupName, webTestName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWebTests() + .createOrUpdateWithResponse(resourceGroupName, webTestName, this.innerModel(), context).getValue(); return this; } @@ -172,51 +164,34 @@ public WebTestImpl update() { } public WebTest apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .updateTagsWithResponse(resourceGroupName, webTestName, updateWebTestTags, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWebTests() + .updateTagsWithResponse(resourceGroupName, webTestName, updateWebTestTags, Context.NONE).getValue(); return this; } public WebTest apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .updateTagsWithResponse(resourceGroupName, webTestName, updateWebTestTags, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWebTests() + .updateTagsWithResponse(resourceGroupName, webTestName, updateWebTestTags, context).getValue(); return this; } - WebTestImpl( - WebTestInner innerObject, + WebTestImpl(WebTestInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.webTestName = Utils.getValueFromIdByName(innerObject.id(), "webtests"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.webTestName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "webtests"); } public WebTest refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .getByResourceGroupWithResponse(resourceGroupName, webTestName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWebTests() + .getByResourceGroupWithResponse(resourceGroupName, webTestName, Context.NONE).getValue(); return this; } public WebTest refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .getByResourceGroupWithResponse(resourceGroupName, webTestName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWebTests() + .getByResourceGroupWithResponse(resourceGroupName, webTestName, context).getValue(); return this; } 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 57eabcd261467..ac570bf91e987 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 @@ -30,76 +30,73 @@ import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsWebTestLocationsListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WebTestLocationsClient. */ +/** + * An instance of this class provides access to all the operations defined in WebTestLocationsClient. + */ public final class WebTestLocationsClientImpl implements WebTestLocationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WebTestLocationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of WebTestLocationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WebTestLocationsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(WebTestLocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(WebTestLocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ApplicationInsightsManagementClientWebTestLocations to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for ApplicationInsightsManagementClientWebTestLocations to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface WebTestLocationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/syntheticmonitorlocations") - @ExpectedResponses({200}) + @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, - @HeaderParam("Accept") String accept, - Context context); + 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); } /** * Gets a list of web test locations available to this 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 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 along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + 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.")); @@ -107,54 +104,39 @@ private Mono> li 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of web test locations available to this 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 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 along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + 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.")); @@ -163,40 +145,32 @@ private Mono> li 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)); + .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)); } /** * Gets a list of web test locations available to this 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 web test locations available to this Application Insights component as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName) { + private PagedFlux listAsync(String resourceGroupName, + String resourceName) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName)); } /** * Gets a list of web test locations available to this 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. @@ -204,34 +178,34 @@ private PagedFlux listAsync( * @throws 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}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName, Context context) { + private PagedFlux listAsync(String resourceGroupName, + String resourceName, Context context) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context)); } /** * Gets a list of web test locations available to this 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 web test locations available to this Application Insights component as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName) { + public PagedIterable list(String resourceGroupName, + String resourceName) { return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); } /** * Gets a list of web test locations available to this 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. @@ -239,11 +213,11 @@ public PagedIterable list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of web test locations available to this Application Insights component as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { + public PagedIterable list(String resourceGroupName, + String resourceName, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); } } 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 1ba1e77acbb7c..b7b9e6e0e3529 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 @@ -19,27 +19,26 @@ public final class WebTestLocationsImpl implements WebTestLocations { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public WebTestLocationsImpl( - WebTestLocationsClient innerClient, + public WebTestLocationsImpl(WebTestLocationsClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list( - String resourceGroupName, String resourceName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName); - return Utils - .mapPage(inner, inner1 -> new ApplicationInsightsComponentWebTestLocationImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, + String resourceName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ApplicationInsightsComponentWebTestLocationImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName, context); - return Utils - .mapPage(inner, inner1 -> new ApplicationInsightsComponentWebTestLocationImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, + String resourceName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ApplicationInsightsComponentWebTestLocationImpl(inner1, this.manager())); } private WebTestLocationsClient serviceClient() { 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 325931b7f0105..a68e9b8de06b7 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 @@ -35,17 +35,23 @@ import com.azure.resourcemanager.applicationinsights.models.WebTestListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WebTestsClient. */ +/** + * An instance of this class provides access to all the operations defined in WebTestsClient. + */ public final class WebTestsClientImpl implements WebTestsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WebTestsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of WebTestsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WebTestsClientImpl(ApplicationInsightsManagementClientImpl client) { @@ -60,280 +66,205 @@ public final class WebTestsClientImpl implements WebTestsClient { @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface WebTestsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests") - @ExpectedResponses({200}) + @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> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}") - @ExpectedResponses({200}) + @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, - @HeaderParam("Accept") String accept, - Context context); + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @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}) + @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, + 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); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}") - @ExpectedResponses({200}) + @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, + 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, 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}) + @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, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("webTestName") String webTestName, - @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webTestName") String webTestName, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/webtests") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{componentName}/webtests") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{componentName}/webtests") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByComponent( - @HostParam("$host") String endpoint, - @PathParam("componentName") String componentName, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByComponent(@HostParam("$host") String endpoint, + @PathParam("componentName") String componentName, @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByComponentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * 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}. + * @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.")); + 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.")); + 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)) + .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}. + * @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) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (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.")); + 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)); + .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}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(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}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * 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}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -342,14 +273,14 @@ public 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 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}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -358,33 +289,29 @@ public PagedIterable listByResourceGroup(String resourceGroupName, /** * Get a specific Application Insights web test definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String webTestName) { + 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.")); + 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.")); + 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.")); @@ -392,23 +319,14 @@ private Mono> getByResourceGroupWithResponseAsync( 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), 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. @@ -416,26 +334,22 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String webTestName, Context context) { + 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.")); + 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.")); + 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.")); @@ -443,20 +357,13 @@ private Mono> getByResourceGroupWithResponseAsync( 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); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), webTestName, accept, context); } /** * Get a specific Application Insights web test definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -472,7 +379,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str /** * Get a specific Application Insights web test definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @param context The context to associate with this operation. @@ -482,14 +389,14 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str * @return a specific Application Insights web test definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String webTestName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String webTestName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, webTestName, context).block(); } /** * Get a specific Application Insights web test definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -504,35 +411,31 @@ public WebTestInner getByResourceGroup(String resourceGroupName, String webTestN /** * 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. + * test definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights WebTest definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return an Application Insights WebTest definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String webTestName, WebTestInner webTestDefinition) { + 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.")); + 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.")); + 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.")); @@ -546,53 +449,39 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2022-06-15"; 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), webTestName, webTestDefinition, accept, 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. + * 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}. + * @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) { + 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.")); + 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.")); + 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.")); @@ -606,44 +495,36 @@ private Mono> createOrUpdateWithResponseAsync( 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); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), webTestName, webTestDefinition, accept, context); } /** * 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. + * test definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Application Insights WebTest definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String webTestName, WebTestInner webTestDefinition) { + private Mono createOrUpdateAsync(String resourceGroupName, String webTestName, + WebTestInner webTestDefinition) { return createOrUpdateWithResponseAsync(resourceGroupName, webTestName, webTestDefinition) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates an Application Insights web test definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web - * test definition. + * 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. @@ -651,18 +532,18 @@ private Mono createOrUpdateAsync( * @return an Application Insights WebTest definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String webTestName, WebTestInner webTestDefinition, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String webTestName, + WebTestInner webTestDefinition, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, webTestName, webTestDefinition, context).block(); } /** * Creates or updates an Application Insights web test definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web - * test definition. + * test definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -675,34 +556,30 @@ public WebTestInner createOrUpdate(String resourceGroupName, String webTestName, /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) { + 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.")); + 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.")); + 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.")); @@ -715,24 +592,14 @@ private Mono> updateTagsWithResponseAsync( final String apiVersion = "2022-06-15"; 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), webTestName, webTestTags, accept, 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. @@ -740,27 +607,23 @@ private Mono> updateTagsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) { + 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.")); + 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.")); + 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.")); @@ -773,21 +636,13 @@ private Mono> updateTagsWithResponseAsync( 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); + 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. - * + * * @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. @@ -804,7 +659,7 @@ private Mono updateTagsAsync(String resourceGroupName, String webT /** * 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. @@ -815,14 +670,14 @@ private Mono updateTagsAsync(String resourceGroupName, String webT * @return an Application Insights WebTest definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse( - String resourceGroupName, String webTestName, TagsResource webTestTags, Context context) { + public Response updateTagsWithResponse(String resourceGroupName, String webTestName, + TagsResource webTestTags, Context context) { return updateTagsWithResponseAsync(resourceGroupName, webTestName, webTestTags, context).block(); } /** * 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. @@ -838,7 +693,7 @@ public WebTestInner updateTags(String resourceGroupName, String webTestName, Tag /** * 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. @@ -849,16 +704,12 @@ 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -869,22 +720,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } 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(), this.client.getSubscriptionId(), + resourceGroupName, webTestName, apiVersion, 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. @@ -894,19 +737,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String webTestName, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -917,19 +756,13 @@ private Mono> deleteWithResponseAsync( } final String apiVersion = "2022-06-15"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - webTestName, - apiVersion, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + webTestName, apiVersion, context); } /** * Deletes an Application Insights web test. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -944,7 +777,7 @@ private Mono deleteAsync(String resourceGroupName, String webTestName) { /** * Deletes an Application Insights web test. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @param context The context to associate with this operation. @@ -960,7 +793,7 @@ public Response deleteWithResponse(String resourceGroupName, String webTes /** * 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. @@ -974,92 +807,67 @@ public void delete(String resourceGroupName, String webTestName) { /** * 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}. + * @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() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2022-06-15"; 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.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())); } /** * Get all Application Insights web test definitions for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test definitions for the specified subscription 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> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String 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 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)); } /** * 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 as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1068,27 +876,27 @@ private PagedFlux listAsync() { /** * Get all Application Insights web test definitions for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Application Insights web test definitions for the specified subscription as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * 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 as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1097,13 +905,13 @@ public PagedIterable list() { /** * Get all Application Insights web test definitions for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Application Insights web test definitions for the specified subscription as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1112,23 +920,21 @@ public PagedIterable list(Context context) { /** * Get all Application Insights web tests defined for the specified component. - * + * * @param componentName The name of the Application Insights component resource. * @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 component along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByComponentSinglePageAsync( - String componentName, String resourceGroupName) { + 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.")); + 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.")); @@ -1138,40 +944,22 @@ private Mono> listByComponentSinglePageAsync( .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.")); + 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)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all Application Insights web tests defined for the specified component. - * + * * @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. @@ -1179,16 +967,14 @@ private Mono> listByComponentSinglePageAsync( * @throws 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}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByComponentSinglePageAsync( - String componentName, String resourceGroupName, Context context) { + 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.")); + 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.")); @@ -1198,82 +984,65 @@ private Mono> listByComponentSinglePageAsync( .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.")); + 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)); + .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)); } /** * Get all Application Insights web tests defined for the specified component. - * + * * @param componentName The name of the Application Insights component resource. * @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 component as paginated response with {@link - * PagedFlux}. + * @return all Application Insights web tests defined for the specified component as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByComponentAsync(String componentName, String resourceGroupName) { - return new PagedFlux<>( - () -> listByComponentSinglePageAsync(componentName, resourceGroupName), + return new PagedFlux<>(() -> listByComponentSinglePageAsync(componentName, resourceGroupName), nextLink -> listByComponentNextSinglePageAsync(nextLink)); } /** * Get all Application Insights web tests defined for the specified component. - * + * * @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 as paginated response with {@link - * PagedFlux}. + * @return all Application Insights web tests defined for the specified component as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByComponentAsync( - String componentName, String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByComponentSinglePageAsync(componentName, resourceGroupName, context), + private PagedFlux listByComponentAsync(String componentName, String resourceGroupName, + Context context) { + return new PagedFlux<>(() -> listByComponentSinglePageAsync(componentName, resourceGroupName, context), nextLink -> listByComponentNextSinglePageAsync(nextLink, context)); } /** * Get all Application Insights web tests defined for the specified component. - * + * * @param componentName The name of the Application Insights component resource. * @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 component as paginated response with {@link - * PagedIterable}. + * @return all Application Insights web tests defined for the specified component as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByComponent(String componentName, String resourceGroupName) { @@ -1282,32 +1051,33 @@ public PagedIterable listByComponent(String componentName, String /** * Get all Application Insights web tests defined for the specified component. - * + * * @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 as paginated response with {@link - * PagedIterable}. + * @return all Application Insights web tests defined for the specified component as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByComponent( - String componentName, String resourceGroupName, Context context) { + public PagedIterable listByComponent(String componentName, String resourceGroupName, + Context context) { return new PagedIterable<>(listByComponentAsync(componentName, resourceGroupName, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1315,38 +1085,30 @@ private Mono> listByResourceGroupNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { @@ -1354,36 +1116,27 @@ private Mono> listByResourceGroupNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1391,37 +1144,28 @@ private Mono> listNextSinglePageAsync(String nextLin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1429,36 +1173,27 @@ private Mono> listNextSinglePageAsync(String nextLin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByComponentNextSinglePageAsync(String nextLink) { @@ -1466,37 +1201,29 @@ private Mono> listByComponentNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByComponentNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByComponentNextSinglePageAsync(String nextLink, Context context) { @@ -1504,23 +1231,13 @@ private Mono> listByComponentNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByComponentNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByComponentNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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 d9470ae447613..14dd7f958c7a8 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 @@ -21,8 +21,7 @@ public final class WebTestsImpl implements WebTests { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public WebTestsImpl( - WebTestsClient innerClient, + public WebTestsImpl(WebTestsClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,23 +29,20 @@ public WebTestsImpl( public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); + 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 Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); + 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); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WebTestImpl(inner.getValue(), this.manager())); } else { return null; @@ -62,8 +58,8 @@ public WebTest getByResourceGroup(String resourceGroupName, String webTestName) } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String webTestName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String webTestName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, webTestName, context); } @@ -73,97 +69,77 @@ public void deleteByResourceGroup(String resourceGroupName, String webTestName) public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); } public PagedIterable listByComponent(String componentName, String resourceGroupName) { PagedIterable inner = this.serviceClient().listByComponent(componentName, resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); } public PagedIterable listByComponent(String componentName, String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByComponent(componentName, resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByComponent(componentName, resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); } public WebTest getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String webTestName = Utils.getValueFromIdByName(id, "webtests"); + String webTestName = ResourceManagerUtils.getValueFromIdByName(id, "webtests"); if (webTestName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, webTestName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String webTestName = Utils.getValueFromIdByName(id, "webtests"); + String webTestName = ResourceManagerUtils.getValueFromIdByName(id, "webtests"); if (webTestName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, webTestName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String webTestName = Utils.getValueFromIdByName(id, "webtests"); + String webTestName = ResourceManagerUtils.getValueFromIdByName(id, "webtests"); if (webTestName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, webTestName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String webTestName = Utils.getValueFromIdByName(id, "webtests"); + String webTestName = ResourceManagerUtils.getValueFromIdByName(id, "webtests"); if (webTestName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, webTestName, context); } 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 a2932ebd1c70f..949f982070eba 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 @@ -12,8 +12,7 @@ public final class WorkItemConfigurationImpl implements WorkItemConfiguration { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - WorkItemConfigurationImpl( - WorkItemConfigurationInner innerObject, + WorkItemConfigurationImpl(WorkItemConfigurationInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 7fc05bdb6b0af..f0d3c4c022cbb 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 @@ -36,23 +36,28 @@ import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkItemConfigurationsClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkItemConfigurationsClient. + */ public final class WorkItemConfigurationsClientImpl implements WorkItemConfigurationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkItemConfigurationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of WorkItemConfigurationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WorkItemConfigurationsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create(WorkItemConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(WorkItemConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -63,124 +68,90 @@ public final class WorkItemConfigurationsClientImpl implements WorkItemConfigura @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface WorkItemConfigurationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs") - @ExpectedResponses({200}) + @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, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs") - @ExpectedResponses({200}) + 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); + + @Headers({ "Content-Type: application/json" }) + @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("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, @BodyParam("application/json") WorkItemCreateConfiguration workItemConfigurationProperties, - @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/components/{resourceName}/DefaultWorkItemConfig") - @ExpectedResponses({200}) + @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, - @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}) + Mono> getDefault(@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); + + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("workItemConfigId") String workItemConfigId, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}") - @ExpectedResponses({200}) + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("workItemConfigId") String workItemConfigId, Context context); + + @Headers({ "Content-Type: application/json" }) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("workItemConfigId") String workItemConfigId, - @HeaderParam("Accept") String accept, + Mono> getItem(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, + @PathParam("workItemConfigId") String workItemConfigId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @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, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, + Mono> updateItem(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, @PathParam("workItemConfigId") String workItemConfigId, @BodyParam("application/json") WorkItemCreateConfiguration workItemConfigurationProperties, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * Gets the list 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. * @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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + 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.")); @@ -188,27 +159,16 @@ private Mono> listSinglePageAsync( 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the list 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. @@ -216,26 +176,22 @@ private Mono> listSinglePageAsync( * @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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + 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.")); @@ -244,30 +200,22 @@ private Mono> listSinglePageAsync( 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)); + .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)); } /** * Gets the list 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. * @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 as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName) { @@ -276,32 +224,32 @@ private PagedFlux listAsync(String resourceGroupName /** * Gets the list 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 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 as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName, Context context) { + private PagedFlux listAsync(String resourceGroupName, String resourceName, + Context context) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context)); } /** * Gets the list 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. * @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 - * PagedIterable}. + * @return the list work item configurations that exist for the application as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String resourceName) { @@ -310,172 +258,139 @@ public PagedIterable list(String resourceGroupName, /** * Gets the list 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 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 - * PagedIterable}. + * @return the list work item configurations that exist for the application as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, resourceName, 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. + * of a 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 work item configuration associated with an application insights resource along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { + 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.")); + 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.")); + 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.")); + 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"; 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, workItemConfigurationProperties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. + * 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String resourceName, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { + 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.")); + 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.")); + 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.")); + 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); + 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. + * of a 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 work item configuration associated with an application insights resource on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { + private Mono createAsync(String resourceGroupName, String resourceName, + WorkItemCreateConfiguration workItemConfigurationProperties) { return createWithResponseAsync(resourceGroupName, resourceName, workItemConfigurationProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. + * 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. @@ -483,63 +398,56 @@ private Mono createAsync( * @return work item configuration associated with an application insights resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String resourceName, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { + public Response createWithResponse(String resourceGroupName, String resourceName, + WorkItemCreateConfiguration workItemConfigurationProperties, Context context) { return createWithResponseAsync(resourceGroupName, resourceName, workItemConfigurationProperties, context) .block(); } /** * 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. + * of a 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 work item configuration associated with an application insights resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkItemConfigurationInner create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { + public WorkItemConfigurationInner create(String resourceGroupName, String resourceName, + WorkItemCreateConfiguration workItemConfigurationProperties) { return createWithResponse(resourceGroupName, resourceName, workItemConfigurationProperties, Context.NONE) .getValue(); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDefaultWithResponseAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + 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.")); @@ -547,23 +455,14 @@ private Mono> getDefaultWithResponseAsync( 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), 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. @@ -571,26 +470,22 @@ private Mono> getDefaultWithResponseAsync( * @throws 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDefaultWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + 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.")); @@ -598,20 +493,13 @@ private Mono> getDefaultWithResponseAsync( 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); + return service.getDefault(this.client.getEndpoint(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, accept, context); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -627,7 +515,7 @@ private Mono getDefaultAsync(String resourceGroupNam /** * 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. @@ -637,14 +525,14 @@ private Mono getDefaultAsync(String resourceGroupNam * @return default work item configurations that exist for the application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDefaultWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response getDefaultWithResponse(String resourceGroupName, String resourceName, + Context context) { return getDefaultWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -659,34 +547,30 @@ public WorkItemConfigurationInner getDefault(String resourceGroupName, String re /** * 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. + * defined in connector configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) { + 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.")); + 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.")); + 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.")); @@ -697,27 +581,18 @@ private Mono> deleteWithResponseAsync( } final String apiVersion = "2015-05-01"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - workItemConfigId, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, + 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. + * 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. @@ -725,23 +600,19 @@ private Mono> deleteWithResponseAsync( * @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) { + 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.")); + 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.")); + 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.")); @@ -752,24 +623,17 @@ private Mono> deleteWithResponseAsync( } 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); + return service.delete(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), + resourceName, workItemConfigId, context); } /** * 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. + * defined in connector configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -783,11 +647,11 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * 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. + * 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. @@ -795,18 +659,18 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { + public Response deleteWithResponse(String resourceGroupName, String resourceName, String workItemConfigId, + Context context) { return deleteWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, context).block(); } /** * 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. + * defined in connector configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -818,35 +682,31 @@ public void delete(String resourceGroupName, String resourceName, String workIte /** * 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. + * defined in connector configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getItemWithResponseAsync( - String resourceGroupName, String resourceName, String workItemConfigId) { + 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.")); + 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.")); + 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.")); @@ -858,53 +718,39 @@ private Mono> getItemWithResponseAsync( final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getItem( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - workItemConfigId, - accept, - context)) + .withContext(context -> service.getItem(this.client.getEndpoint(), resourceGroupName, apiVersion, + 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. + * 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getItemWithResponseAsync( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { + 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.")); + 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.")); + 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.")); @@ -916,45 +762,37 @@ private Mono> getItemWithResponseAsync( 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); + 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. - * + * * @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. + * defined in connector configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getItemAsync( - String resourceGroupName, String resourceName, String workItemConfigId) { + private Mono getItemAsync(String resourceGroupName, String resourceName, + String workItemConfigId) { return getItemWithResponseAsync(resourceGroupName, resourceName, workItemConfigId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. + * 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. @@ -962,18 +800,18 @@ private Mono getItemAsync( * @return specified work item configuration for an Application Insights component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getItemWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { + public Response getItemWithResponse(String resourceGroupName, String resourceName, + String workItemConfigId, Context context) { return getItemWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, context).block(); } /** * 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. + * defined in connector configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -986,40 +824,33 @@ public WorkItemConfigurationInner getItem(String resourceGroupName, String resou /** * 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. + * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. + * for this 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 work item configuration associated with an application insights resource along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateItemWithResponseAsync( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties) { + 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.")); + 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.")); + 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.")); @@ -1029,70 +860,51 @@ private Mono> updateItemWithResponseAsync( .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.")); + 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"; 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(), resourceGroupName, apiVersion, + this.client.getSubscriptionId(), resourceName, workItemConfigId, workItemConfigurationProperties, + accept, 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. + * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. + * 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateItemWithResponseAsync( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, + 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.")); + 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.")); + 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.")); @@ -1102,64 +914,50 @@ private Mono> updateItemWithResponseAsync( .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.")); + 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); + 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. - * + * * @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. + * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. + * for this 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 work item configuration associated with an application insights resource on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateItemAsync( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties) { - return updateItemWithResponseAsync( - resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono updateItemAsync(String resourceGroupName, String resourceName, + String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties) { + return updateItemWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, + workItemConfigurationProperties).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. + * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. + * 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. @@ -1167,39 +965,30 @@ private Mono updateItemAsync( * @return work item configuration associated with an application insights resource along with {@link Response}. */ @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(); + public Response updateItemWithResponse(String resourceGroupName, String resourceName, + String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties, Context context) { + return updateItemWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, + workItemConfigurationProperties, context).block(); } /** * 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. + * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. + * for this 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 work item configuration associated with an application insights resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkItemConfigurationInner updateItem( - String resourceGroupName, - String resourceName, - String workItemConfigId, + public WorkItemConfigurationInner updateItem(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties) { - return updateItemWithResponse( - resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties, Context.NONE) - .getValue(); + return updateItemWithResponse(resourceGroupName, resourceName, workItemConfigId, + workItemConfigurationProperties, Context.NONE).getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java index e3d43c883456a..6be5f86f45800 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 @@ -22,8 +22,7 @@ public final class WorkItemConfigurationsImpl implements WorkItemConfigurations private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public WorkItemConfigurationsImpl( - WorkItemConfigurationsClient innerClient, + public WorkItemConfigurationsImpl(WorkItemConfigurationsClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,39 +30,31 @@ public WorkItemConfigurationsImpl( public PagedIterable list(String resourceGroupName, String resourceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName); - return Utils.mapPage(inner, inner1 -> new WorkItemConfigurationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkItemConfigurationImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String resourceName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName, context); - return Utils.mapPage(inner, inner1 -> new WorkItemConfigurationImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkItemConfigurationImpl(inner1, this.manager())); } - public Response createWithResponse( - String resourceGroupName, - String resourceName, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { - Response inner = - this - .serviceClient() - .createWithResponse(resourceGroupName, resourceName, workItemConfigurationProperties, context); + public Response createWithResponse(String resourceGroupName, String resourceName, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkItemConfigurationImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkItemConfiguration create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { - WorkItemConfigurationInner inner = - this.serviceClient().create(resourceGroupName, resourceName, workItemConfigurationProperties); + public WorkItemConfiguration create(String resourceGroupName, String resourceName, + WorkItemCreateConfiguration workItemConfigurationProperties) { + WorkItemConfigurationInner inner + = this.serviceClient().create(resourceGroupName, resourceName, workItemConfigurationProperties); if (inner != null) { return new WorkItemConfigurationImpl(inner, this.manager()); } else { @@ -71,15 +62,12 @@ public WorkItemConfiguration create( } } - public Response getDefaultWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getDefaultWithResponse(resourceGroupName, resourceName, context); + public Response getDefaultWithResponse(String resourceGroupName, String resourceName, + Context context) { + Response inner + = this.serviceClient().getDefaultWithResponse(resourceGroupName, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkItemConfigurationImpl(inner.getValue(), this.manager())); } else { return null; @@ -95,8 +83,8 @@ public WorkItemConfiguration getDefault(String resourceGroupName, String resourc } } - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { + public Response deleteWithResponse(String resourceGroupName, String resourceName, String workItemConfigId, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, workItemConfigId, context); } @@ -104,15 +92,12 @@ public void delete(String resourceGroupName, String resourceName, String workIte this.serviceClient().delete(resourceGroupName, resourceName, workItemConfigId); } - public Response getItemWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { - Response inner = - this.serviceClient().getItemWithResponse(resourceGroupName, resourceName, workItemConfigId, context); + public Response getItemWithResponse(String resourceGroupName, String resourceName, + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkItemConfigurationImpl(inner.getValue(), this.manager())); } else { return null; @@ -120,8 +105,8 @@ public Response getItemWithResponse( } public WorkItemConfiguration getItem(String resourceGroupName, String resourceName, String workItemConfigId) { - WorkItemConfigurationInner inner = - this.serviceClient().getItem(resourceGroupName, resourceName, workItemConfigId); + WorkItemConfigurationInner inner + = this.serviceClient().getItem(resourceGroupName, resourceName, workItemConfigId); if (inner != null) { return new WorkItemConfigurationImpl(inner, this.manager()); } else { @@ -129,37 +114,22 @@ public WorkItemConfiguration getItem(String resourceGroupName, String resourceNa } } - public Response updateItemWithResponse( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { - Response inner = - this - .serviceClient() - .updateItemWithResponse( - resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties, context); + public Response updateItemWithResponse(String resourceGroupName, String resourceName, + String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties, Context context) { + Response inner = this.serviceClient().updateItemWithResponse(resourceGroupName, + resourceName, workItemConfigId, workItemConfigurationProperties, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkItemConfigurationImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkItemConfiguration updateItem( - String resourceGroupName, - String resourceName, - String workItemConfigId, + public WorkItemConfiguration updateItem(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties) { - WorkItemConfigurationInner inner = - this - .serviceClient() - .updateItem(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties); + WorkItemConfigurationInner inner = this.serviceClient().updateItem(resourceGroupName, resourceName, + workItemConfigId, workItemConfigurationProperties); if (inner != null) { return new WorkItemConfigurationImpl(inner, this.manager()); } else { 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 f318681ab4479..ae5b97094e7cb 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 @@ -149,23 +149,15 @@ public WorkbookImpl withExistingResourceGroup(String resourceGroupName) { } public Workbook create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .createOrUpdateWithResponse( - resourceGroupName, resourceName, this.innerModel(), createSourceId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbooks().createOrUpdateWithResponse(resourceGroupName, + resourceName, this.innerModel(), createSourceId, Context.NONE).getValue(); return this; } public Workbook create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), createSourceId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbooks() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), createSourceId, context) + .getValue(); return this; } @@ -183,55 +175,37 @@ public WorkbookImpl update() { } public Workbook apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .updateWithResponse( - resourceGroupName, resourceName, updateSourceId, updateWorkbookUpdateParameters, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbooks().updateWithResponse(resourceGroupName, + resourceName, updateSourceId, updateWorkbookUpdateParameters, Context.NONE).getValue(); return this; } public Workbook apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .updateWithResponse( - resourceGroupName, resourceName, updateSourceId, updateWorkbookUpdateParameters, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbooks().updateWithResponse(resourceGroupName, + resourceName, updateSourceId, updateWorkbookUpdateParameters, context).getValue(); return this; } - WorkbookImpl( - WorkbookInner innerObject, + WorkbookImpl(WorkbookInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "workbooks"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workbooks"); } public Workbook refresh() { Boolean localCanFetchContent = null; - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, localCanFetchContent, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbooks() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, localCanFetchContent, Context.NONE) + .getValue(); return this; } public Workbook refresh(Context context) { Boolean localCanFetchContent = null; - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, localCanFetchContent, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbooks() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, localCanFetchContent, context).getValue(); return this; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java index a0c284882ae91..a741813e9d165 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 @@ -108,27 +108,19 @@ public WorkbookTemplateImpl withExistingResourceGroup(String resourceGroupName) } public WorkbookTemplate create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbookTemplates() - .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbookTemplates() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), Context.NONE).getValue(); return this; } public WorkbookTemplate create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbookTemplates() - .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbookTemplates() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), context).getValue(); return this; } - WorkbookTemplateImpl( - String name, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { + WorkbookTemplateImpl(String name, + com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = new WorkbookTemplateInner(); this.serviceManager = serviceManager; this.resourceName = name; @@ -140,52 +132,36 @@ public WorkbookTemplateImpl update() { } public WorkbookTemplate apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbookTemplates() - .updateWithResponse( - resourceGroupName, resourceName, updateWorkbookTemplateUpdateParameters, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbookTemplates() + .updateWithResponse(resourceGroupName, resourceName, updateWorkbookTemplateUpdateParameters, Context.NONE) + .getValue(); return this; } public WorkbookTemplate apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbookTemplates() - .updateWithResponse(resourceGroupName, resourceName, updateWorkbookTemplateUpdateParameters, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbookTemplates() + .updateWithResponse(resourceGroupName, resourceName, updateWorkbookTemplateUpdateParameters, context) + .getValue(); return this; } - WorkbookTemplateImpl( - WorkbookTemplateInner innerObject, + WorkbookTemplateImpl(WorkbookTemplateInner innerObject, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "workbooktemplates"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workbooktemplates"); } public WorkbookTemplate refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbookTemplates() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbookTemplates() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); return this; } public WorkbookTemplate refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbookTemplates() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkbookTemplates() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, context).getValue(); return this; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java index 749457f63afbb..3db1ca0a81215 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java @@ -35,22 +35,28 @@ import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplatesListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkbookTemplatesClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkbookTemplatesClient. + */ public final class WorkbookTemplatesClientImpl implements WorkbookTemplatesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkbookTemplatesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of WorkbookTemplatesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WorkbookTemplatesClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(WorkbookTemplatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(WorkbookTemplatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -61,101 +67,75 @@ public final class WorkbookTemplatesClientImpl implements WorkbookTemplatesClien @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface WorkbookTemplatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") - @ExpectedResponses({200}) + @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, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") - @ExpectedResponses({200, 201}) + @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, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, + @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("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}") - @ExpectedResponses({200}) + @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, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * Get all Workbook templates defined within a specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Workbook templates defined within a specified resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -164,48 +144,34 @@ private Mono> listByResourceGroupSinglePage 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.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all Workbook templates defined within a specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Workbook templates defined within a specified resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -215,28 +181,21 @@ private Mono> listByResourceGroupSinglePage 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)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), null, null)); } /** * Get all Workbook templates defined within a specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbook templates defined within a specified resource group as paginated response with {@link - * PagedFlux}. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -245,14 +204,14 @@ private PagedFlux listByResourceGroupAsync(String resourc /** * Get all Workbook templates defined within a specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbook templates defined within a specified resource group as paginated response with {@link - * PagedFlux}. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -261,13 +220,13 @@ private PagedFlux listByResourceGroupAsync(String resourc /** * Get all Workbook templates defined within a specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbook templates defined within a specified resource group as paginated response with {@link - * PagedIterable}. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -276,14 +235,14 @@ public PagedIterable listByResourceGroup(String resourceG /** * Get all Workbook templates defined within a specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbook templates defined within a specified resource group as paginated response with {@link - * PagedIterable}. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -292,29 +251,25 @@ public PagedIterable listByResourceGroup(String resourceG /** * Get a single workbook template by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single workbook template by its resourceName along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -326,23 +281,14 @@ private Mono> getByResourceGroupWithResponseAsyn final String apiVersion = "2020-11-20"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a single workbook template by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. @@ -350,22 +296,18 @@ private Mono> getByResourceGroupWithResponseAsyn * @throws 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -377,20 +319,13 @@ private Mono> getByResourceGroupWithResponseAsyn 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); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, apiVersion, accept, context); } /** * Get a single workbook template by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -406,7 +341,7 @@ private Mono getByResourceGroupAsync(String resourceGroup /** * 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. @@ -416,14 +351,14 @@ private Mono getByResourceGroupAsync(String resourceGroup * @return a single workbook template by its resourceName along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** * Get a single workbook template by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -438,7 +373,7 @@ public WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String /** * 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. @@ -449,16 +384,12 @@ public WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String @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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -470,23 +401,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a workbook template. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. @@ -496,19 +418,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -520,20 +438,13 @@ private Mono> deleteWithResponseAsync( 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 service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, apiVersion, accept, context); } /** * Delete a workbook template. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -548,7 +459,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { /** * Delete a workbook template. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. @@ -564,7 +475,7 @@ public Response deleteWithResponse(String resourceGroupName, String resour /** * 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. @@ -578,7 +489,7 @@ public void delete(String resourceGroupName, String 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. @@ -586,22 +497,18 @@ public void delete(String resourceGroupName, String resourceName) { * @throws 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -611,34 +518,22 @@ private Mono> createOrUpdateWithResponseAsync( 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.")); + return Mono.error( + new IllegalArgumentException("Parameter workbookTemplateProperties is required and cannot be null.")); } else { workbookTemplateProperties.validate(); } final String apiVersion = "2020-11-20"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - workbookTemplateProperties, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, apiVersion, workbookTemplateProperties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a new workbook template. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. @@ -647,25 +542,18 @@ private Mono> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Application Insights workbook template definition along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String resourceName, - WorkbookTemplateInner workbookTemplateProperties, - Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -675,31 +563,21 @@ private Mono> createOrUpdateWithResponseAsync( 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.")); + 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); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, apiVersion, workbookTemplateProperties, accept, context); } /** * Create a new workbook template. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. @@ -709,15 +587,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return an Application Insights workbook template definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) { + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + WorkbookTemplateInner workbookTemplateProperties) { return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -728,18 +606,15 @@ private Mono createOrUpdateAsync( * @return an Application Insights workbook template definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - WorkbookTemplateInner workbookTemplateProperties, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + WorkbookTemplateInner workbookTemplateProperties, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties, context) .block(); } /** * Create a new workbook template. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. @@ -749,15 +624,15 @@ public Response createOrUpdateWithResponse( * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookTemplateInner createOrUpdate( - String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) { + public WorkbookTemplateInner createOrUpdate(String resourceGroupName, String resourceName, + WorkbookTemplateInner workbookTemplateProperties) { return createOrUpdateWithResponse(resourceGroupName, resourceName, workbookTemplateProperties, Context.NONE) .getValue(); } /** * 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. @@ -765,24 +640,18 @@ public WorkbookTemplateInner createOrUpdate( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Application Insights workbook template definition along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -797,24 +666,14 @@ private Mono> updateWithResponseAsync( 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, apiVersion, workbookTemplateUpdateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a workbook template that has already been added. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookTemplateUpdateParameters Properties that need to be specified to patch a workbook template. @@ -823,25 +682,18 @@ private Mono> updateWithResponseAsync( * @throws 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, - Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -856,21 +708,13 @@ private Mono> updateWithResponseAsync( final String apiVersion = "2020-11-20"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - workbookTemplateUpdateParameters, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, apiVersion, workbookTemplateUpdateParameters, accept, context); } /** * Updates a workbook template that has already been added. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -887,7 +731,7 @@ private Mono updateAsync(String resourceGroupName, String /** * 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. @@ -898,18 +742,15 @@ private Mono updateAsync(String resourceGroupName, String * @return an Application Insights workbook template definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, - Context context) { + 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. 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 0027da823a571..b35db9e856478 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 @@ -21,8 +21,7 @@ public final class WorkbookTemplatesImpl implements WorkbookTemplates { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public WorkbookTemplatesImpl( - WorkbookTemplatesClient innerClient, + public WorkbookTemplatesImpl(WorkbookTemplatesClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,24 +29,21 @@ public WorkbookTemplatesImpl( public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WorkbookTemplateImpl(inner1, this.manager())); + 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 Utils.mapPage(inner, inner1 -> new WorkbookTemplateImpl(inner1, this.manager())); + 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); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkbookTemplateImpl(inner.getValue(), this.manager())); } else { return null; @@ -63,8 +59,8 @@ public WorkbookTemplate getByResourceGroup(String resourceGroupName, String reso } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); } @@ -73,85 +69,57 @@ public void deleteByResourceGroup(String resourceGroupName, String resourceName) } public WorkbookTemplate getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "workbooktemplates"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "workbooktemplates"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "workbooktemplates"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "workbooktemplates"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, context); } 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 a202c2d236c0a..36041c3114a29 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 @@ -39,22 +39,28 @@ import java.util.stream.Collectors; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkbooksClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkbooksClient. + */ public final class WorkbooksClientImpl implements WorkbooksClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkbooksService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ApplicationInsightsManagementClientImpl client; /** * Initializes an instance of WorkbooksClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WorkbooksClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(WorkbooksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(WorkbooksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -65,356 +71,257 @@ public final class WorkbooksClientImpl implements WorkbooksClient { @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") public interface WorkbooksService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/workbooks") - @ExpectedResponses({200}) + @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); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks") - @ExpectedResponses({200}) + 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); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + 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); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") - @ExpectedResponses({200}) + @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); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @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); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("api-version") String apiVersion, @QueryParam("canFetchContent") Boolean canFetchContent, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") - @ExpectedResponses({200, 204}) + @Headers({ "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, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @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, + @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}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) - Mono> update( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("sourceId") String sourceId, - @QueryParam("api-version") String apiVersion, + @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); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}/revisions") - @ExpectedResponses({200}) + @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, + Mono> revisionsList(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("api-version") String apiVersion, @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}) + @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, + Mono> revisionGet(@HostParam("$host") String endpoint, @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("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("revisionId") String revisionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) Mono> revisionsListNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * 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. + * 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - CategoryType category, List tags, Boolean canFetchContent) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (category == null) { return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + 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(",")); + 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)) + .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. + * 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - CategoryType category, List tags, Boolean canFetchContent, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (category == null) { return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + 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(",")); + 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)); + .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. + * 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}. + * @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), + 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}. + * @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), + 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. + * 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}. + * @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), + private PagedFlux listAsync(CategoryType category, List tags, Boolean canFetchContent, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(category, tags, canFetchContent, context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, 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}. + * @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) { @@ -425,53 +332,49 @@ public PagedIterable list(CategoryType category) { /** * 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. + * 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}. + * @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) { + public PagedIterable list(CategoryType category, List tags, Boolean canFetchContent, + Context context) { return new PagedIterable<>(listAsync(category, tags, canFetchContent, 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. * @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. + * 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, CategoryType category, List tags, String sourceId, Boolean canFetchContent) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -480,77 +383,45 @@ private Mono> listByResourceGroupSinglePageAsync( if (category == null) { return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + 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(",")); + 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)) + 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)) .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. + * 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} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -559,57 +430,36 @@ private Mono> listByResourceGroupSinglePageAsync( if (category == null) { return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + 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(",")); + 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)); + .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. + * 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}. + * @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) { + 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)); @@ -617,14 +467,14 @@ private PagedFlux listByResourceGroupAsync( /** * 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}. + * @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) { @@ -638,45 +488,37 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNa /** * 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. + * 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}. + * @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)); + 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}. + * @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) { @@ -689,59 +531,50 @@ public PagedIterable listByResourceGroup(String resourceGroupName /** * 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. + * 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 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) { + 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)); } /** * Get a single workbook by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. + * 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 along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName, Boolean canFetchContent) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -750,52 +583,39 @@ private Mono> getByResourceGroupWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + 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)) + 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())); } /** * Get a single workbook by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. + * false, only return summary content for workbooks. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName along with {@link Response} 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> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName, Boolean canFetchContent, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -804,26 +624,18 @@ private Mono> getByResourceGroupWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + final String apiVersion = "2023-06-01"; 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 service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, apiVersion, canFetchContent, accept, context); } /** * Get a single workbook by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -838,11 +650,11 @@ private Mono getByResourceGroupAsync(String resourceGroupName, St /** * Get a single workbook by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. + * 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. @@ -850,16 +662,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, St * @return a single workbook by its resourceName along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Boolean canFetchContent, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Boolean canFetchContent, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, canFetchContent, context).block(); } /** * Get a single workbook by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -874,9 +686,9 @@ public WorkbookInner getByResourceGroup(String resourceGroupName, String resourc /** * Delete a workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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. @@ -885,16 +697,12 @@ public WorkbookInner getByResourceGroup(String resourceGroupName, String resourc @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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -903,28 +711,19 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + 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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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. @@ -932,19 +731,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -953,25 +748,18 @@ private Mono> deleteWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + 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); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, apiVersion, accept, context); } /** * Delete a workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -984,9 +772,9 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { /** * Delete a workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -1000,9 +788,9 @@ public Response deleteWithResponse(String resourceGroupName, String resour /** * Delete a workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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. @@ -1014,9 +802,9 @@ public void delete(String resourceGroupName, String resourceName) { /** * Create a new workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -1025,19 +813,15 @@ public void delete(String resourceGroupName, String resourceName) { * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, WorkbookInner workbookProperties, String sourceId) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1052,30 +836,19 @@ private Mono> createOrUpdateWithResponseAsync( } else { workbookProperties.validate(); } - final String apiVersion = "2022-04-01"; + 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)) + .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())); } /** * Create a new workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -1085,23 +858,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String resourceName, - WorkbookInner workbookProperties, - String sourceId, - Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1116,27 +881,18 @@ private Mono> createOrUpdateWithResponseAsync( } else { workbookProperties.validate(); } - final String apiVersion = "2022-04-01"; + 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.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, sourceId, apiVersion, workbookProperties, accept, context); } /** * Create a new workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -1144,8 +900,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return a workbook definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, WorkbookInner workbookProperties) { + 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())); @@ -1153,9 +909,9 @@ private Mono createOrUpdateAsync( /** * Create a new workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -1165,21 +921,17 @@ private Mono createOrUpdateAsync( * @return a workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - WorkbookInner workbookProperties, - String sourceId, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + WorkbookInner workbookProperties, String sourceId, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context) .block(); } /** * Create a new workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -1187,8 +939,8 @@ public Response createOrUpdateWithResponse( * @return a workbook definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookInner createOrUpdate( - String resourceGroupName, String resourceName, WorkbookInner workbookProperties) { + public WorkbookInner createOrUpdate(String resourceGroupName, String resourceName, + WorkbookInner workbookProperties) { final String sourceId = null; return createOrUpdateWithResponse(resourceGroupName, resourceName, workbookProperties, sourceId, Context.NONE) .getValue(); @@ -1196,9 +948,9 @@ public WorkbookInner createOrUpdate( /** * Updates a workbook that has already been added. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -1207,22 +959,15 @@ public WorkbookInner createOrUpdate( * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String sourceId, - WorkbookUpdateParameters workbookUpdateParameters) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1234,30 +979,19 @@ private Mono> updateWithResponseAsync( if (workbookUpdateParameters != null) { workbookUpdateParameters.validate(); } - final String apiVersion = "2022-04-01"; + 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)) + .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())); } /** * Updates a workbook that has already been added. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -1267,23 +1001,15 @@ private Mono> updateWithResponseAsync( * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String sourceId, - WorkbookUpdateParameters workbookUpdateParameters, - Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1295,27 +1021,18 @@ private Mono> updateWithResponseAsync( if (workbookUpdateParameters != null) { workbookUpdateParameters.validate(); } - final String apiVersion = "2022-04-01"; + 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); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, sourceId, apiVersion, workbookUpdateParameters, accept, context); } /** * Updates a workbook that has already been added. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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. @@ -1331,9 +1048,9 @@ private Mono updateAsync(String resourceGroupName, String resourc /** * Updates a workbook that has already been added. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -1343,21 +1060,17 @@ private Mono updateAsync(String resourceGroupName, String resourc * @return a workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String sourceId, - WorkbookUpdateParameters workbookUpdateParameters, - Context context) { + public Response updateWithResponse(String resourceGroupName, String resourceName, String sourceId, + WorkbookUpdateParameters workbookUpdateParameters, Context context) { return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters, context) .block(); } /** * Updates a workbook that has already been added. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. @@ -1373,29 +1086,25 @@ public WorkbookInner update(String resourceGroupName, String resourceName) { /** * Get the revisions for the workbook defined by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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 the revisions for the workbook defined by its resourceName along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> revisionsListSinglePageAsync( - String resourceGroupName, String resourceName) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1404,58 +1113,38 @@ private Mono> revisionsListSinglePageAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + 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)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the revisions for the workbook defined by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> revisionsListSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1464,34 +1153,21 @@ private Mono> revisionsListSinglePageAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + 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)); + .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)); } /** * Get the revisions for the workbook defined by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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. @@ -1499,16 +1175,15 @@ private Mono> revisionsListSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux revisionsListAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>( - () -> revisionsListSinglePageAsync(resourceGroupName, resourceName), + return new PagedFlux<>(() -> revisionsListSinglePageAsync(resourceGroupName, resourceName), nextLink -> revisionsListNextSinglePageAsync(nextLink)); } /** * Get the revisions for the workbook defined by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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. @@ -1516,23 +1191,22 @@ private PagedFlux revisionsListAsync(String resourceGroupName, St * @return the revisions for the workbook defined by its resourceName as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux revisionsListAsync( - String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>( - () -> revisionsListSinglePageAsync(resourceGroupName, resourceName, context), + private PagedFlux revisionsListAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> revisionsListSinglePageAsync(resourceGroupName, resourceName, context), nextLink -> revisionsListNextSinglePageAsync(nextLink, context)); } /** * Get the revisions for the workbook defined by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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 the revisions for the workbook defined by its resourceName as paginated response with {@link - * PagedIterable}. + * @return the revisions for the workbook defined by its resourceName as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable revisionsList(String resourceGroupName, String resourceName) { @@ -1541,15 +1215,15 @@ public PagedIterable revisionsList(String resourceGroupName, Stri /** * Get the revisions for the workbook defined by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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 as paginated response with {@link - * PagedIterable}. + * @return the revisions for the workbook defined by its resourceName as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable revisionsList(String resourceGroupName, String resourceName, Context context) { @@ -1558,30 +1232,26 @@ public PagedIterable revisionsList(String resourceGroupName, Stri /** * 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 resource. + * @param resourceName The name of the workbook resource. The value must be an UUID. * @param revisionId The id of the workbook's revision. * @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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> revisionGetWithResponseAsync( - String resourceGroupName, String resourceName, String revisionId) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1593,51 +1263,37 @@ private Mono> revisionGetWithResponseAsync( if (revisionId == null) { return Mono.error(new IllegalArgumentException("Parameter revisionId is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + 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(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, revisionId, apiVersion, 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 resource. + * @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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> revisionGetWithResponseAsync( - String resourceGroupName, String resourceName, String revisionId, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1649,26 +1305,18 @@ private Mono> revisionGetWithResponseAsync( if (revisionId == null) { return Mono.error(new IllegalArgumentException("Parameter revisionId is required and cannot be null.")); } - final String apiVersion = "2022-04-01"; + 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); + return service.revisionGet(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, revisionId, apiVersion, accept, context); } /** * Get a single workbook revision defined by its revisionId. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param resourceName The name of the workbook resource. The value must be an UUID. * @param revisionId The id of the workbook's revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -1683,9 +1331,9 @@ private Mono revisionGetAsync(String resourceGroupName, String re /** * 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 resource. + * @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. @@ -1694,16 +1342,16 @@ private Mono revisionGetAsync(String resourceGroupName, String re * @return a single workbook revision defined by its revisionId along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response revisionGetWithResponse( - String resourceGroupName, String resourceName, String revisionId, Context context) { + public Response revisionGetWithResponse(String resourceGroupName, String resourceName, + String revisionId, Context context) { return revisionGetWithResponseAsync(resourceGroupName, resourceName, revisionId, context).block(); } /** * 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 resource. + * @param resourceName The name of the workbook resource. The value must be an UUID. * @param revisionId The id of the workbook's revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -1717,9 +1365,10 @@ public WorkbookInner revisionGet(String resourceGroupName, String resourceName, /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1731,32 +1380,24 @@ private Mono> listBySubscriptionNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -1769,31 +1410,22 @@ private Mono> listBySubscriptionNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1805,32 +1437,24 @@ private Mono> listByResourceGroupNextSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -1838,37 +1462,28 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @return workbook list result along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1880,31 +1495,23 @@ private Mono> revisionsListNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.revisionsListNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -1917,23 +1524,13 @@ private Mono> revisionsListNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .revisionsListNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.revisionsListNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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 7ebc90d7c47ab..00e9ab1b11ec4 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 @@ -23,8 +23,7 @@ public final class WorkbooksImpl implements Workbooks { private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public WorkbooksImpl( - WorkbooksClient innerClient, + public WorkbooksImpl(WorkbooksClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -32,45 +31,33 @@ public WorkbooksImpl( public PagedIterable list(CategoryType category) { PagedIterable inner = this.serviceClient().list(category); - return Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); } - public PagedIterable list( - CategoryType category, List tags, Boolean canFetchContent, Context context) { + public PagedIterable list(CategoryType category, List tags, Boolean canFetchContent, + Context context) { PagedIterable inner = this.serviceClient().list(category, tags, canFetchContent, context); - return Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); + 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 Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); + 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 Utils.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); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkbookImpl(inner.getValue(), this.manager())); } else { return null; @@ -86,8 +73,8 @@ public Workbook getByResourceGroup(String resourceGroupName, String resourceName } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); } @@ -97,24 +84,21 @@ public void deleteByResourceGroup(String resourceGroupName, String resourceName) public PagedIterable revisionsList(String resourceGroupName, String resourceName) { PagedIterable inner = this.serviceClient().revisionsList(resourceGroupName, resourceName); - return Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); } public PagedIterable revisionsList(String resourceGroupName, String resourceName, Context context) { - PagedIterable inner = - this.serviceClient().revisionsList(resourceGroupName, resourceName, context); - return Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().revisionsList(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); } - public Response revisionGetWithResponse( - String resourceGroupName, String resourceName, String revisionId, Context context) { - Response inner = - this.serviceClient().revisionGetWithResponse(resourceGroupName, resourceName, revisionId, context); + public Response revisionGetWithResponse(String resourceGroupName, String resourceName, String revisionId, + Context context) { + Response inner + = this.serviceClient().revisionGetWithResponse(resourceGroupName, resourceName, revisionId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkbookImpl(inner.getValue(), this.manager())); } else { return null; @@ -131,80 +115,59 @@ public Workbook revisionGet(String resourceGroupName, String resourceName, Strin } public Workbook getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooks"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "workbooks"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); } Boolean localCanFetchContent = null; - return this - .getByResourceGroupWithResponse(resourceGroupName, resourceName, localCanFetchContent, Context.NONE) + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, localCanFetchContent, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Boolean canFetchContent, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooks"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "workbooks"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, canFetchContent, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooks"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "workbooks"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooks"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "workbooks"); if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, context); } 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 12e77002d4163..7cee26d72ed7f 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 @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for ApplicationInsightsManagementClient. Composite Swagger for Application - * Insights Management Client. + * Package containing the implementations for ApplicationInsightsManagementClient. + * Composite Swagger for Application Insights Management Client. */ 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 df2f53c9320b5..aeba969b3653b 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 @@ -9,57 +9,54 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; import java.util.List; -/** Resource collection API of AnalyticsItems. */ +/** + * Resource collection API of AnalyticsItems. + */ public interface AnalyticsItems { /** * Gets a list of Analytics Items defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. + * 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. + * 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. + * only return the item information. * @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 Analytics Items defined within an Application Insights component along with {@link Response}. */ - Response> listWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent, + Response> listWithResponse(String resourceGroupName, + String resourceName, ItemScopePath scopePath, ItemScope scope, ItemTypeParameter type, Boolean includeContent, Context context); /** * Gets a list of Analytics Items defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Analytics Items defined within an Application Insights component. */ - List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath); + List list(String resourceGroupName, String resourceName, + ItemScopePath scopePath); /** * 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. + * 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. @@ -68,82 +65,70 @@ List list( * @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}. */ - Response getWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context); + Response getWithResponse(String resourceGroupName, String resourceName, + ItemScopePath scopePath, String id, String name, Context context); /** * 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. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific Analytics Items defined within an Application Insights component. */ - ApplicationInsightsComponentAnalyticsItem get( - String resourceGroupName, String resourceName, ItemScopePath scopePath); + ApplicationInsightsComponentAnalyticsItem get(String resourceGroupName, String resourceName, + ItemScopePath scopePath); /** * 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. + * 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. + * Insights component. * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. + * already exists. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define an Analytics item that is associated to an Application Insights component along - * with {@link Response}. + * with {@link Response}. */ - Response putWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem, + Response putWithResponse(String resourceGroupName, String resourceName, + ItemScopePath scopePath, ApplicationInsightsComponentAnalyticsItemInner itemProperties, Boolean overrideItem, Context context); /** * 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. + * 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. + * Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define an Analytics item that is associated to an Application Insights component. */ - ApplicationInsightsComponentAnalyticsItem put( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties); + ApplicationInsightsComponentAnalyticsItem put(String resourceGroupName, String resourceName, + ItemScopePath scopePath, ApplicationInsightsComponentAnalyticsItemInner itemProperties); /** * 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. + * 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. @@ -152,21 +137,16 @@ ApplicationInsightsComponentAnalyticsItem put( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, + String name, Context context); /** * Deletes a specific Analytics Items defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. + * users with access to the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. 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 8efb150adb4a4..8f206ac370e41 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 @@ -7,53 +7,55 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of Annotation. */ +/** + * An immutable client-side representation of Annotation. + */ public interface Annotation { /** * Gets the annotationName property: Name of annotation. - * + * * @return the annotationName value. */ String annotationName(); /** * Gets the category property: Category of annotation, free form. - * + * * @return the category value. */ String category(); /** * Gets the eventTime property: Time when event occurred. - * + * * @return the eventTime value. */ OffsetDateTime eventTime(); /** * Gets the id property: Unique Id for annotation. - * + * * @return the id value. */ String id(); /** * Gets the properties property: Serialized JSON object for detailed properties. - * + * * @return the properties value. */ String properties(); /** * Gets the relatedAnnotation property: Related parent annotation if any. - * + * * @return the relatedAnnotation value. */ String relatedAnnotation(); /** * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner object. - * + * * @return the inner object. */ AnnotationInner innerModel(); 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 fb7744a800cfc..2492c03f9061c 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 @@ -8,7 +8,9 @@ import com.azure.core.management.exception.ManagementError; import com.fasterxml.jackson.annotation.JsonProperty; -/** Error associated with trying to create annotation with Id that already exist. */ +/** + * Error associated with trying to create annotation with Id that already exist. + */ @Immutable public final class AnnotationError extends ManagementError { /* @@ -17,13 +19,15 @@ public final class AnnotationError extends ManagementError { @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) private InnerError innererror; - /** Creates an instance of AnnotationError class. */ + /** + * Creates an instance of AnnotationError class. + */ public AnnotationError() { } /** * Get the innererror property: Inner error. - * + * * @return the innererror value. */ public InnerError getInnererror() { @@ -32,7 +36,7 @@ public InnerError getInnererror() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java index f7d6955fb5d9c..52c6cd8a847b2 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 @@ -7,11 +7,13 @@ import com.azure.core.http.HttpResponse; import com.azure.core.management.exception.ManagementException; -/** Exception thrown for an invalid response with AnnotationError information. */ +/** + * Exception thrown for an invalid response with AnnotationError information. + */ public final class AnnotationErrorException extends ManagementException { /** * Initializes a new instance of the AnnotationErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ @@ -21,7 +23,7 @@ public AnnotationErrorException(String message, HttpResponse response) { /** * Initializes a new instance of the AnnotationErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. * @param value the deserialized response value. @@ -30,7 +32,9 @@ public AnnotationErrorException(String message, HttpResponse response, Annotatio super(message, response, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AnnotationError getValue() { return (AnnotationError) super.getValue(); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java index 3839d79da3c5a..bc77294b44026 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 @@ -10,27 +10,29 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; import java.util.List; -/** Resource collection API of Annotations. */ +/** + * Resource collection API of Annotations. + */ public interface Annotations { /** * Gets the list of annotations for a component for given time range. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * 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 - * PagedIterable}. + * @return the list of annotations for a component for given time range as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName, String start, String end); /** * Gets the list of annotations for a component for given time range. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -38,41 +40,41 @@ public interface Annotations { * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * 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 - * PagedIterable}. + * @return the list of annotations for a component for given time range as paginated response with + * {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String resourceName, String start, String end, Context context); + PagedIterable list(String resourceGroupName, String resourceName, String start, String end, + Context context); /** * 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. + * Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * 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}. */ - Response> createWithResponse( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context); + Response> createWithResponse(String resourceGroupName, String resourceName, + AnnotationInner annotationProperties, Context context); /** * 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. + * Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return array of Annotation. */ @@ -80,7 +82,7 @@ Response> createWithResponse( /** * 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. @@ -90,12 +92,12 @@ Response> createWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, String annotationId, + Context context); /** * 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. @@ -107,29 +109,29 @@ Response deleteWithResponse( /** * 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 com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * 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}. */ - Response> getWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); + Response> getWithResponse(String resourceGroupName, String resourceName, String annotationId, + Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. + * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the annotation for given id. */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java index 4eb564cf02514..95b35961759bb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Annotations list result. */ +/** + * Annotations list result. + */ @Immutable public final class AnnotationsListResult { /* @@ -18,13 +20,15 @@ public final class AnnotationsListResult { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; - /** Creates an instance of AnnotationsListResult class. */ + /** + * Creates an instance of AnnotationsListResult class. + */ public AnnotationsListResult() { } /** * Get the value property: An array of annotations. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java index a0fd901bc2964..8d5106ec14c5d 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** An Application Insights component API Key creation request definition. */ +/** + * An Application Insights component API Key creation request definition. + */ @Fluent public final class ApiKeyRequest { /* @@ -29,13 +31,15 @@ public final class ApiKeyRequest { @JsonProperty(value = "linkedWriteProperties") private List linkedWriteProperties; - /** Creates an instance of ApiKeyRequest class. */ + /** + * Creates an instance of ApiKeyRequest class. + */ public ApiKeyRequest() { } /** * Get the name property: The name of the API Key. - * + * * @return the name value. */ public String name() { @@ -44,7 +48,7 @@ public String name() { /** * Set the name property: The name of the API Key. - * + * * @param name the name value to set. * @return the ApiKeyRequest object itself. */ @@ -55,7 +59,7 @@ public ApiKeyRequest withName(String name) { /** * Get the linkedReadProperties property: The read access rights of this API Key. - * + * * @return the linkedReadProperties value. */ public List linkedReadProperties() { @@ -64,7 +68,7 @@ public List linkedReadProperties() { /** * Set the linkedReadProperties property: The read access rights of this API Key. - * + * * @param linkedReadProperties the linkedReadProperties value to set. * @return the ApiKeyRequest object itself. */ @@ -75,7 +79,7 @@ public ApiKeyRequest withLinkedReadProperties(List linkedReadProperties) /** * Get the linkedWriteProperties property: The write access rights of this API Key. - * + * * @return the linkedWriteProperties value. */ public List linkedWriteProperties() { @@ -84,7 +88,7 @@ public List linkedWriteProperties() { /** * Set the linkedWriteProperties property: The write access rights of this API Key. - * + * * @param linkedWriteProperties the linkedWriteProperties value to set. * @return the ApiKeyRequest object itself. */ @@ -95,7 +99,7 @@ public ApiKeyRequest withLinkedWriteProperties(List linkedWritePropertie /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java index 8fe814cc63692..bc185806de7b2 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ApiKeys. */ +/** + * Resource collection API of ApiKeys. + */ public interface ApiKeys { /** * Gets a list of API keys of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface ApiKeys { /** * Gets a list of API keys 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. @@ -33,43 +35,43 @@ public interface ApiKeys { * @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 PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String resourceName, Context context); + PagedIterable list(String resourceGroupName, String resourceName, + Context 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 - * component. + * component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define an API key of an Application Insights Component along with {@link Response}. */ - Response createWithResponse( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context); + Response createWithResponse(String resourceGroupName, String resourceName, + ApiKeyRequest apiKeyProperties, Context 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 - * component. + * component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define an API key of an Application Insights Component. */ - ApplicationInsightsComponentApiKey create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties); + ApplicationInsightsComponentApiKey create(String resourceGroupName, String resourceName, + ApiKeyRequest apiKeyProperties); /** * 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. @@ -79,12 +81,12 @@ ApplicationInsightsComponentApiKey create( * @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}. */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, + String keyId, Context context); /** * 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. @@ -97,7 +99,7 @@ Response deleteWithResponse( /** * 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. @@ -107,12 +109,12 @@ Response deleteWithResponse( * @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}. */ - Response getWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + Response getWithResponse(String resourceGroupName, String resourceName, + String keyId, Context context); /** * 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. 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 53fcc2f5bd5d9..e85bb6e18336d 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 @@ -12,39 +12,41 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of ApplicationInsightsComponent. */ +/** + * An immutable client-side representation of ApplicationInsightsComponent. + */ public interface ApplicationInsightsComponent { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); @@ -52,14 +54,14 @@ public interface ApplicationInsightsComponent { /** * Gets the kind property: The kind of application that this component refers to, used to customize UI. This value * is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. - * + * * @return the kind value. */ String kind(); /** * Gets the etag property: Resource etag. - * + * * @return the etag value. */ String etag(); @@ -67,28 +69,28 @@ public interface ApplicationInsightsComponent { /** * Gets the applicationId property: The unique ID of your application. This field mirrors the 'Name' field and * cannot be changed. - * + * * @return the applicationId value. */ String applicationId(); /** * Gets the appId property: Application Insights Unique ID for your Application. - * + * * @return the appId value. */ String appId(); /** * Gets the namePropertiesName property: Application name. - * + * * @return the namePropertiesName value. */ String namePropertiesName(); /** * Gets the applicationType property: Type of application being monitored. - * + * * @return the applicationType value. */ ApplicationType applicationType(); @@ -96,7 +98,7 @@ public interface ApplicationInsightsComponent { /** * Gets the flowType property: Used by the Application Insights system to determine what kind of flow this component * was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. - * + * * @return the flowType value. */ FlowType flowType(); @@ -104,7 +106,7 @@ public interface ApplicationInsightsComponent { /** * Gets the requestSource property: Describes what tool created this Application Insights component. Customers using * this API should set this to the default 'rest'. - * + * * @return the requestSource value. */ RequestSource requestSource(); @@ -113,21 +115,21 @@ public interface ApplicationInsightsComponent { * Gets the instrumentationKey property: Application Insights Instrumentation key. A read-only value that * applications can use to identify the destination for all telemetry sent to Azure Application Insights. This value * will be supplied upon construction of each new Application Insights component. - * + * * @return the instrumentationKey value. */ String instrumentationKey(); /** * Gets the creationDate property: Creation Date for the Application Insights component, in ISO 8601 format. - * + * * @return the creationDate value. */ OffsetDateTime creationDate(); /** * Gets the tenantId property: Azure Tenant Id. - * + * * @return the tenantId value. */ String tenantId(); @@ -135,7 +137,7 @@ public interface ApplicationInsightsComponent { /** * Gets the hockeyAppId property: The unique application ID created when a new application is added to HockeyApp, * used for communications with HockeyApp. - * + * * @return the hockeyAppId value. */ String hockeyAppId(); @@ -143,7 +145,7 @@ public interface ApplicationInsightsComponent { /** * Gets the hockeyAppToken property: Token used to authenticate communications with between Application Insights and * HockeyApp. - * + * * @return the hockeyAppToken value. */ String hockeyAppToken(); @@ -152,7 +154,7 @@ public interface ApplicationInsightsComponent { * Gets the provisioningState property: Current state of this component: whether or not is has been provisioned * within the resource group it is defined. Users cannot change this value but are able to read from it. Values will * include Succeeded, Deploying, Canceled, and Failed. - * + * * @return the provisioningState value. */ String provisioningState(); @@ -160,35 +162,35 @@ public interface ApplicationInsightsComponent { /** * Gets the samplingPercentage property: Percentage of the data produced by the application being monitored that is * being sampled for Application Insights telemetry. - * + * * @return the samplingPercentage value. */ Double samplingPercentage(); /** * Gets the connectionString property: Application Insights component connection string. - * + * * @return the connectionString value. */ String connectionString(); /** * Gets the retentionInDays property: Retention period in days. - * + * * @return the retentionInDays value. */ Integer retentionInDays(); /** * Gets the disableIpMasking property: Disable IP masking. - * + * * @return the disableIpMasking value. */ Boolean disableIpMasking(); /** * Gets the immediatePurgeDataOn30Days property: Purge data immediately after 30 days. - * + * * @return the immediatePurgeDataOn30Days value. */ Boolean immediatePurgeDataOn30Days(); @@ -197,21 +199,21 @@ public interface ApplicationInsightsComponent { * Gets the workspaceResourceId property: Resource Id of the log analytics workspace which the data will be ingested * to. This property is required to create an application with this API version. Applications from older versions * will not have this property. - * + * * @return the workspaceResourceId value. */ String workspaceResourceId(); /** * Gets the laMigrationDate property: The date which the component got migrated to LA, in ISO 8601 format. - * + * * @return the laMigrationDate value. */ OffsetDateTime laMigrationDate(); /** * Gets the privateLinkScopedResources property: List of linked private link scope resources. - * + * * @return the privateLinkScopedResources value. */ List privateLinkScopedResources(); @@ -219,28 +221,28 @@ public interface ApplicationInsightsComponent { /** * Gets the publicNetworkAccessForIngestion property: The network access type for accessing Application Insights * ingestion. - * + * * @return the publicNetworkAccessForIngestion value. */ PublicNetworkAccessType publicNetworkAccessForIngestion(); /** * Gets the publicNetworkAccessForQuery property: The network access type for accessing Application Insights query. - * + * * @return the publicNetworkAccessForQuery value. */ PublicNetworkAccessType publicNetworkAccessForQuery(); /** * Gets the ingestionMode property: Indicates the flow of the ingestion. - * + * * @return the ingestionMode value. */ IngestionMode ingestionMode(); /** * Gets the disableLocalAuth property: Disable Non-AAD based Auth. - * + * * @return the disableLocalAuth value. */ Boolean disableLocalAuth(); @@ -248,28 +250,28 @@ public interface ApplicationInsightsComponent { /** * Gets the forceCustomerStorageForProfiler property: Force users to create their own storage account for profiler * and debugger. - * + * * @return the forceCustomerStorageForProfiler value. */ Boolean forceCustomerStorageForProfiler(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); @@ -277,31 +279,35 @@ public interface ApplicationInsightsComponent { /** * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentInner * object. - * + * * @return the inner object. */ ApplicationInsightsComponentInner innerModel(); - /** The entirety of the ApplicationInsightsComponent definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithKind, - DefinitionStages.WithCreate { + /** + * The entirety of the ApplicationInsightsComponent definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithKind, DefinitionStages.WithCreate { } - /** The ApplicationInsightsComponent definition stages. */ + /** + * The ApplicationInsightsComponent definition stages. + */ interface DefinitionStages { - /** The first stage of the ApplicationInsightsComponent definition. */ + /** + * The first stage of the ApplicationInsightsComponent definition. + */ interface Blank extends WithLocation { } - /** The stage of the ApplicationInsightsComponent definition allowing to specify location. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -309,34 +315,37 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify parent resource. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithKind withExistingResourceGroup(String resourceGroupName); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify kind. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify kind. + */ interface WithKind { /** * Specifies the kind property: The kind of application that this component refers to, used to customize UI. * This value is a freeform string, values should typically be one of the following: web, ios, other, store, * java, phone.. - * + * * @param kind The kind of application that this component refers to, used to customize UI. This value is a - * freeform string, values should typically be one of the following: web, ios, other, store, java, - * phone. + * freeform string, values should typically be one of the following: web, ios, other, store, java, phone. * @return the next definition stage. */ WithCreate withKind(String kind); @@ -347,167 +356,180 @@ interface WithKind { * for the resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithEtag, - DefinitionStages.WithApplicationType, - DefinitionStages.WithFlowType, - DefinitionStages.WithRequestSource, - DefinitionStages.WithHockeyAppId, - DefinitionStages.WithSamplingPercentage, - DefinitionStages.WithRetentionInDays, - DefinitionStages.WithDisableIpMasking, - DefinitionStages.WithImmediatePurgeDataOn30Days, - DefinitionStages.WithWorkspaceResourceId, - DefinitionStages.WithPublicNetworkAccessForIngestion, - DefinitionStages.WithPublicNetworkAccessForQuery, - DefinitionStages.WithIngestionMode, - DefinitionStages.WithDisableLocalAuth, - DefinitionStages.WithForceCustomerStorageForProfiler { + extends DefinitionStages.WithTags, DefinitionStages.WithEtag, DefinitionStages.WithApplicationType, + DefinitionStages.WithFlowType, DefinitionStages.WithRequestSource, DefinitionStages.WithHockeyAppId, + DefinitionStages.WithSamplingPercentage, DefinitionStages.WithRetentionInDays, + DefinitionStages.WithDisableIpMasking, DefinitionStages.WithImmediatePurgeDataOn30Days, + DefinitionStages.WithWorkspaceResourceId, DefinitionStages.WithPublicNetworkAccessForIngestion, + DefinitionStages.WithPublicNetworkAccessForQuery, DefinitionStages.WithIngestionMode, + DefinitionStages.WithDisableLocalAuth, DefinitionStages.WithForceCustomerStorageForProfiler { /** * Executes the create request. - * + * * @return the created resource. */ ApplicationInsightsComponent create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ApplicationInsightsComponent create(Context context); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify tags. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify etag. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify etag. + */ interface WithEtag { /** * Specifies the etag property: Resource etag. - * + * * @param etag Resource etag. * @return the next definition stage. */ WithCreate withEtag(String etag); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify applicationType. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify applicationType. + */ interface WithApplicationType { /** * Specifies the applicationType property: Type of application being monitored.. - * + * * @param applicationType Type of application being monitored. * @return the next definition stage. */ WithCreate withApplicationType(ApplicationType applicationType); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify flowType. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify flowType. + */ interface WithFlowType { /** * Specifies the flowType property: Used by the Application Insights system to determine what kind of flow * this component was created by. This is to be set to 'Bluefield' when creating/updating a component via * the REST API.. - * + * * @param flowType Used by the Application Insights system to determine what kind of flow this component was - * created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. + * created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. * @return the next definition stage. */ WithCreate withFlowType(FlowType flowType); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify requestSource. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify requestSource. + */ interface WithRequestSource { /** * Specifies the requestSource property: Describes what tool created this Application Insights component. * Customers using this API should set this to the default 'rest'.. - * + * * @param requestSource Describes what tool created this Application Insights component. Customers using - * this API should set this to the default 'rest'. + * this API should set this to the default 'rest'. * @return the next definition stage. */ WithCreate withRequestSource(RequestSource requestSource); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify hockeyAppId. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify hockeyAppId. + */ interface WithHockeyAppId { /** * Specifies the hockeyAppId property: The unique application ID created when a new application is added to * HockeyApp, used for communications with HockeyApp.. - * + * * @param hockeyAppId The unique application ID created when a new application is added to HockeyApp, used - * for communications with HockeyApp. + * for communications with HockeyApp. * @return the next definition stage. */ WithCreate withHockeyAppId(String hockeyAppId); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify samplingPercentage. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify samplingPercentage. + */ interface WithSamplingPercentage { /** * Specifies the samplingPercentage property: Percentage of the data produced by the application being * monitored that is being sampled for Application Insights telemetry.. - * + * * @param samplingPercentage Percentage of the data produced by the application being monitored that is - * being sampled for Application Insights telemetry. + * being sampled for Application Insights telemetry. * @return the next definition stage. */ WithCreate withSamplingPercentage(Double samplingPercentage); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify retentionInDays. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify retentionInDays. + */ interface WithRetentionInDays { /** * Specifies the retentionInDays property: Retention period in days.. - * + * * @param retentionInDays Retention period in days. * @return the next definition stage. */ WithCreate withRetentionInDays(Integer retentionInDays); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify disableIpMasking. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify disableIpMasking. + */ interface WithDisableIpMasking { /** * Specifies the disableIpMasking property: Disable IP masking.. - * + * * @param disableIpMasking Disable IP masking. * @return the next definition stage. */ WithCreate withDisableIpMasking(Boolean disableIpMasking); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify immediatePurgeDataOn30Days. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify immediatePurgeDataOn30Days. + */ interface WithImmediatePurgeDataOn30Days { /** * Specifies the immediatePurgeDataOn30Days property: Purge data immediately after 30 days.. - * + * * @param immediatePurgeDataOn30Days Purge data immediately after 30 days. * @return the next definition stage. */ WithCreate withImmediatePurgeDataOn30Days(Boolean immediatePurgeDataOn30Days); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify workspaceResourceId. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify workspaceResourceId. + */ interface WithWorkspaceResourceId { /** * Specifies the workspaceResourceId property: Resource Id of the log analytics workspace which the data * will be ingested to. This property is required to create an application with this API version. * Applications from older versions will not have this property.. - * + * * @param workspaceResourceId Resource Id of the log analytics workspace which the data will be ingested to. - * This property is required to create an application with this API version. Applications from older - * versions will not have this property. + * This property is required to create an application with this API version. Applications from older + * versions will not have this property. * @return the next definition stage. */ WithCreate withWorkspaceResourceId(String workspaceResourceId); @@ -520,42 +542,48 @@ interface WithPublicNetworkAccessForIngestion { /** * Specifies the publicNetworkAccessForIngestion property: The network access type for accessing Application * Insights ingestion.. - * + * * @param publicNetworkAccessForIngestion The network access type for accessing Application Insights - * ingestion. + * ingestion. * @return the next definition stage. */ WithCreate withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify publicNetworkAccessForQuery. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify publicNetworkAccessForQuery. + */ interface WithPublicNetworkAccessForQuery { /** * Specifies the publicNetworkAccessForQuery property: The network access type for accessing Application * Insights query.. - * + * * @param publicNetworkAccessForQuery The network access type for accessing Application Insights query. * @return the next definition stage. */ WithCreate withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify ingestionMode. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify ingestionMode. + */ interface WithIngestionMode { /** * Specifies the ingestionMode property: Indicates the flow of the ingestion.. - * + * * @param ingestionMode Indicates the flow of the ingestion. * @return the next definition stage. */ WithCreate withIngestionMode(IngestionMode ingestionMode); } - /** The stage of the ApplicationInsightsComponent definition allowing to specify disableLocalAuth. */ + /** + * The stage of the ApplicationInsightsComponent definition allowing to specify disableLocalAuth. + */ interface WithDisableLocalAuth { /** * Specifies the disableLocalAuth property: Disable Non-AAD based Auth.. - * + * * @param disableLocalAuth Disable Non-AAD based Auth. * @return the next definition stage. */ @@ -569,9 +597,9 @@ interface WithForceCustomerStorageForProfiler { /** * Specifies the forceCustomerStorageForProfiler property: Force users to create their own storage account * for profiler and debugger.. - * + * * @param forceCustomerStorageForProfiler Force users to create their own storage account for profiler and - * debugger. + * debugger. * @return the next definition stage. */ WithCreate withForceCustomerStorageForProfiler(Boolean forceCustomerStorageForProfiler); @@ -580,36 +608,42 @@ interface WithForceCustomerStorageForProfiler { /** * Begins update for the ApplicationInsightsComponent resource. - * + * * @return the stage of resource update. */ ApplicationInsightsComponent.Update update(); - /** The template for ApplicationInsightsComponent update. */ + /** + * The template for ApplicationInsightsComponent update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ ApplicationInsightsComponent apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ApplicationInsightsComponent apply(Context context); } - /** The ApplicationInsightsComponent update stages. */ + /** + * The ApplicationInsightsComponent update stages. + */ interface UpdateStages { - /** The stage of the ApplicationInsightsComponent update allowing to specify tags. */ + /** + * The stage of the ApplicationInsightsComponent update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -619,14 +653,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ApplicationInsightsComponent refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -634,15 +668,16 @@ interface WithTags { /** * 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 + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the + * execution of purge requests by sending a single command whose predicate includes all user identities that require + * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge + * request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please + * run purge operation (directly on the * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific * resource id. - * + * * @param 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. @@ -654,15 +689,16 @@ interface WithTags { /** * 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 + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the + * execution of purge requests by sending a single command whose predicate includes all user identities that require + * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge + * request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please + * run purge operation (directly on the * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific * resource id. - * + * * @param body Describes the body of a request to purge data in a single table of an Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. 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 42caa9bbdc18a..d1c9e475cb54a 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 @@ -6,32 +6,34 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; -/** An immutable client-side representation of ApplicationInsightsComponentAnalyticsItem. */ +/** + * An immutable client-side representation of ApplicationInsightsComponentAnalyticsItem. + */ public interface ApplicationInsightsComponentAnalyticsItem { /** * Gets the id property: Internally assigned unique id of the item definition. - * + * * @return the id value. */ String id(); /** * Gets the name property: The user-defined name of the item. - * + * * @return the name value. */ String name(); /** * Gets the content property: The content of this item. - * + * * @return the content value. */ String content(); /** * Gets the version property: This instance's version of the data model. This can change as new features are added. - * + * * @return the version value. */ String version(); @@ -39,28 +41,28 @@ public interface ApplicationInsightsComponentAnalyticsItem { /** * Gets the scope property: 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. - * + * * @return the scope value. */ ItemScope scope(); /** * Gets the type property: Enum indicating the type of the Analytics item. - * + * * @return the type value. */ ItemType type(); /** * Gets the timeCreated property: Date and time in UTC when this item was created. - * + * * @return the timeCreated value. */ String timeCreated(); /** * Gets the timeModified property: Date and time in UTC of the last modification that was made to this item. - * + * * @return the timeModified value. */ String timeModified(); @@ -68,7 +70,7 @@ public interface ApplicationInsightsComponentAnalyticsItem { /** * Gets the properties property: A set of properties that can be defined in the context of a specific item type. * Each type may have its own properties. - * + * * @return the properties value. */ ApplicationInsightsComponentAnalyticsItemProperties properties(); @@ -77,7 +79,7 @@ public interface ApplicationInsightsComponentAnalyticsItem { * Gets the inner * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner * object. - * + * * @return the inner object. */ ApplicationInsightsComponentAnalyticsItemInner innerModel(); 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 981a09340d66f..b77f1e2422de5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java @@ -19,13 +19,15 @@ public final class ApplicationInsightsComponentAnalyticsItemProperties { @JsonProperty(value = "functionAlias") private String functionAlias; - /** Creates an instance of ApplicationInsightsComponentAnalyticsItemProperties class. */ + /** + * Creates an instance of ApplicationInsightsComponentAnalyticsItemProperties class. + */ public ApplicationInsightsComponentAnalyticsItemProperties() { } /** * Get the functionAlias property: A function alias, used when the type of the item is Function. - * + * * @return the functionAlias value. */ public String functionAlias() { @@ -34,7 +36,7 @@ public String functionAlias() { /** * Set the functionAlias property: A function alias, used when the type of the item is Function. - * + * * @param functionAlias the functionAlias value to set. * @return the ApplicationInsightsComponentAnalyticsItemProperties object itself. */ @@ -45,7 +47,7 @@ public ApplicationInsightsComponentAnalyticsItemProperties withFunctionAlias(Str /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKey.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKey.java index a521e8d99ab4a..68c7c160d5c61 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 @@ -7,47 +7,49 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner; import java.util.List; -/** An immutable client-side representation of ApplicationInsightsComponentApiKey. */ +/** + * An immutable client-side representation of ApplicationInsightsComponentApiKey. + */ public interface ApplicationInsightsComponentApiKey { /** * Gets the id property: The unique ID of the API key inside an Application Insights component. It is auto generated * when the API key is created. - * + * * @return the id value. */ String id(); /** * Gets the apiKey property: The API key value. It will be only return once when the API Key was created. - * + * * @return the apiKey value. */ String apiKey(); /** * Gets the createdDate property: The create date of this API key. - * + * * @return the createdDate value. */ String createdDate(); /** * Gets the name property: The name of the API key. - * + * * @return the name value. */ String name(); /** * Gets the linkedReadProperties property: The read access rights of this API Key. - * + * * @return the linkedReadProperties value. */ List linkedReadProperties(); /** * Gets the linkedWriteProperties property: The write access rights of this API Key. - * + * * @return the linkedWriteProperties value. */ List linkedWriteProperties(); @@ -55,7 +57,7 @@ public interface ApplicationInsightsComponentApiKey { /** * Gets the inner * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner object. - * + * * @return the inner object. */ ApplicationInsightsComponentApiKeyInner innerModel(); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java index 61791eed17e0f..c959717303513 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes the list of API Keys of an Application Insights Component. */ +/** + * Describes the list of API Keys of an Application Insights Component. + */ @Fluent public final class ApplicationInsightsComponentApiKeyListResult { /* @@ -19,13 +21,15 @@ public final class ApplicationInsightsComponentApiKeyListResult { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of ApplicationInsightsComponentApiKeyListResult class. */ + /** + * Creates an instance of ApplicationInsightsComponentApiKeyListResult class. + */ public ApplicationInsightsComponentApiKeyListResult() { } /** * Get the value property: List of API Key definitions. - * + * * @return the value value. */ public List value() { @@ -34,7 +38,7 @@ public List value() { /** * Set the value property: List of API Key definitions. - * + * * @param value the value value to set. * @return the ApplicationInsightsComponentApiKeyListResult object itself. */ @@ -45,15 +49,13 @@ public ApplicationInsightsComponentApiKeyListResult withValue(List e.validate()); } 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 5e662cd5123e9..998696163fab7 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 @@ -7,11 +7,13 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner; import java.util.List; -/** An immutable client-side representation of ApplicationInsightsComponentAvailableFeatures. */ +/** + * An immutable client-side representation of ApplicationInsightsComponentAvailableFeatures. + */ public interface ApplicationInsightsComponentAvailableFeatures { /** * Gets the result property: A list of Application Insights component feature. - * + * * @return the result value. */ List result(); @@ -20,7 +22,7 @@ public interface ApplicationInsightsComponentAvailableFeatures { * Gets the inner * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner * object. - * + * * @return the inner object. */ ApplicationInsightsComponentAvailableFeaturesInner innerModel(); 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 e544e5facd0ce..f1c7bdf02a1c7 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 @@ -7,11 +7,13 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; import java.util.List; -/** An immutable client-side representation of ApplicationInsightsComponentBillingFeatures. */ +/** + * An immutable client-side representation of ApplicationInsightsComponentBillingFeatures. + */ public interface ApplicationInsightsComponentBillingFeatures { /** * Gets the dataVolumeCap property: An Application Insights component daily data volume cap. - * + * * @return the dataVolumeCap value. */ ApplicationInsightsComponentDataVolumeCap dataVolumeCap(); @@ -19,7 +21,7 @@ public interface ApplicationInsightsComponentBillingFeatures { /** * Gets the currentBillingFeatures property: Current enabled pricing plan. When the component is in the Enterprise * plan, this will list both 'Basic' and 'Application Insights Enterprise'. - * + * * @return the currentBillingFeatures value. */ List currentBillingFeatures(); @@ -28,7 +30,7 @@ public interface ApplicationInsightsComponentBillingFeatures { * Gets the inner * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner * object. - * + * * @return the inner object. */ ApplicationInsightsComponentBillingFeaturesInner innerModel(); 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 e14a6fd6175ba..5efe525dc59d4 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** An Application Insights component daily data volume cap. */ +/** + * An Application Insights component daily data volume cap. + */ @Fluent public final class ApplicationInsightsComponentDataVolumeCap { /* @@ -46,13 +48,15 @@ public final class ApplicationInsightsComponentDataVolumeCap { @JsonProperty(value = "MaxHistoryCap", access = JsonProperty.Access.WRITE_ONLY) private Float maxHistoryCap; - /** Creates an instance of ApplicationInsightsComponentDataVolumeCap class. */ + /** + * Creates an instance of ApplicationInsightsComponentDataVolumeCap class. + */ public ApplicationInsightsComponentDataVolumeCap() { } /** * Get the cap property: Daily data volume cap in GB. - * + * * @return the cap value. */ public Float cap() { @@ -61,7 +65,7 @@ public Float cap() { /** * Set the cap property: Daily data volume cap in GB. - * + * * @param cap the cap value to set. * @return the ApplicationInsightsComponentDataVolumeCap object itself. */ @@ -72,7 +76,7 @@ public ApplicationInsightsComponentDataVolumeCap withCap(Float cap) { /** * Get the resetTime property: Daily data volume cap UTC reset hour. - * + * * @return the resetTime value. */ public Integer resetTime() { @@ -81,7 +85,7 @@ public Integer resetTime() { /** * Get the warningThreshold property: Reserved, not used for now. - * + * * @return the warningThreshold value. */ public Integer warningThreshold() { @@ -90,7 +94,7 @@ public Integer warningThreshold() { /** * Set the warningThreshold property: Reserved, not used for now. - * + * * @param warningThreshold the warningThreshold value to set. * @return the ApplicationInsightsComponentDataVolumeCap object itself. */ @@ -101,7 +105,7 @@ public ApplicationInsightsComponentDataVolumeCap withWarningThreshold(Integer wa /** * Get the stopSendNotificationWhenHitThreshold property: Reserved, not used for now. - * + * * @return the stopSendNotificationWhenHitThreshold value. */ public Boolean stopSendNotificationWhenHitThreshold() { @@ -110,12 +114,12 @@ public Boolean stopSendNotificationWhenHitThreshold() { /** * Set the stopSendNotificationWhenHitThreshold property: Reserved, not used for now. - * + * * @param stopSendNotificationWhenHitThreshold the stopSendNotificationWhenHitThreshold value to set. * @return the ApplicationInsightsComponentDataVolumeCap object itself. */ - public ApplicationInsightsComponentDataVolumeCap withStopSendNotificationWhenHitThreshold( - Boolean stopSendNotificationWhenHitThreshold) { + public ApplicationInsightsComponentDataVolumeCap + withStopSendNotificationWhenHitThreshold(Boolean stopSendNotificationWhenHitThreshold) { this.stopSendNotificationWhenHitThreshold = stopSendNotificationWhenHitThreshold; return this; } @@ -123,7 +127,7 @@ public ApplicationInsightsComponentDataVolumeCap withStopSendNotificationWhenHit /** * Get the stopSendNotificationWhenHitCap property: Do not send a notification email when the daily data volume cap * is met. - * + * * @return the stopSendNotificationWhenHitCap value. */ public Boolean stopSendNotificationWhenHitCap() { @@ -133,19 +137,19 @@ public Boolean stopSendNotificationWhenHitCap() { /** * Set the stopSendNotificationWhenHitCap property: Do not send a notification email when the daily data volume cap * is met. - * + * * @param stopSendNotificationWhenHitCap the stopSendNotificationWhenHitCap value to set. * @return the ApplicationInsightsComponentDataVolumeCap object itself. */ - public ApplicationInsightsComponentDataVolumeCap withStopSendNotificationWhenHitCap( - Boolean stopSendNotificationWhenHitCap) { + public ApplicationInsightsComponentDataVolumeCap + withStopSendNotificationWhenHitCap(Boolean stopSendNotificationWhenHitCap) { this.stopSendNotificationWhenHitCap = stopSendNotificationWhenHitCap; return this; } /** * Get the maxHistoryCap property: Maximum daily data volume cap that the user can set for this component. - * + * * @return the maxHistoryCap value. */ public Float maxHistoryCap() { @@ -154,7 +158,7 @@ public Float maxHistoryCap() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportConfiguration.java index 00887d1016ceb..938d4f1fe7040 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 @@ -6,19 +6,21 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentExportConfigurationInner; -/** An immutable client-side representation of ApplicationInsightsComponentExportConfiguration. */ +/** + * An immutable client-side representation of ApplicationInsightsComponentExportConfiguration. + */ public interface ApplicationInsightsComponentExportConfiguration { /** * Gets the exportId property: The unique ID of the export configuration inside an Application Insights component. * It is auto generated when the Continuous Export configuration is created. - * + * * @return the exportId value. */ String exportId(); /** * Gets the instrumentationKey property: The instrumentation key of the Application Insights component. - * + * * @return the instrumentationKey value. */ String instrumentationKey(); @@ -27,56 +29,56 @@ public interface ApplicationInsightsComponentExportConfiguration { * Gets 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'. - * + * * @return the recordTypes value. */ String recordTypes(); /** * Gets the applicationName property: The name of the Application Insights component. - * + * * @return the applicationName value. */ String applicationName(); /** * Gets the subscriptionId property: The subscription of the Application Insights component. - * + * * @return the subscriptionId value. */ String subscriptionId(); /** * Gets the resourceGroup property: The resource group of the Application Insights component. - * + * * @return the resourceGroup value. */ String resourceGroup(); /** * Gets the destinationStorageSubscriptionId property: The destination storage account subscription ID. - * + * * @return the destinationStorageSubscriptionId value. */ String destinationStorageSubscriptionId(); /** * Gets the destinationStorageLocationId property: The destination account location ID. - * + * * @return the destinationStorageLocationId value. */ String destinationStorageLocationId(); /** * Gets the destinationAccountId property: The name of destination account. - * + * * @return the destinationAccountId value. */ String destinationAccountId(); /** * Gets the destinationType property: The destination type. - * + * * @return the destinationType value. */ String destinationType(); @@ -84,21 +86,21 @@ public interface ApplicationInsightsComponentExportConfiguration { /** * Gets the isUserEnabled property: This will be 'true' if the Continuous Export configuration is enabled, otherwise * it will be 'false'. - * + * * @return the isUserEnabled value. */ String isUserEnabled(); /** * Gets the lastUserUpdate property: Last time the Continuous Export configuration was updated. - * + * * @return the lastUserUpdate value. */ String lastUserUpdate(); /** * Gets the notificationQueueEnabled property: Deprecated. - * + * * @return the notificationQueueEnabled value. */ String notificationQueueEnabled(); @@ -106,7 +108,7 @@ public interface ApplicationInsightsComponentExportConfiguration { /** * Gets the exportStatus property: This indicates current Continuous Export configuration status. The possible * values are 'Preparing', 'Success', 'Failure'. - * + * * @return the exportStatus value. */ String exportStatus(); @@ -114,14 +116,14 @@ public interface ApplicationInsightsComponentExportConfiguration { /** * Gets the lastSuccessTime property: The last time data was successfully delivered to the destination storage * container for this Continuous Export configuration. - * + * * @return the lastSuccessTime value. */ String lastSuccessTime(); /** * Gets the lastGapTime property: The last time the Continuous Export configuration started failing. - * + * * @return the lastGapTime value. */ String lastGapTime(); @@ -129,21 +131,21 @@ public interface ApplicationInsightsComponentExportConfiguration { /** * Gets the permanentErrorReason property: This is the reason the Continuous Export configuration started failing. * It can be 'AzureStorageNotFound' or 'AzureStorageAccessDenied'. - * + * * @return the permanentErrorReason value. */ String permanentErrorReason(); /** * Gets the storageName property: The name of the destination storage account. - * + * * @return the storageName value. */ String storageName(); /** * Gets the containerName property: The name of the destination storage container. - * + * * @return the containerName value. */ String containerName(); @@ -152,7 +154,7 @@ public interface ApplicationInsightsComponentExportConfiguration { * Gets the inner * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentExportConfigurationInner * object. - * + * * @return the inner object. */ ApplicationInsightsComponentExportConfigurationInner innerModel(); 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 22f454328cbe8..916f782e30243 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** An Application Insights component Continuous Export configuration request definition. */ +/** + * An Application Insights component Continuous Export configuration request definition. + */ @Fluent public final class ApplicationInsightsComponentExportRequest { /* @@ -66,7 +68,9 @@ public final class ApplicationInsightsComponentExportRequest { @JsonProperty(value = "DestinationAccountId") private String destinationAccountId; - /** Creates an instance of ApplicationInsightsComponentExportRequest class. */ + /** + * Creates an instance of ApplicationInsightsComponentExportRequest class. + */ public ApplicationInsightsComponentExportRequest() { } @@ -74,7 +78,7 @@ public ApplicationInsightsComponentExportRequest() { * Get the recordTypes property: The document types to be exported, as comma separated values. Allowed values * include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', * 'PerformanceCounters', 'Availability', 'Messages'. - * + * * @return the recordTypes value. */ public String recordTypes() { @@ -85,7 +89,7 @@ public String recordTypes() { * Set the recordTypes property: The document types to be exported, as comma separated values. Allowed values * include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', * 'PerformanceCounters', 'Availability', 'Messages'. - * + * * @param recordTypes the recordTypes value to set. * @return the ApplicationInsightsComponentExportRequest object itself. */ @@ -96,7 +100,7 @@ public ApplicationInsightsComponentExportRequest withRecordTypes(String recordTy /** * Get the destinationType property: The Continuous Export destination type. This has to be 'Blob'. - * + * * @return the destinationType value. */ public String destinationType() { @@ -105,7 +109,7 @@ public String destinationType() { /** * Set the destinationType property: The Continuous Export destination type. This has to be 'Blob'. - * + * * @param destinationType the destinationType value to set. * @return the ApplicationInsightsComponentExportRequest object itself. */ @@ -117,7 +121,7 @@ public ApplicationInsightsComponentExportRequest withDestinationType(String dest /** * Get the destinationAddress property: The SAS URL for the destination storage container. It must grant write * permission. - * + * * @return the destinationAddress value. */ public String destinationAddress() { @@ -127,7 +131,7 @@ public String destinationAddress() { /** * Set the destinationAddress property: The SAS URL for the destination storage container. It must grant write * permission. - * + * * @param destinationAddress the destinationAddress value to set. * @return the ApplicationInsightsComponentExportRequest object itself. */ @@ -139,7 +143,7 @@ public ApplicationInsightsComponentExportRequest withDestinationAddress(String d /** * Get the isEnabled property: Set to 'true' to create a Continuous Export configuration as enabled, otherwise set * it to 'false'. - * + * * @return the isEnabled value. */ public String isEnabled() { @@ -149,7 +153,7 @@ public String isEnabled() { /** * Set the isEnabled property: Set to 'true' to create a Continuous Export configuration as enabled, otherwise set * it to 'false'. - * + * * @param isEnabled the isEnabled value to set. * @return the ApplicationInsightsComponentExportRequest object itself. */ @@ -160,7 +164,7 @@ public ApplicationInsightsComponentExportRequest withIsEnabled(String isEnabled) /** * Get the notificationQueueEnabled property: Deprecated. - * + * * @return the notificationQueueEnabled value. */ public String notificationQueueEnabled() { @@ -169,7 +173,7 @@ public String notificationQueueEnabled() { /** * Set the notificationQueueEnabled property: Deprecated. - * + * * @param notificationQueueEnabled the notificationQueueEnabled value to set. * @return the ApplicationInsightsComponentExportRequest object itself. */ @@ -180,7 +184,7 @@ public ApplicationInsightsComponentExportRequest withNotificationQueueEnabled(St /** * Get the notificationQueueUri property: Deprecated. - * + * * @return the notificationQueueUri value. */ public String notificationQueueUri() { @@ -189,7 +193,7 @@ public String notificationQueueUri() { /** * Set the notificationQueueUri property: Deprecated. - * + * * @param notificationQueueUri the notificationQueueUri value to set. * @return the ApplicationInsightsComponentExportRequest object itself. */ @@ -200,7 +204,7 @@ public ApplicationInsightsComponentExportRequest withNotificationQueueUri(String /** * Get the destinationStorageSubscriptionId property: The subscription ID of the destination storage container. - * + * * @return the destinationStorageSubscriptionId value. */ public String destinationStorageSubscriptionId() { @@ -209,19 +213,19 @@ public String destinationStorageSubscriptionId() { /** * Set the destinationStorageSubscriptionId property: The subscription ID of the destination storage container. - * + * * @param destinationStorageSubscriptionId the destinationStorageSubscriptionId value to set. * @return the ApplicationInsightsComponentExportRequest object itself. */ - public ApplicationInsightsComponentExportRequest withDestinationStorageSubscriptionId( - String destinationStorageSubscriptionId) { + public ApplicationInsightsComponentExportRequest + withDestinationStorageSubscriptionId(String destinationStorageSubscriptionId) { this.destinationStorageSubscriptionId = destinationStorageSubscriptionId; return this; } /** * Get the destinationStorageLocationId property: The location ID of the destination storage container. - * + * * @return the destinationStorageLocationId value. */ public String destinationStorageLocationId() { @@ -230,19 +234,19 @@ public String destinationStorageLocationId() { /** * Set the destinationStorageLocationId property: The location ID of the destination storage container. - * + * * @param destinationStorageLocationId the destinationStorageLocationId value to set. * @return the ApplicationInsightsComponentExportRequest object itself. */ - public ApplicationInsightsComponentExportRequest withDestinationStorageLocationId( - String destinationStorageLocationId) { + public ApplicationInsightsComponentExportRequest + withDestinationStorageLocationId(String destinationStorageLocationId) { this.destinationStorageLocationId = destinationStorageLocationId; return this; } /** * Get the destinationAccountId property: The name of destination storage account. - * + * * @return the destinationAccountId value. */ public String destinationAccountId() { @@ -251,7 +255,7 @@ public String destinationAccountId() { /** * Set the destinationAccountId property: The name of destination storage account. - * + * * @param destinationAccountId the destinationAccountId value to set. * @return the ApplicationInsightsComponentExportRequest object itself. */ @@ -262,7 +266,7 @@ public ApplicationInsightsComponentExportRequest withDestinationAccountId(String /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFavorite.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFavorite.java index a7762c3454d18..3d2a651e20827 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 @@ -7,11 +7,13 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; import java.util.List; -/** An immutable client-side representation of ApplicationInsightsComponentFavorite. */ +/** + * An immutable client-side representation of ApplicationInsightsComponentFavorite. + */ public interface ApplicationInsightsComponentFavorite { /** * Gets the name property: The user-defined name of the favorite. - * + * * @return the name value. */ String name(); @@ -19,7 +21,7 @@ public interface ApplicationInsightsComponentFavorite { /** * Gets the config property: Configuration of this particular favorite, which are driven by the Azure portal UX. * Configuration data is a string containing valid JSON. - * + * * @return the config value. */ String config(); @@ -27,14 +29,14 @@ public interface ApplicationInsightsComponentFavorite { /** * Gets the version property: This instance's version of the data model. This can change as new features are added * that can be marked favorite. Current examples include MetricsExplorer (ME) and Search. - * + * * @return the version value. */ String version(); /** * Gets the favoriteId property: Internally assigned unique id of the favorite definition. - * + * * @return the favoriteId value. */ String favoriteId(); @@ -42,14 +44,14 @@ public interface ApplicationInsightsComponentFavorite { /** * Gets the favoriteType property: Enum indicating if this favorite definition is owned by a specific user or is * shared between all users with access to the Application Insights component. - * + * * @return the favoriteType value. */ FavoriteType favoriteType(); /** * Gets the sourceType property: The source of the favorite definition. - * + * * @return the sourceType value. */ String sourceType(); @@ -57,21 +59,21 @@ public interface ApplicationInsightsComponentFavorite { /** * Gets the timeModified property: Date and time in UTC of the last modification that was made to this favorite * definition. - * + * * @return the timeModified value. */ String timeModified(); /** * Gets the tags property: A list of 0 or more tags that are associated with this favorite definition. - * + * * @return the tags value. */ List tags(); /** * Gets the category property: Favorite category, as defined by the user at creation time. - * + * * @return the category value. */ String category(); @@ -79,14 +81,14 @@ public interface ApplicationInsightsComponentFavorite { /** * Gets the isGeneratedFromTemplate property: Flag denoting wether or not this favorite was generated from a * template. - * + * * @return the isGeneratedFromTemplate value. */ Boolean isGeneratedFromTemplate(); /** * Gets the userId property: Unique user id of the specific user that owns this favorite. - * + * * @return the userId value. */ String userId(); @@ -94,7 +96,7 @@ public interface ApplicationInsightsComponentFavorite { /** * Gets the inner * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner object. - * + * * @return the inner object. */ ApplicationInsightsComponentFavoriteInner innerModel(); 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 06c38538b2867..5078f51358701 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** An Application Insights component daily data volume cap status. */ +/** + * An Application Insights component daily data volume cap status. + */ @Immutable public final class ApplicationInsightsComponentFeature { /* @@ -65,13 +67,15 @@ public final class ApplicationInsightsComponentFeature { @JsonProperty(value = "SupportedAddonFeatures", access = JsonProperty.Access.WRITE_ONLY) private String supportedAddonFeatures; - /** Creates an instance of ApplicationInsightsComponentFeature class. */ + /** + * Creates an instance of ApplicationInsightsComponentFeature class. + */ public ApplicationInsightsComponentFeature() { } /** * Get the featureName property: The pricing feature name. - * + * * @return the featureName value. */ public String featureName() { @@ -80,7 +84,7 @@ public String featureName() { /** * Get the meterId property: The meter id used for the feature. - * + * * @return the meterId value. */ public String meterId() { @@ -89,7 +93,7 @@ public String meterId() { /** * Get the meterRateFrequency property: The meter rate for the feature's meter. - * + * * @return the meterRateFrequency value. */ public String meterRateFrequency() { @@ -98,7 +102,7 @@ public String meterRateFrequency() { /** * Get the resouceId property: Reserved, not used now. - * + * * @return the resouceId value. */ public String resouceId() { @@ -107,7 +111,7 @@ public String resouceId() { /** * Get the isHidden property: Reserved, not used now. - * + * * @return the isHidden value. */ public Boolean isHidden() { @@ -116,7 +120,7 @@ public Boolean isHidden() { /** * Get the capabilities property: A list of Application Insights component feature capability. - * + * * @return the capabilities value. */ public List capabilities() { @@ -125,7 +129,7 @@ public List capabilities() { /** * Get the title property: Display name of the feature. - * + * * @return the title value. */ public String title() { @@ -134,7 +138,7 @@ public String title() { /** * Get the isMainFeature property: Whether can apply addon feature on to it. - * + * * @return the isMainFeature value. */ public Boolean isMainFeature() { @@ -143,7 +147,7 @@ public Boolean isMainFeature() { /** * Get the supportedAddonFeatures property: The add on features on main feature. - * + * * @return the supportedAddonFeatures value. */ public String supportedAddonFeatures() { @@ -152,7 +156,7 @@ public String supportedAddonFeatures() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapabilities.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapabilities.java index 454b92c4b9f7b..9c7c67962b8ab 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 @@ -6,116 +6,118 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner; -/** An immutable client-side representation of ApplicationInsightsComponentFeatureCapabilities. */ +/** + * An immutable client-side representation of ApplicationInsightsComponentFeatureCapabilities. + */ public interface ApplicationInsightsComponentFeatureCapabilities { /** * Gets the supportExportData property: Whether allow to use continuous export feature. - * + * * @return the supportExportData value. */ Boolean supportExportData(); /** * Gets the burstThrottlePolicy property: Reserved, not used now. - * + * * @return the burstThrottlePolicy value. */ String burstThrottlePolicy(); /** * Gets the metadataClass property: Reserved, not used now. - * + * * @return the metadataClass value. */ String metadataClass(); /** * Gets the liveStreamMetrics property: Reserved, not used now. - * + * * @return the liveStreamMetrics value. */ Boolean liveStreamMetrics(); /** * Gets the applicationMap property: Reserved, not used now. - * + * * @return the applicationMap value. */ Boolean applicationMap(); /** * Gets the workItemIntegration property: Whether allow to use work item integration feature. - * + * * @return the workItemIntegration value. */ Boolean workItemIntegration(); /** * Gets the powerBIIntegration property: Reserved, not used now. - * + * * @return the powerBIIntegration value. */ Boolean powerBIIntegration(); /** * Gets the openSchema property: Reserved, not used now. - * + * * @return the openSchema value. */ Boolean openSchema(); /** * Gets the proactiveDetection property: Reserved, not used now. - * + * * @return the proactiveDetection value. */ Boolean proactiveDetection(); /** * Gets the analyticsIntegration property: Reserved, not used now. - * + * * @return the analyticsIntegration value. */ Boolean analyticsIntegration(); /** * Gets the multipleStepWebTest property: Whether allow to use multiple steps web test feature. - * + * * @return the multipleStepWebTest value. */ Boolean multipleStepWebTest(); /** * Gets the apiAccessLevel property: Reserved, not used now. - * + * * @return the apiAccessLevel value. */ String apiAccessLevel(); /** * Gets the trackingType property: The application insights component used tracking type. - * + * * @return the trackingType value. */ String trackingType(); /** * Gets the dailyCap property: Daily data volume cap in GB. - * + * * @return the dailyCap value. */ Float dailyCap(); /** * Gets the dailyCapResetTime property: Daily data volume cap UTC reset hour. - * + * * @return the dailyCapResetTime value. */ Float dailyCapResetTime(); /** * Gets the throttleRate property: Reserved, not used now. - * + * * @return the throttleRate value. */ Float throttleRate(); @@ -124,7 +126,7 @@ public interface ApplicationInsightsComponentFeatureCapabilities { * Gets the inner * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner * object. - * + * * @return the inner object. */ ApplicationInsightsComponentFeatureCapabilitiesInner innerModel(); 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 627622a7f6e78..e158b60f1ea38 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** An Application Insights component feature capability. */ +/** + * An Application Insights component feature capability. + */ @Immutable public final class ApplicationInsightsComponentFeatureCapability { /* @@ -46,13 +48,15 @@ public final class ApplicationInsightsComponentFeatureCapability { @JsonProperty(value = "MeterRateFrequency", access = JsonProperty.Access.WRITE_ONLY) private String meterRateFrequency; - /** Creates an instance of ApplicationInsightsComponentFeatureCapability class. */ + /** + * Creates an instance of ApplicationInsightsComponentFeatureCapability class. + */ public ApplicationInsightsComponentFeatureCapability() { } /** * Get the name property: The name of the capability. - * + * * @return the name value. */ public String name() { @@ -61,7 +65,7 @@ public String name() { /** * Get the description property: The description of the capability. - * + * * @return the description value. */ public String description() { @@ -70,7 +74,7 @@ public String description() { /** * Get the value property: The value of the capability. - * + * * @return the value value. */ public String value() { @@ -79,7 +83,7 @@ public String value() { /** * Get the unit property: The unit of the capability. - * + * * @return the unit value. */ public String unit() { @@ -88,7 +92,7 @@ public String unit() { /** * Get the meterId property: The meter used for the capability. - * + * * @return the meterId value. */ public String meterId() { @@ -97,7 +101,7 @@ public String meterId() { /** * Get the meterRateFrequency property: The meter rate of the meter. - * + * * @return the meterRateFrequency value. */ public String meterRateFrequency() { @@ -106,7 +110,7 @@ public String meterRateFrequency() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java index e9941b6ae0d22..289dc771b0160 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes the list of Application Insights Resources. */ +/** + * Describes the list of Application Insights Resources. + */ @Fluent public final class ApplicationInsightsComponentListResult { /* @@ -26,13 +28,15 @@ public final class ApplicationInsightsComponentListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of ApplicationInsightsComponentListResult class. */ + /** + * Creates an instance of ApplicationInsightsComponentListResult class. + */ public ApplicationInsightsComponentListResult() { } /** * Get the value property: List of Application Insights component definitions. - * + * * @return the value value. */ public List value() { @@ -41,7 +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. */ @@ -53,7 +57,7 @@ public ApplicationInsightsComponentListResult withValue(List e.validate()); } 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 5daa2a56571c5..4a1fc948020e1 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 @@ -7,18 +7,20 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; import java.util.List; -/** An immutable client-side representation of ApplicationInsightsComponentProactiveDetectionConfiguration. */ +/** + * An immutable client-side representation of ApplicationInsightsComponentProactiveDetectionConfiguration. + */ public interface ApplicationInsightsComponentProactiveDetectionConfiguration { /** * Gets the name property: The rule name. - * + * * @return the name value. */ String name(); /** * Gets the enabled property: A flag that indicates whether this rule is enabled by the user. - * + * * @return the enabled value. */ Boolean enabled(); @@ -26,21 +28,21 @@ public interface ApplicationInsightsComponentProactiveDetectionConfiguration { /** * Gets the sendEmailsToSubscriptionOwners property: A flag that indicated whether notifications on this rule should * be sent to subscription owners. - * + * * @return the sendEmailsToSubscriptionOwners value. */ Boolean sendEmailsToSubscriptionOwners(); /** * Gets the customEmails property: Custom email addresses for this rule notifications. - * + * * @return the customEmails value. */ List customEmails(); /** * Gets the lastUpdatedTime property: The last time this rule was updated. - * + * * @return the lastUpdatedTime value. */ String lastUpdatedTime(); @@ -48,7 +50,7 @@ public interface ApplicationInsightsComponentProactiveDetectionConfiguration { /** * Gets the ruleDefinitions property: Static definitions of the ProactiveDetection configuration rule (same values * for all components). - * + * * @return the ruleDefinitions value. */ ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions ruleDefinitions(); @@ -57,7 +59,7 @@ public interface ApplicationInsightsComponentProactiveDetectionConfiguration { * Gets the inner * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner * object. - * + * * @return the inner object. */ ApplicationInsightsComponentProactiveDetectionConfigurationInner innerModel(); 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 983c5a1029ab5..10da9acbfbe47 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Static definitions of the ProactiveDetection configuration rule (same values for all components). */ +/** + * Static definitions of the ProactiveDetection configuration rule (same values for all components). + */ @Fluent public final class ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions { /* @@ -58,13 +60,15 @@ public final class ApplicationInsightsComponentProactiveDetectionConfigurationRu @JsonProperty(value = "SupportsEmailNotifications") private Boolean supportsEmailNotifications; - /** Creates an instance of ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions class. */ + /** + * Creates an instance of ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions class. + */ public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions() { } /** * Get the name property: The rule name. - * + * * @return the name value. */ public String name() { @@ -73,7 +77,7 @@ public String name() { /** * Set the name property: The rule name. - * + * * @param name the name value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. */ @@ -84,7 +88,7 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinition /** * Get the displayName property: The rule name as it is displayed in UI. - * + * * @return the displayName value. */ public String displayName() { @@ -93,19 +97,19 @@ public String displayName() { /** * Set the displayName property: The rule name as it is displayed in UI. - * + * * @param displayName the displayName value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withDisplayName( - String displayName) { + public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions + withDisplayName(String displayName) { this.displayName = displayName; return this; } /** * Get the description property: The rule description. - * + * * @return the description value. */ public String description() { @@ -114,19 +118,19 @@ public String description() { /** * Set the description property: The rule description. - * + * * @param description the description value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withDescription( - String description) { + public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions + withDescription(String description) { this.description = description; return this; } /** * Get the helpUrl property: URL which displays additional info about the proactive detection rule. - * + * * @return the helpUrl value. */ public String helpUrl() { @@ -135,7 +139,7 @@ public String helpUrl() { /** * Set the helpUrl property: URL which displays additional info about the proactive detection rule. - * + * * @param helpUrl the helpUrl value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. */ @@ -146,7 +150,7 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinition /** * Get the isHidden property: A flag indicating whether the rule is hidden (from the UI). - * + * * @return the isHidden value. */ public Boolean isHidden() { @@ -155,7 +159,7 @@ public Boolean isHidden() { /** * Set the isHidden property: A flag indicating whether the rule is hidden (from the UI). - * + * * @param isHidden the isHidden value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. */ @@ -166,7 +170,7 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinition /** * Get the isEnabledByDefault property: A flag indicating whether the rule is enabled by default. - * + * * @return the isEnabledByDefault value. */ public Boolean isEnabledByDefault() { @@ -175,19 +179,19 @@ public Boolean isEnabledByDefault() { /** * Set the isEnabledByDefault property: A flag indicating whether the rule is enabled by default. - * + * * @param isEnabledByDefault the isEnabledByDefault value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withIsEnabledByDefault( - Boolean isEnabledByDefault) { + public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions + withIsEnabledByDefault(Boolean isEnabledByDefault) { this.isEnabledByDefault = isEnabledByDefault; return this; } /** * Get the isInPreview property: A flag indicating whether the rule is in preview. - * + * * @return the isInPreview value. */ public Boolean isInPreview() { @@ -196,12 +200,12 @@ public Boolean isInPreview() { /** * Set the isInPreview property: A flag indicating whether the rule is in preview. - * + * * @param isInPreview the isInPreview value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withIsInPreview( - Boolean isInPreview) { + public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions + withIsInPreview(Boolean isInPreview) { this.isInPreview = isInPreview; return this; } @@ -209,7 +213,7 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinition /** * Get the supportsEmailNotifications property: A flag indicating whether email notifications are supported for * detections for this rule. - * + * * @return the supportsEmailNotifications value. */ public Boolean supportsEmailNotifications() { @@ -219,19 +223,19 @@ public Boolean supportsEmailNotifications() { /** * Set the supportsEmailNotifications property: A flag indicating whether email notifications are supported for * detections for this rule. - * + * * @param supportsEmailNotifications the supportsEmailNotifications value to set. * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withSupportsEmailNotifications( - Boolean supportsEmailNotifications) { + public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions + withSupportsEmailNotifications(Boolean supportsEmailNotifications) { this.supportsEmailNotifications = supportsEmailNotifications; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentQuotaStatus.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentQuotaStatus.java index 04aa1040504dd..7a58d90a7be9f 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 @@ -6,18 +6,20 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner; -/** An immutable client-side representation of ApplicationInsightsComponentQuotaStatus. */ +/** + * An immutable client-side representation of ApplicationInsightsComponentQuotaStatus. + */ public interface ApplicationInsightsComponentQuotaStatus { /** * Gets the appId property: The Application ID for the Application Insights component. - * + * * @return the appId value. */ String appId(); /** * Gets the shouldBeThrottled property: The daily data volume cap is met, and data ingestion will be stopped. - * + * * @return the shouldBeThrottled value. */ Boolean shouldBeThrottled(); @@ -25,7 +27,7 @@ public interface ApplicationInsightsComponentQuotaStatus { /** * Gets the expirationTime property: Date and time when the daily data volume cap will be reset, and data ingestion * will resume. - * + * * @return the expirationTime value. */ String expirationTime(); @@ -33,7 +35,7 @@ public interface ApplicationInsightsComponentQuotaStatus { /** * Gets the inner * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner object. - * + * * @return the inner object. */ ApplicationInsightsComponentQuotaStatusInner innerModel(); 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 64043a7c8d8a1..d76d276fc6b46 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 @@ -6,18 +6,20 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; -/** An immutable client-side representation of ApplicationInsightsComponentWebTestLocation. */ +/** + * An immutable client-side representation of ApplicationInsightsComponentWebTestLocation. + */ public interface ApplicationInsightsComponentWebTestLocation { /** * Gets the displayName property: The display name of the web test location. - * + * * @return the displayName value. */ String displayName(); /** * Gets the tag property: Internally defined geographic location tag. - * + * * @return the tag value. */ String tag(); @@ -26,7 +28,7 @@ public interface ApplicationInsightsComponentWebTestLocation { * Gets the inner * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner * object. - * + * * @return the inner object. */ ApplicationInsightsComponentWebTestLocationInner innerModel(); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java index d881f45eaccd9..4793561b788bd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes the list of web test locations available to an Application Insights Component. */ +/** + * Describes the list of web test locations available to an Application Insights Component. + */ @Fluent public final class ApplicationInsightsWebTestLocationsListResult { /* @@ -19,13 +21,15 @@ public final class ApplicationInsightsWebTestLocationsListResult { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of ApplicationInsightsWebTestLocationsListResult class. */ + /** + * Creates an instance of ApplicationInsightsWebTestLocationsListResult class. + */ public ApplicationInsightsWebTestLocationsListResult() { } /** * Get the value property: List of web test locations. - * + * * @return the value value. */ public List value() { @@ -34,27 +38,25 @@ public List value() { /** * Set the value property: List of web test locations. - * + * * @param value the value value to set. * @return the ApplicationInsightsWebTestLocationsListResult object itself. */ - public ApplicationInsightsWebTestLocationsListResult withValue( - List value) { + public ApplicationInsightsWebTestLocationsListResult + withValue(List value) { this.value = value; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ApplicationInsightsWebTestLocationsListResult")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model ApplicationInsightsWebTestLocationsListResult")); } else { value().forEach(e -> e.validate()); } 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 0ee37c9b743fb..6b091a1a41e95 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of application being monitored. */ +/** + * Type of application being monitored. + */ public final class ApplicationType extends ExpandableStringEnum { - /** Static value web for ApplicationType. */ + /** + * Static value web for ApplicationType. + */ public static final ApplicationType WEB = fromString("web"); - /** Static value other for ApplicationType. */ + /** + * Static value other for ApplicationType. + */ public static final ApplicationType OTHER = fromString("other"); /** * Creates a new instance of ApplicationType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ApplicationType() { /** * Creates or finds a ApplicationType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ApplicationType. */ @@ -38,7 +44,7 @@ public static ApplicationType fromString(String name) { /** * Gets known ApplicationType values. - * + * * @return known ApplicationType values. */ public static Collection values() { 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 1d939b648f1da..1b9e829ce3409 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 @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CategoryType. */ +/** + * Defines values for CategoryType. + */ public final class CategoryType extends ExpandableStringEnum { - /** Static value workbook for CategoryType. */ + /** + * Static value workbook for CategoryType. + */ public static final CategoryType WORKBOOK = fromString("workbook"); - /** Static value TSG for CategoryType. */ + /** + * Static value TSG for CategoryType. + */ public static final CategoryType TSG = fromString("TSG"); - /** Static value performance for CategoryType. */ + /** + * Static value performance for CategoryType. + */ public static final CategoryType PERFORMANCE = fromString("performance"); - /** Static value retention for CategoryType. */ + /** + * Static value retention for CategoryType. + */ public static final CategoryType RETENTION = fromString("retention"); /** * Creates a new instance of CategoryType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public CategoryType() { /** * Creates or finds a CategoryType from its string representation. - * + * * @param name a name to look for. * @return the corresponding CategoryType. */ @@ -44,7 +54,7 @@ public static CategoryType fromString(String name) { /** * Gets known CategoryType values. - * + * * @return known CategoryType values. */ public static Collection values() { 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 923355674c3be..da3c51e6da5bd 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ComponentAvailableFeatures. */ +/** + * Resource collection API of ComponentAvailableFeatures. + */ public interface ComponentAvailableFeatures { /** * 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. @@ -20,12 +22,12 @@ public interface ComponentAvailableFeatures { * @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}. */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String resourceGroupName, + String resourceName, Context context); /** * Returns all available features of the application insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 ab3fb8e7d371b..a97477d9e191c 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 @@ -8,11 +8,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; -/** Resource collection API of ComponentCurrentBillingFeatures. */ +/** + * Resource collection API of ComponentCurrentBillingFeatures. + */ public interface ComponentCurrentBillingFeatures { /** * 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. @@ -21,12 +23,12 @@ public interface ComponentCurrentBillingFeatures { * @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}. */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String resourceGroupName, String resourceName, + Context context); /** * Returns current billing features for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,37 +40,33 @@ Response getWithResponse( /** * 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. + * Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Application Insights component billing features along with {@link Response}. */ - Response updateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, + Response updateWithResponse(String resourceGroupName, + String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, Context 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. + * Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Application Insights component billing features. */ - ApplicationInsightsComponentBillingFeatures update( - String resourceGroupName, - String resourceName, + ApplicationInsightsComponentBillingFeatures update(String resourceGroupName, String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java index decfdd68feac3..2ae75c4a0a4ae 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ComponentFeatureCapabilities. */ +/** + * Resource collection API of ComponentFeatureCapabilities. + */ public interface ComponentFeatureCapabilities { /** * 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. @@ -20,12 +22,12 @@ public interface ComponentFeatureCapabilities { * @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}. */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String resourceGroupName, + String resourceName, Context context); /** * Returns feature capabilities of the application insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 new file mode 100644 index 0000000000000..5677b25036dde --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccounts.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner; + +/** + * An immutable client-side representation of ComponentLinkedStorageAccounts. + */ +public interface ComponentLinkedStorageAccounts { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the linkedStorageAccount property: Linked storage account resource ID. + * + * @return the linkedStorageAccount value. + */ + String linkedStorageAccount(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner + * object. + * + * @return the inner object. + */ + ComponentLinkedStorageAccountsInner innerModel(); + + /** + * The entirety of the ComponentLinkedStorageAccounts definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ComponentLinkedStorageAccounts definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ComponentLinkedStorageAccounts definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ComponentLinkedStorageAccounts definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @return the next definition stage. + */ + WithCreate withExistingComponent(String resourceGroupName, String resourceName); + } + + /** + * The stage of the ComponentLinkedStorageAccounts definition which contains all the minimum required properties + * for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithLinkedStorageAccount { + /** + * Executes the create request. + * + * @return the created resource. + */ + ComponentLinkedStorageAccounts create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ComponentLinkedStorageAccounts create(Context context); + } + + /** + * The stage of the ComponentLinkedStorageAccounts definition allowing to specify linkedStorageAccount. + */ + interface WithLinkedStorageAccount { + /** + * Specifies the linkedStorageAccount property: Linked storage account resource ID. + * + * @param linkedStorageAccount Linked storage account resource ID. + * @return the next definition stage. + */ + WithCreate withLinkedStorageAccount(String linkedStorageAccount); + } + } + + /** + * Begins update for the ComponentLinkedStorageAccounts resource. + * + * @return the stage of resource update. + */ + ComponentLinkedStorageAccounts.Update update(); + + /** + * The template for ComponentLinkedStorageAccounts update. + */ + interface Update extends UpdateStages.WithLinkedStorageAccount { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ComponentLinkedStorageAccounts apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ComponentLinkedStorageAccounts apply(Context context); + } + + /** + * The ComponentLinkedStorageAccounts update stages. + */ + interface UpdateStages { + /** + * The stage of the ComponentLinkedStorageAccounts update allowing to specify linkedStorageAccount. + */ + interface WithLinkedStorageAccount { + /** + * Specifies the linkedStorageAccount property: Linked storage account resource ID. + * + * @param linkedStorageAccount Linked storage account resource ID. + * @return the next definition stage. + */ + Update withLinkedStorageAccount(String linkedStorageAccount); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ComponentLinkedStorageAccounts refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ComponentLinkedStorageAccounts refresh(Context context); +} 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 new file mode 100644 index 0000000000000..711d7a8e2313f --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsOperations.java @@ -0,0 +1,121 @@ +// 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.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ComponentLinkedStorageAccountsOperations. + */ +public interface ComponentLinkedStorageAccountsOperations { + /** + * Returns the current linked storage settings for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String resourceName, + StorageType storageType, Context context); + + /** + * Returns the current linked storage settings for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + ComponentLinkedStorageAccounts get(String resourceGroupName, String resourceName, StorageType storageType); + + /** + * Delete linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse(String resourceGroupName, String resourceName, StorageType storageType, + Context context); + + /** + * Delete linked storage accounts for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, StorageType storageType); + + /** + * Returns the current linked storage settings for an Application Insights component. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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}. + */ + ComponentLinkedStorageAccounts getById(String id); + + /** + * Returns the current linked storage settings for an Application Insights component. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights component linked storage accounts along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete linked storage accounts for an Application Insights component. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete linked storage accounts for an Application Insights component. + * + * @param id the resource ID. + * @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 deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ComponentLinkedStorageAccounts resource. + * + * @param name resource name. + * @return the first stage of the new ComponentLinkedStorageAccounts definition. + */ + ComponentLinkedStorageAccounts.DefinitionStages.Blank define(StorageType name); +} 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 new file mode 100644 index 0000000000000..f464cc27b754a --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsPatch.java @@ -0,0 +1,70 @@ +// 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.resourcemanager.applicationinsights.fluent.models.LinkedStorageAccountsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An Application Insights component linked storage accounts patch. + */ +@Fluent +public final class ComponentLinkedStorageAccountsPatch { + /* + * The properties of the linked storage accounts. + */ + @JsonProperty(value = "properties") + private LinkedStorageAccountsProperties innerProperties; + + /** + * Creates an instance of ComponentLinkedStorageAccountsPatch class. + */ + public ComponentLinkedStorageAccountsPatch() { + } + + /** + * Get the innerProperties property: The properties of the linked storage accounts. + * + * @return the innerProperties value. + */ + private LinkedStorageAccountsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the linkedStorageAccount property: Linked storage account resource ID. + * + * @return the linkedStorageAccount value. + */ + public String linkedStorageAccount() { + return this.innerProperties() == null ? null : this.innerProperties().linkedStorageAccount(); + } + + /** + * Set the linkedStorageAccount property: Linked storage account resource ID. + * + * @param linkedStorageAccount the linkedStorageAccount value to set. + * @return the ComponentLinkedStorageAccountsPatch object itself. + */ + public ComponentLinkedStorageAccountsPatch withLinkedStorageAccount(String linkedStorageAccount) { + if (this.innerProperties() == null) { + this.innerProperties = new LinkedStorageAccountsProperties(); + } + this.innerProperties().withLinkedStorageAccount(linkedStorageAccount); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java index 1cb1cc8f07b24..1eef0f3c9a199 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes the body of a purge request for an App Insights component. */ +/** + * Describes the body of a purge request for an App Insights component. + */ @Fluent public final class ComponentPurgeBody { /* @@ -24,13 +26,15 @@ public final class ComponentPurgeBody { @JsonProperty(value = "filters", required = true) private List filters; - /** Creates an instance of ComponentPurgeBody class. */ + /** + * Creates an instance of ComponentPurgeBody class. + */ public ComponentPurgeBody() { } /** * Get the table property: Table from which to purge data. - * + * * @return the table value. */ public String table() { @@ -39,7 +43,7 @@ public String table() { /** * Set the table property: Table from which to purge data. - * + * * @param table the table value to set. * @return the ComponentPurgeBody object itself. */ @@ -50,7 +54,7 @@ public ComponentPurgeBody withTable(String table) { /** * Get the filters property: The set of columns and filters (queries) to run over them to purge the resulting data. - * + * * @return the filters value. */ public List filters() { @@ -59,7 +63,7 @@ public List filters() { /** * Set the filters property: The set of columns and filters (queries) to run over them to purge the resulting data. - * + * * @param filters the filters value to set. * @return the ComponentPurgeBody object itself. */ @@ -70,19 +74,17 @@ public ComponentPurgeBody withFilters(List filters) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (table() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property table in model ComponentPurgeBody")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property table in model ComponentPurgeBody")); } if (filters() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property filters in model ComponentPurgeBody")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property filters in model ComponentPurgeBody")); } else { filters().forEach(e -> e.validate()); } 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 f552ba4937041..ea68e45e67c08 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** User-defined filters to return data which will be purged from the table. */ +/** + * User-defined filters to return data which will be purged from the table. + */ @Fluent public final class ComponentPurgeBodyFilters { /* @@ -36,13 +38,15 @@ public final class ComponentPurgeBodyFilters { @JsonProperty(value = "key") private String key; - /** Creates an instance of ComponentPurgeBodyFilters class. */ + /** + * Creates an instance of ComponentPurgeBodyFilters class. + */ public ComponentPurgeBodyFilters() { } /** * Get the column property: The column of the table over which the given query should run. - * + * * @return the column value. */ public String column() { @@ -51,7 +55,7 @@ public String column() { /** * Set the column property: The column of the table over which the given query should run. - * + * * @param column the column value to set. * @return the ComponentPurgeBodyFilters object itself. */ @@ -64,7 +68,7 @@ public ComponentPurgeBodyFilters withColumn(String column) { * Get the operator property: A query operator to evaluate over the provided column and value(s). Supported * operators are ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a * KQL query. - * + * * @return the operator value. */ public String operator() { @@ -75,7 +79,7 @@ public String operator() { * Set the operator property: A query operator to evaluate over the provided column and value(s). Supported * operators are ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a * KQL query. - * + * * @param operator the operator value to set. * @return the ComponentPurgeBodyFilters object itself. */ @@ -87,7 +91,7 @@ public ComponentPurgeBodyFilters withOperator(String operator) { /** * Get the value property: the value for the operator to function over. This can be a number (e.g., > 100), a * string (timestamp >= '2017-09-01') or array of values. - * + * * @return the value value. */ public Object value() { @@ -97,7 +101,7 @@ public Object value() { /** * Set the value property: the value for the operator to function over. This can be a number (e.g., > 100), a * string (timestamp >= '2017-09-01') or array of values. - * + * * @param value the value value to set. * @return the ComponentPurgeBodyFilters object itself. */ @@ -109,7 +113,7 @@ public ComponentPurgeBodyFilters withValue(Object value) { /** * Get the key property: When filtering over custom dimensions, this key will be used as the name of the custom * dimension. - * + * * @return the key value. */ public String key() { @@ -119,7 +123,7 @@ public String key() { /** * Set the key property: When filtering over custom dimensions, this key will be used as the name of the custom * dimension. - * + * * @param key the key value to set. * @return the ComponentPurgeBodyFilters object itself. */ @@ -130,7 +134,7 @@ public ComponentPurgeBodyFilters withKey(String key) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeResponse.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeResponse.java index f26ee0f5a6e3a..ba858c72971a1 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 @@ -6,18 +6,20 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeResponseInner; -/** An immutable client-side representation of ComponentPurgeResponse. */ +/** + * An immutable client-side representation of ComponentPurgeResponse. + */ public interface ComponentPurgeResponse { /** * Gets the operationId property: Id to use when querying for status for a particular purge operation. - * + * * @return the operationId value. */ String operationId(); /** * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeResponseInner object. - * + * * @return the inner object. */ ComponentPurgeResponseInner innerModel(); 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 d30177d81cae8..c16eedcb5b239 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 @@ -6,11 +6,13 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeStatusResponseInner; -/** An immutable client-side representation of ComponentPurgeStatusResponse. */ +/** + * An immutable client-side representation of ComponentPurgeStatusResponse. + */ public interface ComponentPurgeStatusResponse { /** * Gets the status property: Status of the operation represented by the requested Id. - * + * * @return the status value. */ PurgeState status(); @@ -18,7 +20,7 @@ public interface ComponentPurgeStatusResponse { /** * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeStatusResponseInner * object. - * + * * @return the inner object. */ ComponentPurgeStatusResponseInner innerModel(); 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 492cd38b44102..3b6f584f25b69 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ComponentQuotaStatus. */ +/** + * Resource collection API of ComponentQuotaStatus. + */ public interface ComponentQuotaStatus { /** * 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. @@ -20,12 +22,12 @@ public interface ComponentQuotaStatus { * @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}. */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String resourceGroupName, String resourceName, + Context context); /** * Returns daily data volume cap (quota) status for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 00074570260b8..e5097cd0a8d1c 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 @@ -8,58 +8,60 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Components. */ +/** + * Resource collection API of Components. + */ 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}. + * @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 a list of all Application Insights components within a subscription as paginated response with {@link - * PagedIterable}. + * @return a list of all Application Insights components within a subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); /** * Gets a list of Application Insights components within a 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 a list of Application Insights components within a resource group as paginated response with {@link - * PagedIterable}. + * @return a list of Application Insights components within a resource group as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** * 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 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 a list of Application Insights components within a resource group as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Deletes an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. @@ -72,7 +74,7 @@ public interface Components { /** * 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. @@ -83,7 +85,7 @@ public interface Components { /** * 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. @@ -92,12 +94,12 @@ public interface Components { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Application Insights component definition along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); /** * Returns an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -109,15 +111,16 @@ Response getByResourceGroupWithResponse( /** * 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 + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the + * execution of purge requests by sending a single command whose predicate includes all user identities that require + * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge + * request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please + * run purge operation (directly on the * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific * resource id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. @@ -127,20 +130,21 @@ Response getByResourceGroupWithResponse( * @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}. */ - Response purgeWithResponse( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context); + Response purgeWithResponse(String resourceGroupName, String resourceName, + ComponentPurgeBody body, Context context); /** * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, - * for workspace-based Application Insights resource please run purge operation (directly on the + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the + * execution of purge requests by sending a single command whose predicate includes all user identities that require + * purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge + * request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please + * run purge operation (directly on the * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific * resource id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. @@ -153,7 +157,7 @@ Response purgeWithResponse( /** * 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. @@ -163,12 +167,12 @@ Response purgeWithResponse( * @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}. */ - Response getPurgeStatusWithResponse( - String resourceGroupName, String resourceName, String purgeId, Context context); + Response getPurgeStatusWithResponse(String resourceGroupName, String resourceName, + String purgeId, Context context); /** * Get status for an ongoing purge operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. @@ -181,7 +185,7 @@ Response getPurgeStatusWithResponse( /** * Returns an Application Insights component. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -192,7 +196,7 @@ Response getPurgeStatusWithResponse( /** * Returns an Application Insights component. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -204,7 +208,7 @@ Response getPurgeStatusWithResponse( /** * Deletes an Application Insights component. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -214,7 +218,7 @@ Response getPurgeStatusWithResponse( /** * Deletes an Application Insights component. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -226,7 +230,7 @@ Response getPurgeStatusWithResponse( /** * Begins definition for a new ApplicationInsightsComponent resource. - * + * * @param name resource name. * @return the first stage of the new ApplicationInsightsComponent definition. */ 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 2a1eb09345899..5529e5f38b679 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 @@ -8,21 +8,29 @@ import com.azure.core.management.Resource; import java.util.Map; -/** An azure resource object. */ +/** + * An azure resource object. + */ @Fluent public class ComponentsResource extends Resource { - /** Creates an instance of ComponentsResource class. */ + /** + * Creates an instance of ComponentsResource class. + */ public ComponentsResource() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComponentsResource withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComponentsResource withTags(Map tags) { super.withTags(tags); @@ -31,7 +39,7 @@ public ComponentsResource withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinition.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinition.java deleted file mode 100644 index 876faca170f75..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinition.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.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Error response. */ -@Immutable -public final class ErrorDefinition extends ManagementError { - /* - * Internal error details. - */ - @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) - private Object innererror; - - /** Creates an instance of ErrorDefinition class. */ - public ErrorDefinition() { - } - - /** - * Get the innererror property: Internal error details. - * - * @return the innererror value. - */ - public Object getInnererror() { - return this.innererror; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinitionException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinitionException.java deleted file mode 100644 index 77f8d4938bcd3..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinitionException.java +++ /dev/null @@ -1,38 +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.http.HttpResponse; -import com.azure.core.management.exception.ManagementException; - -/** Exception thrown for an invalid response with ErrorDefinition information. */ -public final class ErrorDefinitionException extends ManagementException { - /** - * Initializes a new instance of the ErrorDefinitionException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - */ - public ErrorDefinitionException(String message, HttpResponse response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorDefinitionException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized response value. - */ - public ErrorDefinitionException(String message, HttpResponse response, ErrorDefinition value) { - super(message, response, value); - } - - /** {@inheritDoc} */ - @Override - public ErrorDefinition getValue() { - return (ErrorDefinition) super.getValue(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java index efff7599cf3de..c3a81986fc739 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 @@ -8,26 +8,28 @@ import com.azure.core.util.Context; import java.util.List; -/** Resource collection API of ExportConfigurations. */ +/** + * Resource collection API of ExportConfigurations. + */ public interface ExportConfigurations { /** * Gets a list of Continuous Export configuration of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @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 configuration of an Application Insights component along with {@link - * Response}. + * @return a list of Continuous Export configuration of an Application Insights component along with + * {@link Response}. */ - Response> listWithResponse( - String resourceGroupName, String resourceName, Context context); + Response> listWithResponse(String resourceGroupName, + String resourceName, Context context); /** * Gets a list of Continuous Export configuration of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -39,41 +41,38 @@ Response> listWithResponse /** * 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. + * 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 Continuous Export configurations along with {@link Response}. */ - Response> createWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentExportRequest exportProperties, - Context context); + Response> createWithResponse(String resourceGroupName, + String resourceName, ApplicationInsightsComponentExportRequest exportProperties, Context 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. + * Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Continuous Export configurations. */ - List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties); + List create(String resourceGroupName, String resourceName, + ApplicationInsightsComponentExportRequest exportProperties); /** * 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. @@ -83,12 +82,12 @@ List create( * @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}. */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context); + Response deleteWithResponse(String resourceGroupName, + String resourceName, String exportId, Context context); /** * 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. @@ -97,12 +96,12 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define a Continuous Export configuration. */ - ApplicationInsightsComponentExportConfiguration delete( - String resourceGroupName, String resourceName, String exportId); + ApplicationInsightsComponentExportConfiguration delete(String resourceGroupName, String resourceName, + String exportId); /** * 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. @@ -112,12 +111,12 @@ ApplicationInsightsComponentExportConfiguration delete( * @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}. */ - Response getWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context); + Response getWithResponse(String resourceGroupName, + String resourceName, String exportId, Context context); /** * 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. @@ -130,7 +129,7 @@ Response getWithResponse( /** * 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. @@ -141,16 +140,13 @@ Response getWithResponse( * @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}. */ - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties, + Response updateWithResponse(String resourceGroupName, + String resourceName, String exportId, ApplicationInsightsComponentExportRequest exportProperties, Context context); /** * Update the Continuous Export configuration for this export id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. @@ -160,9 +156,6 @@ Response updateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define a Continuous Export configuration. */ - ApplicationInsightsComponentExportConfiguration update( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties); + ApplicationInsightsComponentExportConfiguration update(String resourceGroupName, String resourceName, + String exportId, ApplicationInsightsComponentExportRequest exportProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java index aeb60eaa59d7a..15d8832d97657 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 @@ -8,35 +8,53 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for FavoriteSourceType. */ +/** + * Defines values for FavoriteSourceType. + */ public final class FavoriteSourceType extends ExpandableStringEnum { - /** Static value retention for FavoriteSourceType. */ + /** + * Static value retention for FavoriteSourceType. + */ public static final FavoriteSourceType RETENTION = fromString("retention"); - /** Static value notebook for FavoriteSourceType. */ + /** + * Static value notebook for FavoriteSourceType. + */ public static final FavoriteSourceType NOTEBOOK = fromString("notebook"); - /** Static value sessions for FavoriteSourceType. */ + /** + * Static value sessions for FavoriteSourceType. + */ public static final FavoriteSourceType SESSIONS = fromString("sessions"); - /** Static value events for FavoriteSourceType. */ + /** + * Static value events for FavoriteSourceType. + */ public static final FavoriteSourceType EVENTS = fromString("events"); - /** Static value userflows for FavoriteSourceType. */ + /** + * Static value userflows for FavoriteSourceType. + */ public static final FavoriteSourceType USERFLOWS = fromString("userflows"); - /** Static value funnel for FavoriteSourceType. */ + /** + * Static value funnel for FavoriteSourceType. + */ public static final FavoriteSourceType FUNNEL = fromString("funnel"); - /** Static value impact for FavoriteSourceType. */ + /** + * Static value impact for FavoriteSourceType. + */ public static final FavoriteSourceType IMPACT = fromString("impact"); - /** Static value segmentation for FavoriteSourceType. */ + /** + * Static value segmentation for FavoriteSourceType. + */ public static final FavoriteSourceType SEGMENTATION = fromString("segmentation"); /** * Creates a new instance of FavoriteSourceType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,7 +63,7 @@ public FavoriteSourceType() { /** * Creates or finds a FavoriteSourceType from its string representation. - * + * * @param name a name to look for. * @return the corresponding FavoriteSourceType. */ @@ -56,7 +74,7 @@ public static FavoriteSourceType fromString(String name) { /** * Gets known FavoriteSourceType values. - * + * * @return known FavoriteSourceType values. */ public static Collection values() { 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 335b71a2deadd..8aa96670ad298 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 @@ -12,13 +12,19 @@ * the Application Insights component. */ public enum FavoriteType { - /** Enum value shared. */ + /** + * Enum value shared. + */ SHARED("shared"), - /** Enum value user. */ + /** + * Enum value user. + */ USER("user"); - /** The actual serialized value for a FavoriteType instance. */ + /** + * The actual serialized value for a FavoriteType instance. + */ private final String value; FavoriteType(String value) { @@ -27,7 +33,7 @@ public enum FavoriteType { /** * Parses a serialized value to a FavoriteType instance. - * + * * @param value the serialized value to parse. * @return the parsed FavoriteType object, or null if unable to parse. */ @@ -45,7 +51,9 @@ public static FavoriteType fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { 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 a43f95b3af0b2..44866668fec43 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 @@ -9,18 +9,20 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; import java.util.List; -/** Resource collection API of Favorites. */ +/** + * Resource collection API of Favorites. + */ public interface Favorites { /** * 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). + * 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. + * 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. @@ -28,18 +30,13 @@ public interface Favorites { * @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}. */ - Response> listWithResponse( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags, + Response> listWithResponse(String resourceGroupName, String resourceName, + FavoriteType favoriteType, FavoriteSourceType sourceType, Boolean canFetchContent, List tags, Context context); /** * Gets a list of favorites defined within an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -51,7 +48,7 @@ Response> listWithResponse( /** * 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. @@ -59,15 +56,15 @@ Response> listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component along with {@link - * Response}. + * @return a single favorite by its FavoriteId, defined within an Application Insights component along with + * {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context); + Response getWithResponse(String resourceGroupName, String resourceName, + String favoriteId, Context context); /** * 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. @@ -80,48 +77,41 @@ Response getWithResponse( /** * 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. + * Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define a favorite that is associated to an Application Insights component along with - * {@link Response}. + * {@link Response}. */ - Response addWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context); + Response addWithResponse(String resourceGroupName, String resourceName, + String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, Context context); /** * 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. + * Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define a favorite that is associated to an Application Insights component. */ - ApplicationInsightsComponentFavorite add( - String resourceGroupName, - String resourceName, - String favoriteId, + ApplicationInsightsComponentFavorite add(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties); /** * 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. @@ -131,18 +121,14 @@ ApplicationInsightsComponentFavorite add( * @throws com.azure.core.management.exception.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}. + * {@link Response}. */ - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context); + Response updateWithResponse(String resourceGroupName, String resourceName, + String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties, Context context); /** * 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. @@ -152,15 +138,12 @@ Response updateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define a favorite that is associated to an Application Insights component. */ - ApplicationInsightsComponentFavorite update( - String resourceGroupName, - String resourceName, - String favoriteId, + ApplicationInsightsComponentFavorite update(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties); /** * Remove a favorite that is associated to an Application Insights component. - * + * * @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. @@ -170,12 +153,12 @@ ApplicationInsightsComponentFavorite update( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, String favoriteId, + Context context); /** * Remove a favorite that is associated to an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. 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 30142e79e5f31..e56ae74d4bd6f 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 @@ -13,12 +13,14 @@ * set to 'Bluefield' when creating/updating a component via the REST API. */ public final class FlowType extends ExpandableStringEnum { - /** Static value Bluefield for FlowType. */ + /** + * Static value Bluefield for FlowType. + */ public static final FlowType BLUEFIELD = fromString("Bluefield"); /** * Creates a new instance of FlowType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +29,7 @@ public FlowType() { /** * Creates or finds a FlowType from its string representation. - * + * * @param name a name to look for. * @return the corresponding FlowType. */ @@ -38,7 +40,7 @@ public static FlowType fromString(String name) { /** * Gets known FlowType values. - * + * * @return known FlowType values. */ public static Collection values() { 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 178c3a1b0c5f0..cf1d777071c70 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** A header to add to the WebTest. */ +/** + * A header to add to the WebTest. + */ @Fluent public final class HeaderField { /* @@ -22,13 +24,15 @@ public final class HeaderField { @JsonProperty(value = "value") private String headerFieldValue; - /** Creates an instance of HeaderField class. */ + /** + * Creates an instance of HeaderField class. + */ public HeaderField() { } /** * Get the headerFieldName property: The name of the header. - * + * * @return the headerFieldName value. */ public String headerFieldName() { @@ -37,7 +41,7 @@ public String headerFieldName() { /** * Set the headerFieldName property: The name of the header. - * + * * @param headerFieldName the headerFieldName value to set. * @return the HeaderField object itself. */ @@ -48,7 +52,7 @@ public HeaderField withHeaderFieldName(String headerFieldName) { /** * Get the headerFieldValue property: The value of the header. - * + * * @return the headerFieldValue value. */ public String headerFieldValue() { @@ -57,7 +61,7 @@ public String headerFieldValue() { /** * Set the headerFieldValue property: The value of the header. - * + * * @param headerFieldValue the headerFieldValue value to set. * @return the HeaderField object itself. */ @@ -68,7 +72,7 @@ public HeaderField withHeaderFieldValue(String headerFieldValue) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java index c95dd0553a537..5e2e4c30b7ff3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java @@ -8,21 +8,29 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates the flow of the ingestion. */ +/** + * Indicates the flow of the ingestion. + */ public final class IngestionMode extends ExpandableStringEnum { - /** Static value ApplicationInsights for IngestionMode. */ + /** + * Static value ApplicationInsights for IngestionMode. + */ public static final IngestionMode APPLICATION_INSIGHTS = fromString("ApplicationInsights"); - /** Static value ApplicationInsightsWithDiagnosticSettings for IngestionMode. */ - public static final IngestionMode APPLICATION_INSIGHTS_WITH_DIAGNOSTIC_SETTINGS = - fromString("ApplicationInsightsWithDiagnosticSettings"); + /** + * Static value ApplicationInsightsWithDiagnosticSettings for IngestionMode. + */ + public static final IngestionMode APPLICATION_INSIGHTS_WITH_DIAGNOSTIC_SETTINGS + = fromString("ApplicationInsightsWithDiagnosticSettings"); - /** Static value LogAnalytics for IngestionMode. */ + /** + * Static value LogAnalytics for IngestionMode. + */ public static final IngestionMode LOG_ANALYTICS = fromString("LogAnalytics"); /** * Creates a new instance of IngestionMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -31,7 +39,7 @@ public IngestionMode() { /** * Creates or finds a IngestionMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding IngestionMode. */ @@ -42,7 +50,7 @@ public static IngestionMode fromString(String name) { /** * Gets known IngestionMode values. - * + * * @return known IngestionMode values. */ public static Collection values() { 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 0e5f9d1af1c70..482ffe5fcdc42 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Inner error. */ +/** + * Inner error. + */ @Fluent public final class InnerError { /* @@ -23,13 +25,15 @@ public final class InnerError { @JsonProperty(value = "time") private OffsetDateTime time; - /** Creates an instance of InnerError class. */ + /** + * Creates an instance of InnerError class. + */ public InnerError() { } /** * Get the diagnosticcontext property: Provides correlation for request. - * + * * @return the diagnosticcontext value. */ public String diagnosticcontext() { @@ -38,7 +42,7 @@ public String diagnosticcontext() { /** * Set the diagnosticcontext property: Provides correlation for request. - * + * * @param diagnosticcontext the diagnosticcontext value to set. * @return the InnerError object itself. */ @@ -49,7 +53,7 @@ public InnerError withDiagnosticcontext(String diagnosticcontext) { /** * Get the time property: Request time. - * + * * @return the time value. */ public OffsetDateTime time() { @@ -58,7 +62,7 @@ public OffsetDateTime time() { /** * Set the time property: Request time. - * + * * @param time the time value to set. * @return the InnerError object itself. */ @@ -69,7 +73,7 @@ public InnerError withTime(OffsetDateTime time) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java index 6f9d97c83fa0a..ae55238d2fe08 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 @@ -13,15 +13,19 @@ * Application Insights component. */ public final class ItemScope extends ExpandableStringEnum { - /** Static value shared for ItemScope. */ + /** + * Static value shared for ItemScope. + */ public static final ItemScope SHARED = fromString("shared"); - /** Static value user for ItemScope. */ + /** + * Static value user for ItemScope. + */ public static final ItemScope USER = fromString("user"); /** * Creates a new instance of ItemScope value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +34,7 @@ public ItemScope() { /** * Creates or finds a ItemScope from its string representation. - * + * * @param name a name to look for. * @return the corresponding ItemScope. */ @@ -41,7 +45,7 @@ public static ItemScope fromString(String name) { /** * Gets known ItemScope values. - * + * * @return known ItemScope values. */ public static Collection values() { 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 21941afe3861f..10c73e0e777d7 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 @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ItemScopePath. */ +/** + * Defines values for ItemScopePath. + */ public final class ItemScopePath extends ExpandableStringEnum { - /** Static value analyticsItems for ItemScopePath. */ + /** + * Static value analyticsItems for ItemScopePath. + */ public static final ItemScopePath ANALYTICS_ITEMS = fromString("analyticsItems"); - /** Static value myanalyticsItems for ItemScopePath. */ + /** + * Static value myanalyticsItems for ItemScopePath. + */ public static final ItemScopePath MYANALYTICS_ITEMS = fromString("myanalyticsItems"); /** * Creates a new instance of ItemScopePath value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ItemScopePath() { /** * Creates or finds a ItemScopePath from its string representation. - * + * * @param name a name to look for. * @return the corresponding ItemScopePath. */ @@ -38,7 +44,7 @@ public static ItemScopePath fromString(String name) { /** * Gets known ItemScopePath values. - * + * * @return known ItemScopePath values. */ public static Collection values() { 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 8dad599e1f688..f3a9363db6197 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum indicating the type of the Analytics item. */ +/** + * Enum indicating the type of the Analytics item. + */ public final class ItemType extends ExpandableStringEnum { - /** Static value none for ItemType. */ + /** + * Static value none for ItemType. + */ public static final ItemType NONE = fromString("none"); - /** Static value query for ItemType. */ + /** + * Static value query for ItemType. + */ public static final ItemType QUERY = fromString("query"); - /** Static value recent for ItemType. */ + /** + * Static value recent for ItemType. + */ public static final ItemType RECENT = fromString("recent"); - /** Static value function for ItemType. */ + /** + * Static value function for ItemType. + */ public static final ItemType FUNCTION = fromString("function"); /** * Creates a new instance of ItemType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public ItemType() { /** * Creates or finds a ItemType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ItemType. */ @@ -44,7 +54,7 @@ public static ItemType fromString(String name) { /** * Gets known ItemType values. - * + * * @return known ItemType values. */ public static Collection values() { 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 9a3fa45ed5067..745fa5e3057d4 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 @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ItemTypeParameter. */ +/** + * Defines values for ItemTypeParameter. + */ public final class ItemTypeParameter extends ExpandableStringEnum { - /** Static value none for ItemTypeParameter. */ + /** + * Static value none for ItemTypeParameter. + */ public static final ItemTypeParameter NONE = fromString("none"); - /** Static value query for ItemTypeParameter. */ + /** + * Static value query for ItemTypeParameter. + */ public static final ItemTypeParameter QUERY = fromString("query"); - /** Static value function for ItemTypeParameter. */ + /** + * Static value function for ItemTypeParameter. + */ public static final ItemTypeParameter FUNCTION = fromString("function"); - /** Static value folder for ItemTypeParameter. */ + /** + * Static value folder for ItemTypeParameter. + */ public static final ItemTypeParameter FOLDER = fromString("folder"); - /** Static value recent for ItemTypeParameter. */ + /** + * Static value recent for ItemTypeParameter. + */ public static final ItemTypeParameter RECENT = fromString("recent"); /** * Creates a new instance of ItemTypeParameter value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public ItemTypeParameter() { /** * Creates or finds a ItemTypeParameter from its string representation. - * + * * @param name a name to look for. * @return the corresponding ItemTypeParameter. */ @@ -47,7 +59,7 @@ public static ItemTypeParameter fromString(String name) { /** * Gets known ItemTypeParameter values. - * + * * @return known ItemTypeParameter values. */ public static Collection values() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Kind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Kind.java deleted file mode 100644 index 86ce6d79141ba..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Kind.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** The kind of workbook. Choices are user and shared. */ -public final class Kind extends ExpandableStringEnum { - /** Static value user for Kind. */ - public static final Kind USER = fromString("user"); - - /** Static value shared for Kind. */ - public static final Kind SHARED = fromString("shared"); - - /** - * Creates a new instance of Kind value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Kind() { - } - - /** - * Creates or finds a Kind from its string representation. - * - * @param name a name to look for. - * @return the corresponding Kind. - */ - @JsonCreator - public static Kind fromString(String name) { - return fromString(name, Kind.class); - } - - /** - * Gets known Kind values. - * - * @return known Kind values. - */ - public static Collection values() { - return values(Kind.class); - } -} 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 bf1d295c9a418..886ca7b7220e5 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 @@ -6,18 +6,20 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.LiveTokenResponseInner; -/** An immutable client-side representation of LiveTokenResponse. */ +/** + * An immutable client-side representation of LiveTokenResponse. + */ public interface LiveTokenResponse { /** * Gets the liveToken property: JWT token for accessing live metrics stream data. - * + * * @return the liveToken value. */ String liveToken(); /** * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.LiveTokenResponseInner object. - * + * * @return the inner object. */ LiveTokenResponseInner innerModel(); 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 98c4524b030d6..dbb514b7c37a0 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of LiveTokens. */ +/** + * Resource collection API of LiveTokens. + */ public interface LiveTokens { /** * **Gets an access token for live metrics stream data.**. - * + * * @param resourceUri The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -23,7 +25,7 @@ public interface LiveTokens { /** * **Gets an access token for live metrics stream data.**. - * + * * @param resourceUri The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. 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 a56d9ae62b416..70056fa3af727 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 @@ -11,7 +11,9 @@ import java.util.Map; import java.util.UUID; -/** Managed service identity (system assigned and/or user assigned identities). */ +/** + * Managed service identity (system assigned and/or user assigned identities). + */ @Fluent public class ManagedServiceIdentity { /* @@ -37,21 +39,24 @@ public class ManagedServiceIdentity { /* * 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}. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. */ @JsonProperty(value = "userAssignedIdentities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; - /** Creates an instance of ManagedServiceIdentity class. */ + /** + * Creates an instance of ManagedServiceIdentity class. + */ public ManagedServiceIdentity() { } /** * Get the principalId property: The service principal ID of the system assigned identity. This property will only * be provided for a system assigned identity. - * + * * @return the principalId value. */ public UUID principalId() { @@ -59,9 +64,9 @@ public UUID principalId() { } /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided + * for a system assigned identity. + * * @return the tenantId value. */ public UUID tenantId() { @@ -71,7 +76,7 @@ public UUID tenantId() { /** * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are * allowed). - * + * * @return the type value. */ public ManagedServiceIdentityType type() { @@ -81,7 +86,7 @@ public ManagedServiceIdentityType type() { /** * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are * allowed). - * + * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. */ @@ -95,7 +100,7 @@ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { * 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. - * + * * @return the userAssignedIdentities value. */ public Map userAssignedIdentities() { @@ -107,7 +112,7 @@ public Map userAssignedIdentities() { * 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. - * + * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedServiceIdentity object itself. */ @@ -118,24 +123,20 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } 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 777682e979bbc..34edd004a298a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java @@ -8,24 +8,34 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ +/** + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** Static value None for ManagedServiceIdentityType. */ + /** + * Static value None for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType NONE = fromString("None"); - /** Static value SystemAssigned for ManagedServiceIdentityType. */ + /** + * Static value SystemAssigned for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - /** Static value UserAssigned for ManagedServiceIdentityType. */ + /** + * Static value UserAssigned for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - /** Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = - fromString("SystemAssigned,UserAssigned"); + /** + * Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED + = fromString("SystemAssigned,UserAssigned"); /** * Creates a new instance of ManagedServiceIdentityType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +44,7 @@ public ManagedServiceIdentityType() { /** * Creates or finds a ManagedServiceIdentityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedServiceIdentityType. */ @@ -45,7 +55,7 @@ public static ManagedServiceIdentityType fromString(String name) { /** * Gets known ManagedServiceIdentityType values. - * + * * @return known ManagedServiceIdentityType values. */ public static Collection values() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbook.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbook.java deleted file mode 100644 index 5c594f30c614a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbook.java +++ /dev/null @@ -1,606 +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.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of MyWorkbook. */ -public interface MyWorkbook { - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the identity property: Identity used for BYOS. - * - * @return the identity value. - */ - MyWorkbookManagedIdentity identity(); - - /** - * Gets the id property: Azure resource Id. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: Azure resource name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: Azure resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Resource etag. - * - * @return the etag value. - */ - Map etag(); - - /** - * Gets the kind property: The kind of workbook. Choices are user and shared. - * - * @return the kind value. - */ - Kind kind(); - - /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the displayName property: The user-defined name of the private workbook. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the serializedData property: Configuration of this particular private workbook. Configuration data is a - * string containing valid JSON. - * - * @return the serializedData value. - */ - String serializedData(); - - /** - * Gets the version property: This instance's version of the data model. This can change as new features are added - * that can be marked private workbook. - * - * @return the version value. - */ - String version(); - - /** - * Gets the timeModified property: Date and time in UTC of the last modification that was made to this private - * workbook definition. - * - * @return the timeModified value. - */ - String timeModified(); - - /** - * Gets the category property: Workbook category, as defined by the user at creation time. - * - * @return the category value. - */ - String category(); - - /** - * Gets the tagsPropertiesTags property: A list of 0 or more tags that are associated with this private workbook - * definition. - * - * @return the tagsPropertiesTags value. - */ - List tagsPropertiesTags(); - - /** - * Gets the userId property: Unique user id of the specific user that owns this private workbook. - * - * @return the userId value. - */ - String userId(); - - /** - * Gets the sourceId property: Optional resourceId for a source resource. - * - * @return the sourceId value. - */ - String sourceId(); - - /** - * Gets the storageUri property: BYOS Storage Account URI. - * - * @return the storageUri value. - */ - String storageUri(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner object. - * - * @return the inner object. - */ - MyWorkbookInner innerModel(); - - /** The entirety of the MyWorkbook definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { - } - - /** The MyWorkbook definition stages. */ - interface DefinitionStages { - /** The first stage of the MyWorkbook definition. */ - interface Blank extends WithLocation { - } - - /** The stage of the MyWorkbook definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** The stage of the MyWorkbook definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the MyWorkbook definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithName, - DefinitionStages.WithType, - DefinitionStages.WithEtag, - DefinitionStages.WithKind, - DefinitionStages.WithDisplayName, - DefinitionStages.WithSerializedData, - DefinitionStages.WithVersion, - DefinitionStages.WithCategory, - DefinitionStages.WithTagsPropertiesTags, - DefinitionStages.WithSourceId, - DefinitionStages.WithStorageUri, - DefinitionStages.WithSourceIdParameter { - /** - * Executes the create request. - * - * @return the created resource. - */ - MyWorkbook create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - MyWorkbook create(Context context); - } - - /** The stage of the MyWorkbook definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** The stage of the MyWorkbook definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Identity used for BYOS. - * - * @param identity Identity used for BYOS. - * @return the next definition stage. - */ - WithCreate withIdentity(MyWorkbookManagedIdentity identity); - } - - /** The stage of the MyWorkbook definition allowing to specify name. */ - interface WithName { - /** - * Specifies the name property: Azure resource name. - * - * @param name Azure resource name. - * @return the next definition stage. - */ - WithCreate withName(String name); - } - - /** The stage of the MyWorkbook definition allowing to specify type. */ - interface WithType { - /** - * Specifies the type property: Azure resource type. - * - * @param type Azure resource type. - * @return the next definition stage. - */ - WithCreate withType(String type); - } - - /** The stage of the MyWorkbook definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Resource etag. - * - * @param etag Resource etag. - * @return the next definition stage. - */ - WithCreate withEtag(Map etag); - } - - /** The stage of the MyWorkbook definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of workbook. Choices are user and shared.. - * - * @param kind The kind of workbook. Choices are user and shared. - * @return the next definition stage. - */ - WithCreate withKind(Kind kind); - } - - /** The stage of the MyWorkbook definition allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The user-defined name of the private workbook.. - * - * @param displayName The user-defined name of the private workbook. - * @return the next definition stage. - */ - WithCreate withDisplayName(String displayName); - } - - /** The stage of the MyWorkbook definition allowing to specify serializedData. */ - interface WithSerializedData { - /** - * Specifies the serializedData property: Configuration of this particular private workbook. Configuration - * data is a string containing valid JSON. - * - * @param serializedData Configuration of this particular private workbook. Configuration data is a string - * containing valid JSON. - * @return the next definition stage. - */ - WithCreate withSerializedData(String serializedData); - } - - /** The stage of the MyWorkbook definition allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: This instance's version of the data model. This can change as new - * features are added that can be marked private workbook.. - * - * @param version This instance's version of the data model. This can change as new features are added that - * can be marked private workbook. - * @return the next definition stage. - */ - WithCreate withVersion(String version); - } - - /** The stage of the MyWorkbook definition allowing to specify category. */ - interface WithCategory { - /** - * Specifies the category property: Workbook category, as defined by the user at creation time.. - * - * @param category Workbook category, as defined by the user at creation time. - * @return the next definition stage. - */ - WithCreate withCategory(String category); - } - - /** The stage of the MyWorkbook definition allowing to specify tagsPropertiesTags. */ - interface WithTagsPropertiesTags { - /** - * Specifies the tagsPropertiesTags property: A list of 0 or more tags that are associated with this private - * workbook definition. - * - * @param tagsPropertiesTags A list of 0 or more tags that are associated with this private workbook - * definition. - * @return the next definition stage. - */ - WithCreate withTagsPropertiesTags(List tagsPropertiesTags); - } - - /** The stage of the MyWorkbook definition allowing to specify sourceId. */ - interface WithSourceId { - /** - * Specifies the sourceId property: Optional resourceId for a source resource.. - * - * @param sourceId Optional resourceId for a source resource. - * @return the next definition stage. - */ - WithCreate withSourceId(String sourceId); - } - - /** The stage of the MyWorkbook definition allowing to specify storageUri. */ - interface WithStorageUri { - /** - * Specifies the storageUri property: BYOS Storage Account URI. - * - * @param storageUri BYOS Storage Account URI. - * @return the next definition stage. - */ - WithCreate withStorageUri(String storageUri); - } - - /** The stage of the MyWorkbook definition allowing to specify sourceId. */ - interface WithSourceIdParameter { - /** - * Specifies the sourceId property: Azure Resource Id that will fetch all linked workbooks.. - * - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @return the next definition stage. - */ - WithCreate withSourceIdParameter(String sourceId); - } - } - - /** - * Begins update for the MyWorkbook resource. - * - * @return the stage of resource update. - */ - MyWorkbook.Update update(); - - /** The template for MyWorkbook update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithEtag, - UpdateStages.WithKind, - UpdateStages.WithDisplayName, - UpdateStages.WithSerializedData, - UpdateStages.WithVersion, - UpdateStages.WithCategory, - UpdateStages.WithTagsPropertiesTags, - UpdateStages.WithSourceId, - UpdateStages.WithStorageUri, - UpdateStages.WithSourceIdParameter { - /** - * Executes the update request. - * - * @return the updated resource. - */ - MyWorkbook apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - MyWorkbook apply(Context context); - } - - /** The MyWorkbook update stages. */ - interface UpdateStages { - /** The stage of the MyWorkbook update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** The stage of the MyWorkbook update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Identity used for BYOS. - * - * @param identity Identity used for BYOS. - * @return the next definition stage. - */ - Update withIdentity(MyWorkbookManagedIdentity identity); - } - - /** The stage of the MyWorkbook update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Resource etag. - * - * @param etag Resource etag. - * @return the next definition stage. - */ - Update withEtag(Map etag); - } - - /** The stage of the MyWorkbook update allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of workbook. Choices are user and shared.. - * - * @param kind The kind of workbook. Choices are user and shared. - * @return the next definition stage. - */ - Update withKind(Kind kind); - } - - /** The stage of the MyWorkbook update allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The user-defined name of the private workbook.. - * - * @param displayName The user-defined name of the private workbook. - * @return the next definition stage. - */ - Update withDisplayName(String displayName); - } - - /** The stage of the MyWorkbook update allowing to specify serializedData. */ - interface WithSerializedData { - /** - * Specifies the serializedData property: Configuration of this particular private workbook. Configuration - * data is a string containing valid JSON. - * - * @param serializedData Configuration of this particular private workbook. Configuration data is a string - * containing valid JSON. - * @return the next definition stage. - */ - Update withSerializedData(String serializedData); - } - - /** The stage of the MyWorkbook update allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: This instance's version of the data model. This can change as new - * features are added that can be marked private workbook.. - * - * @param version This instance's version of the data model. This can change as new features are added that - * can be marked private workbook. - * @return the next definition stage. - */ - Update withVersion(String version); - } - - /** The stage of the MyWorkbook update allowing to specify category. */ - interface WithCategory { - /** - * Specifies the category property: Workbook category, as defined by the user at creation time.. - * - * @param category Workbook category, as defined by the user at creation time. - * @return the next definition stage. - */ - Update withCategory(String category); - } - - /** The stage of the MyWorkbook update allowing to specify tagsPropertiesTags. */ - interface WithTagsPropertiesTags { - /** - * Specifies the tagsPropertiesTags property: A list of 0 or more tags that are associated with this private - * workbook definition. - * - * @param tagsPropertiesTags A list of 0 or more tags that are associated with this private workbook - * definition. - * @return the next definition stage. - */ - Update withTagsPropertiesTags(List tagsPropertiesTags); - } - - /** The stage of the MyWorkbook update allowing to specify sourceId. */ - interface WithSourceId { - /** - * Specifies the sourceId property: Optional resourceId for a source resource.. - * - * @param sourceId Optional resourceId for a source resource. - * @return the next definition stage. - */ - Update withSourceId(String sourceId); - } - - /** The stage of the MyWorkbook update allowing to specify storageUri. */ - interface WithStorageUri { - /** - * Specifies the storageUri property: BYOS Storage Account URI. - * - * @param storageUri BYOS Storage Account URI. - * @return the next definition stage. - */ - Update withStorageUri(String storageUri); - } - - /** The stage of the MyWorkbook update allowing to specify sourceId. */ - interface WithSourceIdParameter { - /** - * Specifies the sourceId property: Azure Resource Id that will fetch all linked workbooks.. - * - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @return the next definition stage. - */ - Update withSourceIdParameter(String sourceId); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - MyWorkbook refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - MyWorkbook refresh(Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookManagedIdentity.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookManagedIdentity.java deleted file mode 100644 index 0821945476a40..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookManagedIdentity.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Customer Managed Identity. */ -@Fluent -public final class MyWorkbookManagedIdentity { - /* - * Customer Managed Identity - */ - @JsonProperty(value = "userAssignedIdentities") - private MyWorkbookUserAssignedIdentities userAssignedIdentities; - - /* - * The identity type. - */ - @JsonProperty(value = "type") - private MyWorkbookManagedIdentityType type; - - /** Creates an instance of MyWorkbookManagedIdentity class. */ - public MyWorkbookManagedIdentity() { - } - - /** - * Get the userAssignedIdentities property: Customer Managed Identity. - * - * @return the userAssignedIdentities value. - */ - public MyWorkbookUserAssignedIdentities userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: Customer Managed Identity. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the MyWorkbookManagedIdentity object itself. - */ - public MyWorkbookManagedIdentity withUserAssignedIdentities( - MyWorkbookUserAssignedIdentities userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Get the type property: The identity type. - * - * @return the type value. - */ - public MyWorkbookManagedIdentityType type() { - return this.type; - } - - /** - * Set the type property: The identity type. - * - * @param type the type value to set. - * @return the MyWorkbookManagedIdentity object itself. - */ - public MyWorkbookManagedIdentity withType(MyWorkbookManagedIdentityType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedIdentities() != null) { - userAssignedIdentities().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookManagedIdentityType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookManagedIdentityType.java deleted file mode 100644 index ce57f761aed8d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookManagedIdentityType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** The identity type. */ -public final class MyWorkbookManagedIdentityType extends ExpandableStringEnum { - /** Static value UserAssigned for MyWorkbookManagedIdentityType. */ - public static final MyWorkbookManagedIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** Static value None for MyWorkbookManagedIdentityType. */ - public static final MyWorkbookManagedIdentityType NONE = fromString("None"); - - /** - * Creates a new instance of MyWorkbookManagedIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MyWorkbookManagedIdentityType() { - } - - /** - * Creates or finds a MyWorkbookManagedIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MyWorkbookManagedIdentityType. - */ - @JsonCreator - public static MyWorkbookManagedIdentityType fromString(String name) { - return fromString(name, MyWorkbookManagedIdentityType.class); - } - - /** - * Gets known MyWorkbookManagedIdentityType values. - * - * @return known MyWorkbookManagedIdentityType values. - */ - public static Collection values() { - return values(MyWorkbookManagedIdentityType.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookResource.java deleted file mode 100644 index d61e01fbd812d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookResource.java +++ /dev/null @@ -1,175 +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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** An azure resource object. */ -@Fluent -public class MyWorkbookResource extends Resource { - /* - * Identity used for BYOS - */ - @JsonProperty(value = "identity") - private MyWorkbookManagedIdentity identity; - - /* - * Azure resource Id - */ - @JsonProperty(value = "id") - private String id; - - /* - * Azure resource name - */ - @JsonProperty(value = "name") - private String name; - - /* - * Azure resource type - */ - @JsonProperty(value = "type") - private String type; - - /* - * Resource etag - */ - @JsonProperty(value = "etag") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map etag; - - /** Creates an instance of MyWorkbookResource class. */ - public MyWorkbookResource() { - } - - /** - * Get the identity property: Identity used for BYOS. - * - * @return the identity value. - */ - public MyWorkbookManagedIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Identity used for BYOS. - * - * @param identity the identity value to set. - * @return the MyWorkbookResource object itself. - */ - public MyWorkbookResource withIdentity(MyWorkbookManagedIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the id property: Azure resource Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Azure resource Id. - * - * @param id the id value to set. - * @return the MyWorkbookResource object itself. - */ - public MyWorkbookResource withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Azure resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Azure resource name. - * - * @param name the name value to set. - * @return the MyWorkbookResource object itself. - */ - public MyWorkbookResource withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: Azure resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Azure resource type. - * - * @param type the type value to set. - * @return the MyWorkbookResource object itself. - */ - public MyWorkbookResource withType(String type) { - this.type = type; - return this; - } - - /** - * Get the etag property: Resource etag. - * - * @return the etag value. - */ - public Map etag() { - return this.etag; - } - - /** - * Set the etag property: Resource etag. - * - * @param etag the etag value to set. - * @return the MyWorkbookResource object itself. - */ - public MyWorkbookResource withEtag(Map etag) { - this.etag = etag; - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookResource 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(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookUserAssignedIdentities.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookUserAssignedIdentities.java deleted file mode 100644 index 60c809d285ed7..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookUserAssignedIdentities.java +++ /dev/null @@ -1,54 +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.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Customer Managed Identity. */ -@Immutable -public final class MyWorkbookUserAssignedIdentities { - /* - * The principal ID of resource identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; - - /* - * The tenant ID of resource. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** Creates an instance of MyWorkbookUserAssignedIdentities class. */ - public MyWorkbookUserAssignedIdentities() { - } - - /** - * Get the principalId property: The principal ID of resource identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of resource. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooks.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooks.java deleted file mode 100644 index 16ee6a531fbec..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooks.java +++ /dev/null @@ -1,192 +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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import java.util.List; - -/** Resource collection API of MyWorkbooks. */ -public interface MyWorkbooks { - /** - * Get all private 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.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category); - - /** - * Get all private 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.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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 all private 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.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(CategoryType category); - - /** - * Get all private 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 com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private 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 a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - MyWorkbook getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Get a single private workbook by its resourceName. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName along with {@link Response}. - */ - MyWorkbook getById(String id); - - /** - * Get a single private workbook by its resourceName. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a private workbook. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a private workbook. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new MyWorkbook resource. - * - * @param name resource name. - * @return the first stage of the new MyWorkbook definition. - */ - MyWorkbook.DefinitionStages.Blank define(String name); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooksListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooksListResult.java deleted file mode 100644 index aaf2279cb0ca4..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooksListResult.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Workbook list result. */ -@Fluent -public final class MyWorkbooksListResult { - /* - * An array of private workbooks. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The nextLink property. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** Creates an instance of MyWorkbooksListResult class. */ - public MyWorkbooksListResult() { - } - - /** - * Get the value property: An array of private workbooks. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The nextLink property. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The nextLink property. - * - * @param nextLink the nextLink value to set. - * @return the MyWorkbooksListResult object itself. - */ - public MyWorkbooksListResult 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()); - } - } -} 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 6ab1a1e945ca4..be1340bc1ffc7 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 @@ -6,25 +6,27 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: Operation name: {provider}/{resource}/{operation}. - * + * * @return the name value. */ String name(); /** * Gets the display property: The object that represents the operation. - * + * * @return the display value. */ OperationDisplay display(); /** * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); 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 4e5513bbcdb0b..0dfa08ca9b1e1 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The object that represents the operation. */ +/** + * The object that represents the operation. + */ @Fluent public final class OperationDisplay { /* @@ -28,13 +30,15 @@ public final class OperationDisplay { @JsonProperty(value = "operation") private String operation; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: Service provider: Microsoft.Insights. - * + * * @return the provider value. */ public String provider() { @@ -43,7 +47,7 @@ public String provider() { /** * Set the provider property: Service provider: Microsoft.Insights. - * + * * @param provider the provider value to set. * @return the OperationDisplay object itself. */ @@ -54,7 +58,7 @@ public OperationDisplay withProvider(String provider) { /** * Get the resource property: Resource on which the operation is performed: Profile, endpoint, etc. - * + * * @return the resource value. */ public String resource() { @@ -63,7 +67,7 @@ public String resource() { /** * Set the resource property: Resource on which the operation is performed: Profile, endpoint, etc. - * + * * @param resource the resource value to set. * @return the OperationDisplay object itself. */ @@ -74,7 +78,7 @@ public OperationDisplay withResource(String resource) { /** * Get the operation property: Operation type: Read, write, delete, etc. - * + * * @return the operation value. */ public String operation() { @@ -83,7 +87,7 @@ public String operation() { /** * Set the operation property: Operation type: Read, write, delete, etc. - * + * * @param operation the operation value to set. * @return the OperationDisplay object itself. */ @@ -94,7 +98,7 @@ public OperationDisplay withOperation(String operation) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java index 9f1f0669e402d..a997913e0d222 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java @@ -27,13 +27,15 @@ public final class OperationListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of OperationListResult class. */ + /** + * Creates an instance of OperationListResult class. + */ public OperationListResult() { } /** * Get the value property: List of Workbook operations supported by the Microsoft.Insights resource provider. - * + * * @return the value value. */ public List value() { @@ -42,7 +44,7 @@ public List 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. */ @@ -53,7 +55,7 @@ public OperationListResult withValue(List value) { /** * Get the nextLink property: URL to get the next set of operation list results if there are any. - * + * * @return the nextLink value. */ public String nextLink() { @@ -62,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: URL to get the next set of operation list results if there are any. - * + * * @param nextLink the nextLink value to set. * @return the OperationListResult object itself. */ @@ -73,7 +75,7 @@ public OperationListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java index f9de153a4a05b..39809eff3df4b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java @@ -7,27 +7,29 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * Lists all of the available insights REST API operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations as paginated response with {@link - * PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * Lists all of the available insights REST API operations. - * + * * @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 {@link - * PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java index c1323664a3f15..270e2b1add98a 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The private link scope resource reference. */ +/** + * The private link scope resource reference. + */ @Fluent public final class PrivateLinkScopedResource { /* @@ -22,13 +24,15 @@ public final class PrivateLinkScopedResource { @JsonProperty(value = "ScopeId") private String scopeId; - /** Creates an instance of PrivateLinkScopedResource class. */ + /** + * Creates an instance of PrivateLinkScopedResource class. + */ public PrivateLinkScopedResource() { } /** * Get the resourceId property: The full resource Id of the private link scope resource. - * + * * @return the resourceId value. */ public String resourceId() { @@ -37,7 +41,7 @@ public String resourceId() { /** * Set the resourceId property: The full resource Id of the private link scope resource. - * + * * @param resourceId the resourceId value to set. * @return the PrivateLinkScopedResource object itself. */ @@ -48,7 +52,7 @@ public PrivateLinkScopedResource withResourceId(String resourceId) { /** * Get the scopeId property: The private link scope unique Identifier. - * + * * @return the scopeId value. */ public String scopeId() { @@ -57,7 +61,7 @@ public String scopeId() { /** * Set the scopeId property: The private link scope unique Identifier. - * + * * @param scopeId the scopeId value to set. * @return the PrivateLinkScopedResource object itself. */ @@ -68,7 +72,7 @@ public PrivateLinkScopedResource withScopeId(String scopeId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java index 32c32468d7cc0..f2fd9a209ef02 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java @@ -9,26 +9,28 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; import java.util.List; -/** Resource collection API of ProactiveDetectionConfigurations. */ +/** + * Resource collection API of ProactiveDetectionConfigurations. + */ public interface ProactiveDetectionConfigurations { /** * Gets a list of ProactiveDetection configurations of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component along with {@link - * Response}. + * @return a list of ProactiveDetection configurations of an Application Insights component along with + * {@link Response}. */ - Response> listWithResponse( - String resourceGroupName, String resourceName, Context context); + Response> + listWithResponse(String resourceGroupName, String resourceName, Context context); /** * Gets a list of ProactiveDetection configurations of an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -36,79 +38,74 @@ Response> list * @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. */ - List list( - String resourceGroupName, String resourceName); + List list(String resourceGroupName, + String resourceName); /** * 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. + * component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the ProactiveDetection configuration for this configuration id along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String resourceName, String configurationId, Context context); + Response getWithResponse(String resourceGroupName, + String resourceName, String configurationId, Context context); /** * 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. + * 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 the ProactiveDetection configuration for this configuration id. */ - ApplicationInsightsComponentProactiveDetectionConfiguration get( - String resourceGroupName, String resourceName, String configurationId); + ApplicationInsightsComponentProactiveDetectionConfiguration get(String resourceGroupName, String resourceName, + String configurationId); /** * 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. + * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. + * configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define a ProactiveDetection configuration along with {@link Response}. */ - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - Context context); + Response updateWithResponse(String resourceGroupName, + String resourceName, String configurationId, + ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, Context context); /** * 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. + * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. + * configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties that define a ProactiveDetection configuration. */ - ApplicationInsightsComponentProactiveDetectionConfiguration update( - String resourceGroupName, - String resourceName, + ApplicationInsightsComponentProactiveDetectionConfiguration update(String resourceGroupName, String resourceName, String configurationId, ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PublicNetworkAccessType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PublicNetworkAccessType.java index 2ab0528d9db4d..663e46bab9586 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PublicNetworkAccessType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PublicNetworkAccessType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The network access type for operating on the Application Insights Component. By default it is Enabled. */ +/** + * The network access type for operating on the Application Insights Component. By default it is Enabled. + */ public final class PublicNetworkAccessType extends ExpandableStringEnum { - /** Static value Enabled for PublicNetworkAccessType. */ + /** + * Static value Enabled for PublicNetworkAccessType. + */ public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); - /** Static value Disabled for PublicNetworkAccessType. */ + /** + * Static value Disabled for PublicNetworkAccessType. + */ public static final PublicNetworkAccessType DISABLED = fromString("Disabled"); /** * Creates a new instance of PublicNetworkAccessType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public PublicNetworkAccessType() { /** * Creates or finds a PublicNetworkAccessType from its string representation. - * + * * @param name a name to look for. * @return the corresponding PublicNetworkAccessType. */ @@ -38,7 +44,7 @@ public static PublicNetworkAccessType fromString(String name) { /** * Gets known PublicNetworkAccessType values. - * + * * @return known PublicNetworkAccessType values. */ public static Collection values() { 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 f023b01726667..6d618b0e7ff6e 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 @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Status of the operation represented by the requested Id. */ +/** + * Status of the operation represented by the requested Id. + */ public final class PurgeState extends ExpandableStringEnum { - /** Static value pending for PurgeState. */ + /** + * Static value pending for PurgeState. + */ public static final PurgeState PENDING = fromString("pending"); - /** Static value completed for PurgeState. */ + /** + * Static value completed for PurgeState. + */ public static final PurgeState COMPLETED = fromString("completed"); /** * Creates a new instance of PurgeState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public PurgeState() { /** * Creates or finds a PurgeState from its string representation. - * + * * @param name a name to look for. * @return the corresponding PurgeState. */ @@ -38,7 +44,7 @@ public static PurgeState fromString(String name) { /** * Gets known PurgeState values. - * + * * @return known PurgeState values. */ public static Collection values() { 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 bca68ff30e18e..1ebe13c9f243d 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 @@ -13,12 +13,14 @@ * default 'rest'. */ public final class RequestSource extends ExpandableStringEnum { - /** Static value rest for RequestSource. */ + /** + * Static value rest for RequestSource. + */ public static final RequestSource REST = fromString("rest"); /** * Creates a new instance of RequestSource value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +29,7 @@ public RequestSource() { /** * Creates or finds a RequestSource from its string representation. - * + * * @param name a name to look for. * @return the corresponding RequestSource. */ @@ -38,7 +40,7 @@ public static RequestSource fromString(String name) { /** * Gets known RequestSource values. - * + * * @return known RequestSource values. */ public static Collection values() { 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 new file mode 100644 index 0000000000000..3d08b3db32f0a --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java @@ -0,0 +1,48 @@ +// 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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for StorageType. + */ +public final class StorageType extends ExpandableStringEnum { + /** + * Static value ServiceProfiler for StorageType. + */ + public static final StorageType SERVICE_PROFILER = fromString("ServiceProfiler"); + + /** + * Creates a new instance of StorageType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageType() { + } + + /** + * Creates or finds a StorageType from its string representation. + * + * @param name a name to look for. + * @return the corresponding StorageType. + */ + @JsonCreator + public static StorageType fromString(String name) { + return fromString(name, StorageType.class); + } + + /** + * Gets known StorageType values. + * + * @return known StorageType values. + */ + public static Collection values() { + return values(StorageType.class); + } +} 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 4c9b189f27b85..3113ceef91eae 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance. */ +/** + * A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance. + */ @Fluent public final class TagsResource { /* @@ -19,13 +21,15 @@ public final class TagsResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of TagsResource class. */ + /** + * Creates an instance of TagsResource class. + */ public TagsResource() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the TagsResource object itself. */ @@ -45,7 +49,7 @@ public TagsResource withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java index e366fe3b4bdd6..3e8b984d80398 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; -/** User assigned identity properties. */ +/** + * User assigned identity properties. + */ @Immutable public final class UserAssignedIdentity { /* @@ -23,13 +25,15 @@ public final class UserAssignedIdentity { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; - /** Creates an instance of UserAssignedIdentity class. */ + /** + * Creates an instance of UserAssignedIdentity class. + */ public UserAssignedIdentity() { } /** * Get the principalId property: The principal ID of the assigned identity. - * + * * @return the principalId value. */ public UUID principalId() { @@ -38,7 +42,7 @@ public UUID principalId() { /** * Get the clientId property: The client ID of the assigned identity. - * + * * @return the clientId value. */ public UUID clientId() { @@ -47,7 +51,7 @@ public UUID clientId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java index 74e00037d52df..6b17fa3e322cb 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 @@ -10,46 +10,48 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of WebTest. */ +/** + * An immutable client-side representation of WebTest. + */ public interface WebTest { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the kind property: The kind of WebTest that this web test watches. Choices are ping, multistep and standard. - * + * * @return the kind value. */ WebTestKind kind(); @@ -57,56 +59,56 @@ public interface WebTest { /** * Gets the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name * field. - * + * * @return the syntheticMonitorId value. */ String syntheticMonitorId(); /** * Gets the webTestName property: User defined name if this WebTest. - * + * * @return the webTestName value. */ String webTestName(); /** * Gets the description property: User defined description for this WebTest. - * + * * @return the description value. */ String description(); /** * Gets the enabled property: Is the test actively being monitored. - * + * * @return the enabled value. */ Boolean enabled(); /** * Gets the frequency property: Interval in seconds between test runs for this WebTest. Default value is 300. - * + * * @return the frequency value. */ Integer frequency(); /** * Gets the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30. - * + * * @return the timeout value. */ Integer timeout(); /** * Gets the webTestKind property: The kind of web test this is, valid choices are ping, multistep and standard. - * + * * @return the webTestKind value. */ WebTestKind webTestKind(); /** * Gets the retryEnabled property: Allow for retries should this WebTest fail. - * + * * @return the retryEnabled value. */ Boolean retryEnabled(); @@ -114,14 +116,14 @@ public interface WebTest { /** * Gets the locations property: A list of where to physically run the tests from to give global coverage for * accessibility of your application. - * + * * @return the locations value. */ List locations(); /** * Gets the configuration property: An XML configuration specification for a WebTest. - * + * * @return the configuration value. */ WebTestPropertiesConfiguration configuration(); @@ -130,72 +132,77 @@ public interface WebTest { * Gets the provisioningState property: Current state of this component, whether or not is has been provisioned * within the resource group it is defined. Users cannot change this value but are able to read from it. Values will * include Succeeded, Deploying, Canceled, and Failed. - * + * * @return the provisioningState value. */ String provisioningState(); /** * Gets the request property: The collection of request properties. - * + * * @return the request value. */ WebTestPropertiesRequest request(); /** * Gets the validationRules property: The collection of validation rule properties. - * + * * @return the validationRules value. */ WebTestPropertiesValidationRules validationRules(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner object. - * + * * @return the inner object. */ WebTestInner innerModel(); - /** The entirety of the WebTest definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the WebTest definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The WebTest definition stages. */ + /** + * The WebTest definition stages. + */ interface DefinitionStages { - /** The first stage of the WebTest definition. */ + /** + * The first stage of the WebTest definition. + */ interface Blank extends WithLocation { } - /** The stage of the WebTest definition allowing to specify location. */ + /** + * The stage of the WebTest definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -203,18 +210,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the WebTest definition allowing to specify parent resource. */ + /** + * The stage of the WebTest definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -225,191 +234,209 @@ interface WithResourceGroup { * The stage of the WebTest definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithKind, - DefinitionStages.WithSyntheticMonitorId, - DefinitionStages.WithWebTestName, - DefinitionStages.WithDescription, - DefinitionStages.WithEnabled, - DefinitionStages.WithFrequency, - DefinitionStages.WithTimeout, - DefinitionStages.WithWebTestKind, - DefinitionStages.WithRetryEnabled, - DefinitionStages.WithLocations, - DefinitionStages.WithConfiguration, - DefinitionStages.WithRequest, - DefinitionStages.WithValidationRules { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithKind, + DefinitionStages.WithSyntheticMonitorId, DefinitionStages.WithWebTestName, DefinitionStages.WithDescription, + DefinitionStages.WithEnabled, DefinitionStages.WithFrequency, DefinitionStages.WithTimeout, + DefinitionStages.WithWebTestKind, DefinitionStages.WithRetryEnabled, DefinitionStages.WithLocations, + DefinitionStages.WithConfiguration, DefinitionStages.WithRequest, DefinitionStages.WithValidationRules { /** * Executes the create request. - * + * * @return the created resource. */ WebTest create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WebTest create(Context context); } - /** The stage of the WebTest definition allowing to specify tags. */ + /** + * The stage of the WebTest definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the WebTest definition allowing to specify kind. */ + /** + * The stage of the WebTest definition allowing to specify kind. + */ interface WithKind { /** * Specifies the kind property: The kind of WebTest that this web test watches. Choices are ping, multistep * and standard.. - * + * * @param kind The kind of WebTest that this web test watches. Choices are ping, multistep and standard. * @return the next definition stage. */ WithCreate withKind(WebTestKind kind); } - /** The stage of the WebTest definition allowing to specify syntheticMonitorId. */ + /** + * The stage of the WebTest definition allowing to specify syntheticMonitorId. + */ interface WithSyntheticMonitorId { /** * Specifies the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as * the Name field.. - * + * * @param syntheticMonitorId Unique ID of this WebTest. This is typically the same value as the Name field. * @return the next definition stage. */ WithCreate withSyntheticMonitorId(String syntheticMonitorId); } - /** The stage of the WebTest definition allowing to specify webTestName. */ + /** + * The stage of the WebTest definition allowing to specify webTestName. + */ interface WithWebTestName { /** * Specifies the webTestName property: User defined name if this WebTest.. - * + * * @param webTestName User defined name if this WebTest. * @return the next definition stage. */ WithCreate withWebTestName(String webTestName); } - /** The stage of the WebTest definition allowing to specify description. */ + /** + * The stage of the WebTest definition allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: User defined description for this WebTest.. - * + * * @param description User defined description for this WebTest. * @return the next definition stage. */ WithCreate withDescription(String description); } - /** The stage of the WebTest definition allowing to specify enabled. */ + /** + * The stage of the WebTest definition allowing to specify enabled. + */ interface WithEnabled { /** * Specifies the enabled property: Is the test actively being monitored.. - * + * * @param enabled Is the test actively being monitored. * @return the next definition stage. */ WithCreate withEnabled(Boolean enabled); } - /** The stage of the WebTest definition allowing to specify frequency. */ + /** + * The stage of the WebTest definition allowing to specify frequency. + */ interface WithFrequency { /** * Specifies the frequency property: Interval in seconds between test runs for this WebTest. Default value * is 300.. - * + * * @param frequency Interval in seconds between test runs for this WebTest. Default value is 300. * @return the next definition stage. */ WithCreate withFrequency(Integer frequency); } - /** The stage of the WebTest definition allowing to specify timeout. */ + /** + * The stage of the WebTest definition allowing to specify timeout. + */ interface WithTimeout { /** * Specifies the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30.. - * + * * @param timeout Seconds until this WebTest will timeout and fail. Default value is 30. * @return the next definition stage. */ WithCreate withTimeout(Integer timeout); } - /** The stage of the WebTest definition allowing to specify webTestKind. */ + /** + * The stage of the WebTest definition allowing to specify webTestKind. + */ interface WithWebTestKind { /** * Specifies the webTestKind property: The kind of web test this is, valid choices are ping, multistep and * standard.. - * + * * @param webTestKind The kind of web test this is, valid choices are ping, multistep and standard. * @return the next definition stage. */ WithCreate withWebTestKind(WebTestKind webTestKind); } - /** The stage of the WebTest definition allowing to specify retryEnabled. */ + /** + * The stage of the WebTest definition allowing to specify retryEnabled. + */ interface WithRetryEnabled { /** * Specifies the retryEnabled property: Allow for retries should this WebTest fail.. - * + * * @param retryEnabled Allow for retries should this WebTest fail. * @return the next definition stage. */ WithCreate withRetryEnabled(Boolean retryEnabled); } - /** The stage of the WebTest definition allowing to specify locations. */ + /** + * The stage of the WebTest definition allowing to specify locations. + */ interface WithLocations { /** * Specifies the locations property: A list of where to physically run the tests from to give global * coverage for accessibility of your application.. - * + * * @param locations A list of where to physically run the tests from to give global coverage for - * accessibility of your application. + * accessibility of your application. * @return the next definition stage. */ WithCreate withLocations(List locations); } - /** The stage of the WebTest definition allowing to specify configuration. */ + /** + * The stage of the WebTest definition allowing to specify configuration. + */ interface WithConfiguration { /** * Specifies the configuration property: An XML configuration specification for a WebTest.. - * + * * @param configuration An XML configuration specification for a WebTest. * @return the next definition stage. */ WithCreate withConfiguration(WebTestPropertiesConfiguration configuration); } - /** The stage of the WebTest definition allowing to specify request. */ + /** + * The stage of the WebTest definition allowing to specify request. + */ interface WithRequest { /** * Specifies the request property: The collection of request properties. - * + * * @param request The collection of request properties. * @return the next definition stage. */ WithCreate withRequest(WebTestPropertiesRequest request); } - /** The stage of the WebTest definition allowing to specify validationRules. */ + /** + * The stage of the WebTest definition allowing to specify validationRules. + */ interface WithValidationRules { /** * Specifies the validationRules property: The collection of validation rule properties. - * + * * @param validationRules The collection of validation rule properties. * @return the next definition stage. */ @@ -419,36 +446,42 @@ interface WithValidationRules { /** * Begins update for the WebTest resource. - * + * * @return the stage of resource update. */ WebTest.Update update(); - /** The template for WebTest update. */ + /** + * The template for WebTest update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ WebTest apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WebTest apply(Context context); } - /** The WebTest update stages. */ + /** + * The WebTest update stages. + */ interface UpdateStages { - /** The stage of the WebTest update allowing to specify tags. */ + /** + * The stage of the WebTest update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -458,14 +491,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WebTest refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/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 a84c1125a708c..4d1735f023ec1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. */ +/** + * Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. + */ @Fluent public final class WebTestGeolocation { /* @@ -16,13 +18,15 @@ public final class WebTestGeolocation { @JsonProperty(value = "Id") private String location; - /** Creates an instance of WebTestGeolocation class. */ + /** + * Creates an instance of WebTestGeolocation class. + */ public WebTestGeolocation() { } /** * Get the location property: Location ID for the WebTest to run from. - * + * * @return the location value. */ public String location() { @@ -31,7 +35,7 @@ public String location() { /** * Set the location property: Location ID for the WebTest to run from. - * + * * @param location the location value to set. * @return the WebTestGeolocation object itself. */ @@ -42,7 +46,7 @@ public WebTestGeolocation withLocation(String location) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java index 473a3a5db9d7b..dac2fb6cb6908 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java @@ -7,18 +7,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** The kind of WebTest that this web test watches. Choices are ping, multistep and standard. */ +/** + * The kind of WebTest that this web test watches. Choices are ping, multistep and standard. + */ public enum WebTestKind { - /** Enum value ping. */ + /** + * Enum value ping. + */ PING("ping"), - /** Enum value multistep. */ + /** + * Enum value multistep. + */ MULTISTEP("multistep"), - /** Enum value standard. */ + /** + * Enum value standard. + */ STANDARD("standard"); - /** The actual serialized value for a WebTestKind instance. */ + /** + * The actual serialized value for a WebTestKind instance. + */ private final String value; WebTestKind(String value) { @@ -27,7 +37,7 @@ public enum WebTestKind { /** * Parses a serialized value to a WebTestKind instance. - * + * * @param value the serialized value to parse. * @return the parsed WebTestKind object, or null if unable to parse. */ @@ -45,7 +55,9 @@ public static WebTestKind fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java index a6df02b0d18d4..e86c19d0eb1da 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of 0 or more Application Insights WebTest definitions. */ +/** + * A list of 0 or more Application Insights WebTest definitions. + */ @Fluent public final class WebTestListResult { /* @@ -26,13 +28,15 @@ public final class WebTestListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of WebTestListResult class. */ + /** + * Creates an instance of WebTestListResult class. + */ public WebTestListResult() { } /** * Get the value property: Set of Application Insights WebTest definitions. - * + * * @return the value value. */ public List value() { @@ -41,7 +45,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. */ @@ -53,7 +57,7 @@ public WebTestListResult withValue(List value) { /** * Get the nextLink property: The link to get the next part of the returned list of WebTest, should the return set * be too large for a single request. May be null. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +67,7 @@ public String 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. */ @@ -74,14 +78,13 @@ public WebTestListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model WebTestListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model WebTestListResult")); } else { value().forEach(e -> e.validate()); } 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 897a7f53bf380..2de36f9458ebd 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 @@ -7,24 +7,26 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of WebTestLocations. */ +/** + * Resource collection API of WebTestLocations. + */ public interface WebTestLocations { /** * Gets a list of web test locations available to this 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 web test locations available to this Application Insights component as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName); /** * Gets a list of web test locations available to this 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. @@ -32,8 +34,8 @@ public interface WebTestLocations { * @throws com.azure.core.management.exception.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 PagedIterable}. + * {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String resourceName, Context context); + PagedIterable list(String resourceGroupName, String resourceName, + Context context); } 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 3b963ae9b5920..d0d2143056e8c 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** An XML configuration specification for a WebTest. */ +/** + * An XML configuration specification for a WebTest. + */ @Fluent public final class WebTestPropertiesConfiguration { /* @@ -16,13 +18,15 @@ public final class WebTestPropertiesConfiguration { @JsonProperty(value = "WebTest") private String webTest; - /** Creates an instance of WebTestPropertiesConfiguration class. */ + /** + * Creates an instance of WebTestPropertiesConfiguration class. + */ public WebTestPropertiesConfiguration() { } /** * Get the webTest property: The XML specification of a WebTest to run against an application. - * + * * @return the webTest value. */ public String webTest() { @@ -31,7 +35,7 @@ public String webTest() { /** * Set the webTest property: The XML specification of a WebTest to run against an application. - * + * * @param webTest the webTest value to set. * @return the WebTestPropertiesConfiguration object itself. */ @@ -42,7 +46,7 @@ public WebTestPropertiesConfiguration withWebTest(String webTest) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesRequest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesRequest.java index 8d66792503d95..ccec3b16cf0db 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The collection of request properties. */ +/** + * The collection of request properties. + */ @Fluent public final class WebTestPropertiesRequest { /* @@ -47,13 +49,15 @@ public final class WebTestPropertiesRequest { @JsonProperty(value = "FollowRedirects") private Boolean followRedirects; - /** Creates an instance of WebTestPropertiesRequest class. */ + /** + * Creates an instance of WebTestPropertiesRequest class. + */ public WebTestPropertiesRequest() { } /** * Get the requestUrl property: Url location to test. - * + * * @return the requestUrl value. */ public String requestUrl() { @@ -62,7 +66,7 @@ public String requestUrl() { /** * Set the requestUrl property: Url location to test. - * + * * @param requestUrl the requestUrl value to set. * @return the WebTestPropertiesRequest object itself. */ @@ -73,7 +77,7 @@ public WebTestPropertiesRequest withRequestUrl(String requestUrl) { /** * Get the headers property: List of headers and their values to add to the WebTest call. - * + * * @return the headers value. */ public List headers() { @@ -82,7 +86,7 @@ public List headers() { /** * Set the headers property: List of headers and their values to add to the WebTest call. - * + * * @param headers the headers value to set. * @return the WebTestPropertiesRequest object itself. */ @@ -93,7 +97,7 @@ public WebTestPropertiesRequest withHeaders(List headers) { /** * Get the httpVerb property: Http verb to use for this web test. - * + * * @return the httpVerb value. */ public String httpVerb() { @@ -102,7 +106,7 @@ public String httpVerb() { /** * Set the httpVerb property: Http verb to use for this web test. - * + * * @param httpVerb the httpVerb value to set. * @return the WebTestPropertiesRequest object itself. */ @@ -113,7 +117,7 @@ public WebTestPropertiesRequest withHttpVerb(String httpVerb) { /** * Get the requestBody property: Base64 encoded string body to send with this web test. - * + * * @return the requestBody value. */ public String requestBody() { @@ -122,7 +126,7 @@ public String requestBody() { /** * Set the requestBody property: Base64 encoded string body to send with this web test. - * + * * @param requestBody the requestBody value to set. * @return the WebTestPropertiesRequest object itself. */ @@ -133,7 +137,7 @@ public WebTestPropertiesRequest withRequestBody(String requestBody) { /** * Get the parseDependentRequests property: Parse Dependent request for this WebTest. - * + * * @return the parseDependentRequests value. */ public Boolean parseDependentRequests() { @@ -142,7 +146,7 @@ public Boolean parseDependentRequests() { /** * Set the parseDependentRequests property: Parse Dependent request for this WebTest. - * + * * @param parseDependentRequests the parseDependentRequests value to set. * @return the WebTestPropertiesRequest object itself. */ @@ -153,7 +157,7 @@ public WebTestPropertiesRequest withParseDependentRequests(Boolean parseDependen /** * Get the followRedirects property: Follow redirects for this web test. - * + * * @return the followRedirects value. */ public Boolean followRedirects() { @@ -162,7 +166,7 @@ public Boolean followRedirects() { /** * Set the followRedirects property: Follow redirects for this web test. - * + * * @param followRedirects the followRedirects value to set. * @return the WebTestPropertiesRequest object itself. */ @@ -173,7 +177,7 @@ public WebTestPropertiesRequest withFollowRedirects(Boolean followRedirects) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRules.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRules.java index 7125cd08397a5..796e52aadb92d 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The collection of validation rule properties. */ +/** + * The collection of validation rule properties. + */ @Fluent public final class WebTestPropertiesValidationRules { /* @@ -23,7 +25,7 @@ public final class WebTestPropertiesValidationRules { private Boolean sslCheck; /* - * A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the + * A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the * SSLCheck must be set to true. */ @JsonProperty(value = "SSLCertRemainingLifetimeCheck") @@ -41,13 +43,15 @@ public final class WebTestPropertiesValidationRules { @JsonProperty(value = "IgnoreHttpStatusCode") private Boolean ignoreHttpStatusCode; - /** Creates an instance of WebTestPropertiesValidationRules class. */ + /** + * Creates an instance of WebTestPropertiesValidationRules class. + */ public WebTestPropertiesValidationRules() { } /** * Get the contentValidation property: The collection of content validation properties. - * + * * @return the contentValidation value. */ public WebTestPropertiesValidationRulesContentValidation contentValidation() { @@ -56,19 +60,19 @@ public WebTestPropertiesValidationRulesContentValidation contentValidation() { /** * Set the contentValidation property: The collection of content validation properties. - * + * * @param contentValidation the contentValidation value to set. * @return the WebTestPropertiesValidationRules object itself. */ - public WebTestPropertiesValidationRules withContentValidation( - WebTestPropertiesValidationRulesContentValidation contentValidation) { + public WebTestPropertiesValidationRules + withContentValidation(WebTestPropertiesValidationRulesContentValidation contentValidation) { this.contentValidation = contentValidation; return this; } /** * Get the sslCheck property: Checks to see if the SSL cert is still valid. - * + * * @return the sslCheck value. */ public Boolean sslCheck() { @@ -77,7 +81,7 @@ public Boolean sslCheck() { /** * Set the sslCheck property: Checks to see if the SSL cert is still valid. - * + * * @param sslCheck the sslCheck value to set. * @return the WebTestPropertiesValidationRules object itself. */ @@ -89,7 +93,7 @@ public WebTestPropertiesValidationRules withSslCheck(Boolean sslCheck) { /** * Get the sslCertRemainingLifetimeCheck property: A number of days to check still remain before the the existing * SSL cert expires. Value must be positive and the SSLCheck must be set to true. - * + * * @return the sslCertRemainingLifetimeCheck value. */ public Integer sslCertRemainingLifetimeCheck() { @@ -99,7 +103,7 @@ public Integer sslCertRemainingLifetimeCheck() { /** * Set the sslCertRemainingLifetimeCheck property: A number of days to check still remain before the the existing * SSL cert expires. Value must be positive and the SSLCheck must be set to true. - * + * * @param sslCertRemainingLifetimeCheck the sslCertRemainingLifetimeCheck value to set. * @return the WebTestPropertiesValidationRules object itself. */ @@ -110,7 +114,7 @@ public WebTestPropertiesValidationRules withSslCertRemainingLifetimeCheck(Intege /** * Get the expectedHttpStatusCode property: Validate that the WebTest returns the http status code provided. - * + * * @return the expectedHttpStatusCode value. */ public Integer expectedHttpStatusCode() { @@ -119,7 +123,7 @@ public Integer expectedHttpStatusCode() { /** * Set the expectedHttpStatusCode property: Validate that the WebTest returns the http status code provided. - * + * * @param expectedHttpStatusCode the expectedHttpStatusCode value to set. * @return the WebTestPropertiesValidationRules object itself. */ @@ -130,7 +134,7 @@ public WebTestPropertiesValidationRules withExpectedHttpStatusCode(Integer expec /** * Get the ignoreHttpStatusCode property: When set, validation will ignore the status code. - * + * * @return the ignoreHttpStatusCode value. */ public Boolean ignoreHttpStatusCode() { @@ -139,7 +143,7 @@ public Boolean ignoreHttpStatusCode() { /** * Set the ignoreHttpStatusCode property: When set, validation will ignore the status code. - * + * * @param ignoreHttpStatusCode the ignoreHttpStatusCode value to set. * @return the WebTestPropertiesValidationRules object itself. */ @@ -150,7 +154,7 @@ public WebTestPropertiesValidationRules withIgnoreHttpStatusCode(Boolean ignoreH /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRulesContentValidation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRulesContentValidation.java index fddc35e6d0225..6431240c5dcd1 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 @@ -7,11 +7,13 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The collection of content validation properties. */ +/** + * The collection of content validation properties. + */ @Fluent public final class WebTestPropertiesValidationRulesContentValidation { /* - * Content to look for in the return of the WebTest. Must not be null or empty. + * Content to look for in the return of the WebTest. Must not be null or empty. */ @JsonProperty(value = "ContentMatch") private String contentMatch; @@ -23,19 +25,21 @@ public final class WebTestPropertiesValidationRulesContentValidation { private Boolean ignoreCase; /* - * When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail + * When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail * if there is a match */ @JsonProperty(value = "PassIfTextFound") private Boolean passIfTextFound; - /** Creates an instance of WebTestPropertiesValidationRulesContentValidation class. */ + /** + * Creates an instance of WebTestPropertiesValidationRulesContentValidation class. + */ public WebTestPropertiesValidationRulesContentValidation() { } /** * Get the contentMatch property: Content to look for in the return of the WebTest. Must not be null or empty. - * + * * @return the contentMatch value. */ public String contentMatch() { @@ -44,7 +48,7 @@ public String contentMatch() { /** * Set the contentMatch property: Content to look for in the return of the WebTest. Must not be null or empty. - * + * * @param contentMatch the contentMatch value to set. * @return the WebTestPropertiesValidationRulesContentValidation object itself. */ @@ -55,7 +59,7 @@ public WebTestPropertiesValidationRulesContentValidation withContentMatch(String /** * Get the ignoreCase property: When set, this value makes the ContentMatch validation case insensitive. - * + * * @return the ignoreCase value. */ public Boolean ignoreCase() { @@ -64,7 +68,7 @@ public Boolean ignoreCase() { /** * Set the ignoreCase property: When set, this value makes the ContentMatch validation case insensitive. - * + * * @param ignoreCase the ignoreCase value to set. * @return the WebTestPropertiesValidationRulesContentValidation object itself. */ @@ -76,7 +80,7 @@ public WebTestPropertiesValidationRulesContentValidation withIgnoreCase(Boolean /** * Get the passIfTextFound property: When true, validation will pass if there is a match for the ContentMatch * string. If false, validation will fail if there is a match. - * + * * @return the passIfTextFound value. */ public Boolean passIfTextFound() { @@ -86,7 +90,7 @@ public Boolean passIfTextFound() { /** * Set the passIfTextFound property: When true, validation will pass if there is a match for the ContentMatch * string. If false, validation will fail if there is a match. - * + * * @param passIfTextFound the passIfTextFound value to set. * @return the WebTestPropertiesValidationRulesContentValidation object itself. */ @@ -97,7 +101,7 @@ public WebTestPropertiesValidationRulesContentValidation withPassIfTextFound(Boo /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java index 03c92aa7cd23e..681627b9d87f0 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 @@ -8,36 +8,38 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of WebTests. */ +/** + * Resource collection API of WebTests. + */ public interface WebTests { /** * 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}. + * {@link PagedIterable}. */ 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}. + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Get a specific Application Insights web test definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @param context The context to associate with this operation. @@ -50,7 +52,7 @@ public interface WebTests { /** * Get a specific Application Insights web test definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -62,7 +64,7 @@ public interface WebTests { /** * 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. @@ -75,7 +77,7 @@ public interface WebTests { /** * 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. @@ -86,56 +88,56 @@ public interface WebTests { /** * Get all Application Insights web test definitions for the specified subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Application Insights web test definitions for the specified subscription as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable list(); /** * Get all Application Insights web test definitions for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Application Insights web test definitions for the specified subscription as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable list(Context context); /** * Get all Application Insights web tests defined for the specified component. - * + * * @param componentName The name of the Application Insights component resource. * @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 component as paginated response with {@link - * PagedIterable}. + * @return all Application Insights web tests defined for the specified component as paginated response with + * {@link PagedIterable}. */ PagedIterable listByComponent(String componentName, String resourceGroupName); /** * Get all Application Insights web tests defined for the specified component. - * + * * @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 com.azure.core.management.exception.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 - * PagedIterable}. + * @return all Application Insights web tests defined for the specified component as paginated response with + * {@link PagedIterable}. */ PagedIterable listByComponent(String componentName, String resourceGroupName, Context context); /** * Get a specific Application Insights web test definition. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -146,7 +148,7 @@ public interface WebTests { /** * Get a specific Application Insights web test definition. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -158,7 +160,7 @@ public interface WebTests { /** * Deletes an Application Insights web test. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -168,7 +170,7 @@ public interface WebTests { /** * Deletes an Application Insights web test. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,7 +182,7 @@ public interface WebTests { /** * Begins definition for a new WebTest resource. - * + * * @param name resource name. * @return the first stage of the new WebTest definition. */ 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 b7b0cf43cf688..6ce2fcd06d0f4 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 @@ -8,21 +8,29 @@ import com.azure.core.management.Resource; import java.util.Map; -/** An azure resource object. */ +/** + * An azure resource object. + */ @Fluent public class WebtestsResource extends Resource { - /** Creates an instance of WebtestsResource class. */ + /** + * Creates an instance of WebtestsResource class. + */ public WebtestsResource() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WebtestsResource withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WebtestsResource withTags(Map tags) { super.withTags(tags); @@ -31,7 +39,7 @@ public WebtestsResource withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfiguration.java index 45989045bfc7f..396d0b882a19b 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 @@ -6,46 +6,48 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner; -/** An immutable client-side representation of WorkItemConfiguration. */ +/** + * An immutable client-side representation of WorkItemConfiguration. + */ public interface WorkItemConfiguration { /** * Gets the connectorId property: Connector identifier where work item is created. - * + * * @return the connectorId value. */ String connectorId(); /** * Gets the configDisplayName property: Configuration friendly name. - * + * * @return the configDisplayName value. */ String configDisplayName(); /** * Gets the isDefault property: Boolean value indicating whether configuration is default. - * + * * @return the isDefault value. */ Boolean isDefault(); /** * Gets the id property: Unique Id for work item. - * + * * @return the id value. */ String id(); /** * Gets the configProperties property: Serialized JSON object for detailed properties. - * + * * @return the configProperties value. */ String configProperties(); /** * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner object. - * + * * @return the inner object. */ WorkItemConfigurationInner innerModel(); 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 b016b4d37a398..a9ce45ae923de 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 @@ -8,7 +8,9 @@ import com.azure.core.management.exception.ManagementError; import com.fasterxml.jackson.annotation.JsonProperty; -/** Error associated with trying to get work item configuration or configurations. */ +/** + * Error associated with trying to get work item configuration or configurations. + */ @Immutable public final class WorkItemConfigurationError extends ManagementError { /* @@ -17,13 +19,15 @@ public final class WorkItemConfigurationError extends ManagementError { @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) private InnerError innererror; - /** Creates an instance of WorkItemConfigurationError class. */ + /** + * Creates an instance of WorkItemConfigurationError class. + */ public WorkItemConfigurationError() { } /** * Get the innererror property: Inner error. - * + * * @return the innererror value. */ public InnerError getInnererror() { @@ -32,7 +36,7 @@ public InnerError getInnererror() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java index ea35ad5c581de..474c83bc94b99 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 @@ -7,11 +7,13 @@ import com.azure.core.http.HttpResponse; import com.azure.core.management.exception.ManagementException; -/** Exception thrown for an invalid response with WorkItemConfigurationError information. */ +/** + * Exception thrown for an invalid response with WorkItemConfigurationError information. + */ public final class WorkItemConfigurationErrorException extends ManagementException { /** * Initializes a new instance of the WorkItemConfigurationErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ @@ -21,17 +23,19 @@ public WorkItemConfigurationErrorException(String message, HttpResponse response /** * Initializes a new instance of the WorkItemConfigurationErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. * @param value the deserialized response value. */ - public WorkItemConfigurationErrorException( - String message, HttpResponse response, WorkItemConfigurationError value) { + public WorkItemConfigurationErrorException(String message, HttpResponse response, + WorkItemConfigurationError value) { super(message, response, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkItemConfigurationError getValue() { return (WorkItemConfigurationError) super.getValue(); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java index 11a754eadbff8..845922fb72496 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 @@ -8,74 +8,73 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of WorkItemConfigurations. */ +/** + * Resource collection API of WorkItemConfigurations. + */ public interface WorkItemConfigurations { /** * Gets the list 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationErrorException thrown if the - * request is rejected by server. + * 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 - * PagedIterable}. + * @return the list work item configurations that exist for the application as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName); /** * Gets the list 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 com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationErrorException thrown if the - * request is rejected by server. + * 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 - * PagedIterable}. + * @return the list work item configurations that exist for the application as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName, Context context); /** * Create a work item configuration for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. + * of a Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return work item configuration associated with an application insights resource along with {@link Response}. */ - Response createWithResponse( - String resourceGroupName, - String resourceName, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context); + Response createWithResponse(String resourceGroupName, String resourceName, + WorkItemCreateConfiguration workItemConfigurationProperties, Context context); /** * Create a work item configuration for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. + * of a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return work item configuration associated with an application insights resource. */ - WorkItemConfiguration create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties); + WorkItemConfiguration create(String resourceGroupName, String resourceName, + WorkItemCreateConfiguration workItemConfigurationProperties); /** * 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. @@ -84,12 +83,12 @@ WorkItemConfiguration create( * @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}. */ - Response getDefaultWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getDefaultWithResponse(String resourceGroupName, String resourceName, + Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,27 +100,27 @@ Response getDefaultWithResponse( /** * 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. + * defined in connector configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, String workItemConfigId, + Context context); /** * 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. + * defined in connector configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -130,27 +129,27 @@ Response deleteWithResponse( /** * 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. + * defined in connector configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return specified work item configuration for an Application Insights component along with {@link Response}. */ - Response getItemWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context); + Response getItemWithResponse(String resourceGroupName, String resourceName, + String workItemConfigId, Context context); /** * Gets specified work item configuration for an Application Insights component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. + * defined in connector configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -160,43 +159,36 @@ Response getItemWithResponse( /** * 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. + * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. + * for this Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return work item configuration associated with an application insights resource along with {@link Response}. */ - Response updateItemWithResponse( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context); + Response updateItemWithResponse(String resourceGroupName, String resourceName, + String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties, Context context); /** * 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. + * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. + * for this Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return work item configuration associated with an application insights resource. */ - WorkItemConfiguration updateItem( - String resourceGroupName, - String resourceName, - String workItemConfigId, + WorkItemConfiguration updateItem(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java index 0e06f311c6c15..d465c2d909c32 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Work item configuration list result. */ +/** + * Work item configuration list result. + */ @Immutable public final class WorkItemConfigurationsListResult { /* @@ -18,13 +20,15 @@ public final class WorkItemConfigurationsListResult { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; - /** Creates an instance of WorkItemConfigurationsListResult class. */ + /** + * Creates an instance of WorkItemConfigurationsListResult class. + */ public WorkItemConfigurationsListResult() { } /** * Get the value property: An array of work item configurations. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java index 4f5648cb81b78..e1a41c295925d 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Work item configuration creation payload. */ +/** + * Work item configuration creation payload. + */ @Fluent public final class WorkItemCreateConfiguration { /* @@ -37,13 +39,15 @@ public final class WorkItemCreateConfiguration { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map workItemProperties; - /** Creates an instance of WorkItemCreateConfiguration class. */ + /** + * Creates an instance of WorkItemCreateConfiguration class. + */ public WorkItemCreateConfiguration() { } /** * Get the connectorId property: Unique connector id. - * + * * @return the connectorId value. */ public String connectorId() { @@ -52,7 +56,7 @@ public String connectorId() { /** * Set the connectorId property: Unique connector id. - * + * * @param connectorId the connectorId value to set. * @return the WorkItemCreateConfiguration object itself. */ @@ -63,7 +67,7 @@ public WorkItemCreateConfiguration withConnectorId(String connectorId) { /** * Get the connectorDataConfiguration property: Serialized JSON object for detailed properties. - * + * * @return the connectorDataConfiguration value. */ public String connectorDataConfiguration() { @@ -72,7 +76,7 @@ public String connectorDataConfiguration() { /** * Set the connectorDataConfiguration property: Serialized JSON object for detailed properties. - * + * * @param connectorDataConfiguration the connectorDataConfiguration value to set. * @return the WorkItemCreateConfiguration object itself. */ @@ -83,7 +87,7 @@ public WorkItemCreateConfiguration withConnectorDataConfiguration(String connect /** * Get the validateOnly property: Boolean indicating validate only. - * + * * @return the validateOnly value. */ public Boolean validateOnly() { @@ -92,7 +96,7 @@ public Boolean validateOnly() { /** * Set the validateOnly property: Boolean indicating validate only. - * + * * @param validateOnly the validateOnly value to set. * @return the WorkItemCreateConfiguration object itself. */ @@ -103,7 +107,7 @@ public WorkItemCreateConfiguration withValidateOnly(Boolean validateOnly) { /** * Get the workItemProperties property: Custom work item properties. - * + * * @return the workItemProperties value. */ public Map workItemProperties() { @@ -112,7 +116,7 @@ public Map workItemProperties() { /** * Set the workItemProperties property: Custom work item properties. - * + * * @param workItemProperties the workItemProperties value to set. * @return the WorkItemCreateConfiguration object itself. */ @@ -123,7 +127,7 @@ public WorkItemCreateConfiguration withWorkItemProperties(Map wo /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbook.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbook.java index 10f3072d21517..60e1827f90bc2 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 @@ -12,74 +12,76 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of Workbook. */ +/** + * An immutable client-side representation of Workbook. + */ public interface Workbook { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the identity property: Identity used for BYOS. - * + * * @return the identity value. */ WorkbookResourceIdentity identity(); /** * Gets the kind property: The kind of workbook. Only valid value is shared. - * + * * @return the kind value. */ WorkbookSharedTypeKind kind(); /** * Gets the etag property: Resource etag. - * + * * @return the etag value. */ String etag(); /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the displayName property: The user-defined name (display name) of the workbook. - * + * * @return the displayName value. */ String displayName(); @@ -87,7 +89,7 @@ public interface Workbook { /** * Gets the serializedData property: Configuration of this particular workbook. Configuration data is a string * containing valid JSON. - * + * * @return the serializedData value. */ String serializedData(); @@ -95,7 +97,7 @@ public interface Workbook { /** * Gets the version property: Workbook schema version format, like 'Notebook/1.0', which should match the workbook * in serializedData. - * + * * @return the version value. */ String version(); @@ -103,107 +105,112 @@ public interface Workbook { /** * Gets the timeModified property: Date and time in UTC of the last modification that was made to this workbook * definition. - * + * * @return the timeModified value. */ OffsetDateTime timeModified(); /** * Gets the category property: Workbook category, as defined by the user at creation time. - * + * * @return the category value. */ String category(); /** * Gets the tagsPropertiesTags property: Being deprecated, please use the other tags field. - * + * * @return the tagsPropertiesTags value. */ List tagsPropertiesTags(); /** * Gets the userId property: Unique user id of the specific user that owns this workbook. - * + * * @return the userId value. */ String userId(); /** * Gets the sourceId property: ResourceId for a source resource. - * + * * @return the sourceId value. */ String sourceId(); /** * Gets the storageUri property: The resourceId to the storage account when bring your own storage is used. - * + * * @return the storageUri value. */ String storageUri(); /** * Gets the description property: The description of the workbook. - * + * * @return the description value. */ String description(); /** * Gets the revision property: The unique revision id for this workbook definition. - * + * * @return the revision value. */ String revision(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner object. - * + * * @return the inner object. */ WorkbookInner innerModel(); - /** The entirety of the Workbook definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the Workbook definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The Workbook definition stages. */ + /** + * The Workbook definition stages. + */ interface DefinitionStages { - /** The first stage of the Workbook definition. */ + /** + * The first stage of the Workbook definition. + */ interface Blank extends WithLocation { } - /** The stage of the Workbook definition allowing to specify location. */ + /** + * The stage of the Workbook definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -211,18 +218,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the Workbook definition allowing to specify parent resource. */ + /** + * The stage of the Workbook definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -233,178 +242,195 @@ interface WithResourceGroup { * The stage of the Workbook definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithKind, - DefinitionStages.WithEtag, - DefinitionStages.WithDisplayName, - DefinitionStages.WithSerializedData, - DefinitionStages.WithVersion, - DefinitionStages.WithCategory, - DefinitionStages.WithTagsPropertiesTags, - DefinitionStages.WithSourceId, - DefinitionStages.WithStorageUri, - DefinitionStages.WithDescription, - DefinitionStages.WithSourceIdParameter { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithEtag, DefinitionStages.WithDisplayName, + DefinitionStages.WithSerializedData, DefinitionStages.WithVersion, DefinitionStages.WithCategory, + DefinitionStages.WithTagsPropertiesTags, DefinitionStages.WithSourceId, DefinitionStages.WithStorageUri, + DefinitionStages.WithDescription, DefinitionStages.WithSourceIdParameter { /** * Executes the create request. - * + * * @return the created resource. */ Workbook create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Workbook create(Context context); } - /** The stage of the Workbook definition allowing to specify tags. */ + /** + * The stage of the Workbook definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the Workbook definition allowing to specify identity. */ + /** + * The stage of the Workbook definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: Identity used for BYOS. - * + * * @param identity Identity used for BYOS. * @return the next definition stage. */ WithCreate withIdentity(WorkbookResourceIdentity identity); } - /** The stage of the Workbook definition allowing to specify kind. */ + /** + * The stage of the Workbook definition allowing to specify kind. + */ interface WithKind { /** * Specifies the kind property: The kind of workbook. Only valid value is shared.. - * + * * @param kind The kind of workbook. Only valid value is shared. * @return the next definition stage. */ WithCreate withKind(WorkbookSharedTypeKind kind); } - /** The stage of the Workbook definition allowing to specify etag. */ + /** + * The stage of the Workbook definition allowing to specify etag. + */ interface WithEtag { /** * Specifies the etag property: Resource etag. - * + * * @param etag Resource etag. * @return the next definition stage. */ WithCreate withEtag(String etag); } - /** The stage of the Workbook definition allowing to specify displayName. */ + /** + * The stage of the Workbook definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: The user-defined name (display name) of the workbook.. - * + * * @param displayName The user-defined name (display name) of the workbook. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the Workbook definition allowing to specify serializedData. */ + /** + * The stage of the Workbook definition allowing to specify serializedData. + */ interface WithSerializedData { /** * Specifies the serializedData property: Configuration of this particular workbook. Configuration data is a * string containing valid JSON. - * + * * @param serializedData Configuration of this particular workbook. Configuration data is a string - * containing valid JSON. + * containing valid JSON. * @return the next definition stage. */ WithCreate withSerializedData(String serializedData); } - /** The stage of the Workbook definition allowing to specify version. */ + /** + * The stage of the Workbook definition allowing to specify version. + */ interface WithVersion { /** * Specifies the version property: Workbook schema version format, like 'Notebook/1.0', which should match * the workbook in serializedData. - * + * * @param version Workbook schema version format, like 'Notebook/1.0', which should match the workbook in - * serializedData. + * serializedData. * @return the next definition stage. */ WithCreate withVersion(String version); } - /** The stage of the Workbook definition allowing to specify category. */ + /** + * The stage of the Workbook definition allowing to specify category. + */ interface WithCategory { /** * Specifies the category property: Workbook category, as defined by the user at creation time.. - * + * * @param category Workbook category, as defined by the user at creation time. * @return the next definition stage. */ WithCreate withCategory(String category); } - /** The stage of the Workbook definition allowing to specify tagsPropertiesTags. */ + /** + * The stage of the Workbook definition allowing to specify tagsPropertiesTags. + */ interface WithTagsPropertiesTags { /** * Specifies the tagsPropertiesTags property: Being deprecated, please use the other tags field. - * + * * @param tagsPropertiesTags Being deprecated, please use the other tags field. * @return the next definition stage. */ WithCreate withTagsPropertiesTags(List tagsPropertiesTags); } - /** The stage of the Workbook definition allowing to specify sourceId. */ + /** + * The stage of the Workbook definition allowing to specify sourceId. + */ interface WithSourceId { /** * Specifies the sourceId property: ResourceId for a source resource.. - * + * * @param sourceId ResourceId for a source resource. * @return the next definition stage. */ WithCreate withSourceId(String sourceId); } - /** The stage of the Workbook definition allowing to specify storageUri. */ + /** + * The stage of the Workbook definition allowing to specify storageUri. + */ interface WithStorageUri { /** * Specifies the storageUri property: The resourceId to the storage account when bring your own storage is * used. - * + * * @param storageUri The resourceId to the storage account when bring your own storage is used. * @return the next definition stage. */ WithCreate withStorageUri(String storageUri); } - /** The stage of the Workbook definition allowing to specify description. */ + /** + * The stage of the Workbook definition allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: The description of the workbook.. - * + * * @param description The description of the workbook. * @return the next definition stage. */ WithCreate withDescription(String description); } - /** The stage of the Workbook definition allowing to specify sourceId. */ + /** + * The stage of the Workbook definition allowing to specify sourceId. + */ interface WithSourceIdParameter { /** * Specifies the sourceId property: Azure Resource Id that will fetch all linked workbooks.. - * + * * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @return the next definition stage. */ @@ -414,136 +440,151 @@ interface WithSourceIdParameter { /** * Begins update for the Workbook resource. - * + * * @return the stage of resource update. */ Workbook.Update update(); - /** The template for Workbook update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithKind, - UpdateStages.WithDisplayName, - UpdateStages.WithSerializedData, - UpdateStages.WithCategory, - UpdateStages.WithTagsPropertiesTags, - UpdateStages.WithDescription, - UpdateStages.WithRevision, - UpdateStages.WithSourceId { + /** + * The template for Workbook update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithKind, UpdateStages.WithDisplayName, + UpdateStages.WithSerializedData, UpdateStages.WithCategory, UpdateStages.WithTagsPropertiesTags, + UpdateStages.WithDescription, UpdateStages.WithRevision, UpdateStages.WithSourceId { /** * Executes the update request. - * + * * @return the updated resource. */ Workbook apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Workbook apply(Context context); } - /** The Workbook update stages. */ + /** + * The Workbook update stages. + */ interface UpdateStages { - /** The stage of the Workbook update allowing to specify tags. */ + /** + * The stage of the Workbook update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the Workbook update allowing to specify kind. */ + /** + * The stage of the Workbook update allowing to specify kind. + */ interface WithKind { /** * Specifies the kind property: The kind of workbook. Only valid value is shared.. - * + * * @param kind The kind of workbook. Only valid value is shared. * @return the next definition stage. */ Update withKind(WorkbookUpdateSharedTypeKind kind); } - /** The stage of the Workbook update allowing to specify displayName. */ + /** + * The stage of the Workbook update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: The user-defined name (display name) of the workbook.. - * + * * @param displayName The user-defined name (display name) of the workbook. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the Workbook update allowing to specify serializedData. */ + /** + * The stage of the Workbook update allowing to specify serializedData. + */ interface WithSerializedData { /** * Specifies the serializedData property: Configuration of this particular workbook. Configuration data is a * string containing valid JSON. - * + * * @param serializedData Configuration of this particular workbook. Configuration data is a string - * containing valid JSON. + * containing valid JSON. * @return the next definition stage. */ Update withSerializedData(String serializedData); } - /** The stage of the Workbook update allowing to specify category. */ + /** + * The stage of the Workbook update allowing to specify category. + */ interface WithCategory { /** * Specifies the category property: Workbook category, as defined by the user at creation time.. - * + * * @param category Workbook category, as defined by the user at creation time. * @return the next definition stage. */ Update withCategory(String category); } - /** The stage of the Workbook update allowing to specify tagsPropertiesTags. */ + /** + * The stage of the Workbook update allowing to specify tagsPropertiesTags. + */ interface WithTagsPropertiesTags { /** * Specifies the tagsPropertiesTags property: A list of 0 or more tags that are associated with this * workbook definition. - * + * * @param tagsPropertiesTags A list of 0 or more tags that are associated with this workbook definition. * @return the next definition stage. */ Update withTagsPropertiesTags(List tagsPropertiesTags); } - /** The stage of the Workbook update allowing to specify description. */ + /** + * The stage of the Workbook update allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: The description of the workbook.. - * + * * @param description The description of the workbook. * @return the next definition stage. */ Update withDescription(String description); } - /** The stage of the Workbook update allowing to specify revision. */ + /** + * The stage of the Workbook update allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: The unique revision id for this workbook definition. - * + * * @param revision The unique revision id for this workbook definition. * @return the next definition stage. */ Update withRevision(String revision); } - /** The stage of the Workbook update allowing to specify sourceId. */ + /** + * The stage of the Workbook update allowing to specify sourceId. + */ interface WithSourceId { /** * Specifies the sourceId property: Azure Resource Id that will fetch all linked workbooks.. - * + * * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @return the next definition stage. */ @@ -553,14 +594,14 @@ interface WithSourceId { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Workbook refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/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 ba01a8ea17fe4..48745c6669b0e 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 @@ -8,7 +8,9 @@ import com.azure.core.management.exception.ManagementError; import com.fasterxml.jackson.annotation.JsonProperty; -/** Error response. */ +/** + * Error response. + */ @Immutable public final class WorkbookErrorDefinition extends ManagementError { /* @@ -17,13 +19,15 @@ public final class WorkbookErrorDefinition extends ManagementError { @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) private WorkbookInnerErrorTrace innererror; - /** Creates an instance of WorkbookErrorDefinition class. */ + /** + * Creates an instance of WorkbookErrorDefinition class. + */ public WorkbookErrorDefinition() { } /** * Get the innererror property: Internal error details. - * + * * @return the innererror value. */ public WorkbookInnerErrorTrace getInnererror() { @@ -32,7 +36,7 @@ public WorkbookInnerErrorTrace getInnererror() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinitionException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinitionException.java index 447ab30e3cfe7..9fa1ed901b0e0 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 @@ -7,11 +7,13 @@ import com.azure.core.http.HttpResponse; import com.azure.core.management.exception.ManagementException; -/** Exception thrown for an invalid response with WorkbookErrorDefinition information. */ +/** + * Exception thrown for an invalid response with WorkbookErrorDefinition information. + */ public final class WorkbookErrorDefinitionException extends ManagementException { /** * Initializes a new instance of the WorkbookErrorDefinitionException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ @@ -21,7 +23,7 @@ public WorkbookErrorDefinitionException(String message, HttpResponse response) { /** * Initializes a new instance of the WorkbookErrorDefinitionException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. * @param value the deserialized response value. @@ -30,7 +32,9 @@ public WorkbookErrorDefinitionException(String message, HttpResponse response, W super(message, response, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkbookErrorDefinition getValue() { return (WorkbookErrorDefinition) super.getValue(); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookInnerErrorTrace.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookInnerErrorTrace.java index 322818b41e7bc..8a225ed30df66 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Error details. */ +/** + * Error details. + */ @Immutable public final class WorkbookInnerErrorTrace { /* @@ -17,13 +19,15 @@ public final class WorkbookInnerErrorTrace { @JsonProperty(value = "trace", access = JsonProperty.Access.WRITE_ONLY) private List trace; - /** Creates an instance of WorkbookInnerErrorTrace class. */ + /** + * Creates an instance of WorkbookInnerErrorTrace class. + */ public WorkbookInnerErrorTrace() { } /** * Get the trace property: detailed error trace. - * + * * @return the trace value. */ public List trace() { @@ -32,7 +36,7 @@ public List trace() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResource.java index 24ff8a2dee98d..689b9200a79da 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResource.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** An azure resource object. */ +/** + * An azure resource object. + */ @Fluent public class WorkbookResource extends Resource { /* @@ -30,13 +32,15 @@ public class WorkbookResource extends Resource { @JsonProperty(value = "etag") private String etag; - /** Creates an instance of WorkbookResource class. */ + /** + * Creates an instance of WorkbookResource class. + */ public WorkbookResource() { } /** * Get the identity property: Identity used for BYOS. - * + * * @return the identity value. */ public WorkbookResourceIdentity identity() { @@ -45,7 +49,7 @@ public WorkbookResourceIdentity identity() { /** * Set the identity property: Identity used for BYOS. - * + * * @param identity the identity value to set. * @return the WorkbookResource object itself. */ @@ -56,7 +60,7 @@ public WorkbookResource withIdentity(WorkbookResourceIdentity identity) { /** * Get the kind property: The kind of workbook. Only valid value is shared. - * + * * @return the kind value. */ public WorkbookSharedTypeKind kind() { @@ -65,7 +69,7 @@ public WorkbookSharedTypeKind 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. */ @@ -76,7 +80,7 @@ public WorkbookResource withKind(WorkbookSharedTypeKind kind) { /** * Get the etag property: Resource etag. - * + * * @return the etag value. */ public String etag() { @@ -85,7 +89,7 @@ public String etag() { /** * Set the etag property: Resource etag. - * + * * @param etag the etag value to set. * @return the WorkbookResource object itself. */ @@ -94,14 +98,18 @@ public WorkbookResource withEtag(String etag) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkbookResource withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkbookResource withTags(Map tags) { super.withTags(tags); @@ -110,7 +118,7 @@ public WorkbookResource withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResourceIdentity.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResourceIdentity.java index d0a5e1ec8d24a..1de01429d34cd 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 @@ -7,31 +7,39 @@ import com.azure.core.annotation.Fluent; import java.util.Map; -/** Identity used for BYOS. */ +/** + * Identity used for BYOS. + */ @Fluent public final class WorkbookResourceIdentity extends ManagedServiceIdentity { - /** Creates an instance of WorkbookResourceIdentity class. */ + /** + * Creates an instance of WorkbookResourceIdentity class. + */ public WorkbookResourceIdentity() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkbookResourceIdentity withType(ManagedServiceIdentityType type) { super.withType(type); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public WorkbookResourceIdentity withUserAssignedIdentities( - Map userAssignedIdentities) { + public WorkbookResourceIdentity + withUserAssignedIdentities(Map userAssignedIdentities) { super.withUserAssignedIdentities(userAssignedIdentities); return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 cd277a9556b84..40392e40d8b15 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The kind of workbook. Only valid value is shared. */ +/** + * The kind of workbook. Only valid value is shared. + */ public final class WorkbookSharedTypeKind extends ExpandableStringEnum { - /** Static value shared for WorkbookSharedTypeKind. */ + /** + * Static value shared for WorkbookSharedTypeKind. + */ public static final WorkbookSharedTypeKind SHARED = fromString("shared"); /** * Creates a new instance of WorkbookSharedTypeKind value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public WorkbookSharedTypeKind() { /** * Creates or finds a WorkbookSharedTypeKind from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkbookSharedTypeKind. */ @@ -35,7 +39,7 @@ public static WorkbookSharedTypeKind fromString(String name) { /** * Gets known WorkbookSharedTypeKind values. - * + * * @return known WorkbookSharedTypeKind values. */ public static Collection values() { 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 f5848398ffe48..275d6208ee23c 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 @@ -10,39 +10,41 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of WorkbookTemplate. */ +/** + * An immutable client-side representation of WorkbookTemplate. + */ public interface WorkbookTemplate { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); @@ -50,28 +52,28 @@ public interface WorkbookTemplate { /** * Gets the priority property: Priority of the template. Determines which template to open when a workbook gallery * is opened in viewer mode. - * + * * @return the priority value. */ Integer priority(); /** * Gets the author property: Information about the author of the workbook template. - * + * * @return the author value. */ String author(); /** * Gets the templateData property: Valid JSON object containing workbook template payload. - * + * * @return the templateData value. */ Object templateData(); /** * Gets the galleries property: Workbook galleries supported by the template. - * + * * @return the galleries value. */ List galleries(); @@ -79,58 +81,63 @@ public interface WorkbookTemplate { /** * Gets the localized property: Key value pair of localized gallery. Each key is the locale code of languages * supported by the Azure portal. - * + * * @return the localized value. */ Map> localized(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner object. - * + * * @return the inner object. */ WorkbookTemplateInner innerModel(); - /** The entirety of the WorkbookTemplate definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the WorkbookTemplate definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The WorkbookTemplate definition stages. */ + /** + * The WorkbookTemplate definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkbookTemplate definition. */ + /** + * The first stage of the WorkbookTemplate definition. + */ interface Blank extends WithLocation { } - /** The stage of the WorkbookTemplate definition allowing to specify location. */ + /** + * The stage of the WorkbookTemplate definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -138,18 +145,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the WorkbookTemplate definition allowing to specify parent resource. */ + /** + * The stage of the WorkbookTemplate definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -161,93 +170,101 @@ interface WithResourceGroup { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithPriority, - DefinitionStages.WithAuthor, - DefinitionStages.WithTemplateData, - DefinitionStages.WithGalleries, - DefinitionStages.WithLocalized { + extends DefinitionStages.WithTags, DefinitionStages.WithPriority, DefinitionStages.WithAuthor, + DefinitionStages.WithTemplateData, DefinitionStages.WithGalleries, DefinitionStages.WithLocalized { /** * Executes the create request. - * + * * @return the created resource. */ WorkbookTemplate create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkbookTemplate create(Context context); } - /** The stage of the WorkbookTemplate definition allowing to specify tags. */ + /** + * The stage of the WorkbookTemplate definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the WorkbookTemplate definition allowing to specify priority. */ + /** + * The stage of the WorkbookTemplate definition allowing to specify priority. + */ interface WithPriority { /** * Specifies the priority property: Priority of the template. Determines which template to open when a * workbook gallery is opened in viewer mode.. - * + * * @param priority Priority of the template. Determines which template to open when a workbook gallery is - * opened in viewer mode. + * opened in viewer mode. * @return the next definition stage. */ WithCreate withPriority(Integer priority); } - /** The stage of the WorkbookTemplate definition allowing to specify author. */ + /** + * The stage of the WorkbookTemplate definition allowing to specify author. + */ interface WithAuthor { /** * Specifies the author property: Information about the author of the workbook template.. - * + * * @param author Information about the author of the workbook template. * @return the next definition stage. */ WithCreate withAuthor(String author); } - /** The stage of the WorkbookTemplate definition allowing to specify templateData. */ + /** + * The stage of the WorkbookTemplate definition allowing to specify templateData. + */ interface WithTemplateData { /** * Specifies the templateData property: Valid JSON object containing workbook template payload.. - * + * * @param templateData Valid JSON object containing workbook template payload. * @return the next definition stage. */ WithCreate withTemplateData(Object templateData); } - /** The stage of the WorkbookTemplate definition allowing to specify galleries. */ + /** + * The stage of the WorkbookTemplate definition allowing to specify galleries. + */ interface WithGalleries { /** * Specifies the galleries property: Workbook galleries supported by the template.. - * + * * @param galleries Workbook galleries supported by the template. * @return the next definition stage. */ WithCreate withGalleries(List galleries); } - /** The stage of the WorkbookTemplate definition allowing to specify localized. */ + /** + * The stage of the WorkbookTemplate definition allowing to specify localized. + */ interface WithLocalized { /** * Specifies the localized property: Key value pair of localized gallery. Each key is the locale code of * languages supported by the Azure portal.. - * + * * @param localized Key value pair of localized gallery. Each key is the locale code of languages supported - * by the Azure portal. + * by the Azure portal. * @return the next definition stage. */ WithCreate withLocalized(Map> localized); @@ -256,102 +273,113 @@ interface WithLocalized { /** * Begins update for the WorkbookTemplate resource. - * + * * @return the stage of resource update. */ WorkbookTemplate.Update update(); - /** The template for WorkbookTemplate update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithPriority, - UpdateStages.WithAuthor, - UpdateStages.WithTemplateData, - UpdateStages.WithGalleries, - UpdateStages.WithLocalized { + /** + * The template for WorkbookTemplate update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithPriority, UpdateStages.WithAuthor, + UpdateStages.WithTemplateData, UpdateStages.WithGalleries, UpdateStages.WithLocalized { /** * Executes the update request. - * + * * @return the updated resource. */ WorkbookTemplate apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkbookTemplate apply(Context context); } - /** The WorkbookTemplate update stages. */ + /** + * The WorkbookTemplate update stages. + */ interface UpdateStages { - /** The stage of the WorkbookTemplate update allowing to specify tags. */ + /** + * The stage of the WorkbookTemplate update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags. - * + * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the WorkbookTemplate update allowing to specify priority. */ + /** + * The stage of the WorkbookTemplate update allowing to specify priority. + */ interface WithPriority { /** * Specifies the priority property: Priority of the template. Determines which template to open when a * workbook gallery is opened in viewer mode.. - * + * * @param priority Priority of the template. Determines which template to open when a workbook gallery is - * opened in viewer mode. + * opened in viewer mode. * @return the next definition stage. */ Update withPriority(Integer priority); } - /** The stage of the WorkbookTemplate update allowing to specify author. */ + /** + * The stage of the WorkbookTemplate update allowing to specify author. + */ interface WithAuthor { /** * Specifies the author property: Information about the author of the workbook template.. - * + * * @param author Information about the author of the workbook template. * @return the next definition stage. */ Update withAuthor(String author); } - /** The stage of the WorkbookTemplate update allowing to specify templateData. */ + /** + * The stage of the WorkbookTemplate update allowing to specify templateData. + */ interface WithTemplateData { /** * Specifies the templateData property: Valid JSON object containing workbook template payload.. - * + * * @param templateData Valid JSON object containing workbook template payload. * @return the next definition stage. */ Update withTemplateData(Object templateData); } - /** The stage of the WorkbookTemplate update allowing to specify galleries. */ + /** + * The stage of the WorkbookTemplate update allowing to specify galleries. + */ interface WithGalleries { /** * Specifies the galleries property: Workbook galleries supported by the template.. - * + * * @param galleries Workbook galleries supported by the template. * @return the next definition stage. */ Update withGalleries(List galleries); } - /** The stage of the WorkbookTemplate update allowing to specify localized. */ + /** + * The stage of the WorkbookTemplate update allowing to specify localized. + */ interface WithLocalized { /** * Specifies the localized property: Key value pair of localized gallery. Each key is the locale code of * languages supported by the Azure portal.. - * + * * @param localized Key value pair of localized gallery. Each key is the locale code of languages supported - * by the Azure portal. + * by the Azure portal. * @return the next definition stage. */ Update withLocalized(Map> localized); @@ -360,14 +388,14 @@ interface WithLocalized { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkbookTemplate refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/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 5d066687b658c..b619d021411a2 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Gallery information for a workbook template. */ +/** + * Gallery information for a workbook template. + */ @Fluent public final class WorkbookTemplateGallery { /* @@ -40,13 +42,15 @@ public final class WorkbookTemplateGallery { @JsonProperty(value = "resourceType") private String resourceType; - /** Creates an instance of WorkbookTemplateGallery class. */ + /** + * Creates an instance of WorkbookTemplateGallery class. + */ public WorkbookTemplateGallery() { } /** * Get the name property: Name of the workbook template in the gallery. - * + * * @return the name value. */ public String name() { @@ -55,7 +59,7 @@ public String name() { /** * Set the name property: Name of the workbook template in the gallery. - * + * * @param name the name value to set. * @return the WorkbookTemplateGallery object itself. */ @@ -66,7 +70,7 @@ public WorkbookTemplateGallery withName(String name) { /** * Get the category property: Category for the gallery. - * + * * @return the category value. */ public String category() { @@ -75,7 +79,7 @@ public String category() { /** * Set the category property: Category for the gallery. - * + * * @param category the category value to set. * @return the WorkbookTemplateGallery object itself. */ @@ -86,7 +90,7 @@ public WorkbookTemplateGallery withCategory(String category) { /** * Get the type property: Type of workbook supported by the workbook template. - * + * * @return the type value. */ public String type() { @@ -95,7 +99,7 @@ public String type() { /** * Set the type property: Type of workbook supported by the workbook template. - * + * * @param type the type value to set. * @return the WorkbookTemplateGallery object itself. */ @@ -106,7 +110,7 @@ public WorkbookTemplateGallery withType(String type) { /** * Get the order property: Order of the template within the gallery. - * + * * @return the order value. */ public Integer order() { @@ -115,7 +119,7 @@ public Integer order() { /** * Set the order property: Order of the template within the gallery. - * + * * @param order the order value to set. * @return the WorkbookTemplateGallery object itself. */ @@ -126,7 +130,7 @@ public WorkbookTemplateGallery withOrder(Integer order) { /** * Get the resourceType property: Azure resource type supported by the gallery. - * + * * @return the resourceType value. */ public String resourceType() { @@ -135,7 +139,7 @@ public String resourceType() { /** * Set the resourceType property: Azure resource type supported by the gallery. - * + * * @param resourceType the resourceType value to set. * @return the WorkbookTemplateGallery object itself. */ @@ -146,7 +150,7 @@ public WorkbookTemplateGallery withResourceType(String resourceType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java index bcefd076e2988..4269922fda6bf 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Localized template data and gallery information. */ +/** + * Localized template data and gallery information. + */ @Fluent public final class WorkbookTemplateLocalizedGallery { /* @@ -23,13 +25,15 @@ public final class WorkbookTemplateLocalizedGallery { @JsonProperty(value = "galleries") private List galleries; - /** Creates an instance of WorkbookTemplateLocalizedGallery class. */ + /** + * Creates an instance of WorkbookTemplateLocalizedGallery class. + */ public WorkbookTemplateLocalizedGallery() { } /** * Get the templateData property: Valid JSON object containing workbook template payload. - * + * * @return the templateData value. */ public Object templateData() { @@ -38,7 +42,7 @@ public Object templateData() { /** * Set the templateData property: Valid JSON object containing workbook template payload. - * + * * @param templateData the templateData value to set. * @return the WorkbookTemplateLocalizedGallery object itself. */ @@ -49,7 +53,7 @@ public WorkbookTemplateLocalizedGallery withTemplateData(Object templateData) { /** * Get the galleries property: Workbook galleries supported by the template. - * + * * @return the galleries value. */ public List galleries() { @@ -58,7 +62,7 @@ public List galleries() { /** * Set the galleries property: Workbook galleries supported by the template. - * + * * @param galleries the galleries value to set. * @return the WorkbookTemplateLocalizedGallery object itself. */ @@ -69,7 +73,7 @@ public WorkbookTemplateLocalizedGallery withGalleries(List tags) { super.withTags(tags); @@ -31,7 +39,7 @@ public WorkbookTemplateResource withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java index 7b398730b35b2..f1556074698f0 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 @@ -11,7 +11,9 @@ import java.util.List; import java.util.Map; -/** The parameters that can be provided when updating workbook template. */ +/** + * The parameters that can be provided when updating workbook template. + */ @Fluent public final class WorkbookTemplateUpdateParameters { /* @@ -27,13 +29,15 @@ public final class WorkbookTemplateUpdateParameters { @JsonProperty(value = "properties") private WorkbookTemplateProperties innerProperties; - /** Creates an instance of WorkbookTemplateUpdateParameters class. */ + /** + * Creates an instance of WorkbookTemplateUpdateParameters class. + */ public WorkbookTemplateUpdateParameters() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -42,7 +46,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the WorkbookTemplateUpdateParameters object itself. */ @@ -53,7 +57,7 @@ public WorkbookTemplateUpdateParameters withTags(Map tags) { /** * Get the innerProperties property: Metadata describing a workbook for an Azure resource. - * + * * @return the innerProperties value. */ private WorkbookTemplateProperties innerProperties() { @@ -61,9 +65,9 @@ private WorkbookTemplateProperties innerProperties() { } /** - * Get the priority property: Priority of the template. Determines which template to open when a workbook gallery is - * opened in viewer mode. - * + * Get the priority property: Priority of the template. Determines which template to open when a workbook gallery + * is opened in viewer mode. + * * @return the priority value. */ public Integer priority() { @@ -71,9 +75,9 @@ public Integer priority() { } /** - * Set the priority property: Priority of the template. Determines which template to open when a workbook gallery is - * opened in viewer mode. - * + * Set the priority property: Priority of the template. Determines which template to open when a workbook gallery + * is opened in viewer mode. + * * @param priority the priority value to set. * @return the WorkbookTemplateUpdateParameters object itself. */ @@ -87,7 +91,7 @@ public WorkbookTemplateUpdateParameters withPriority(Integer priority) { /** * Get the author property: Information about the author of the workbook template. - * + * * @return the author value. */ public String author() { @@ -96,7 +100,7 @@ public String author() { /** * Set the author property: Information about the author of the workbook template. - * + * * @param author the author value to set. * @return the WorkbookTemplateUpdateParameters object itself. */ @@ -110,7 +114,7 @@ public WorkbookTemplateUpdateParameters withAuthor(String author) { /** * Get the templateData property: Valid JSON object containing workbook template payload. - * + * * @return the templateData value. */ public Object templateData() { @@ -119,7 +123,7 @@ public Object templateData() { /** * Set the templateData property: Valid JSON object containing workbook template payload. - * + * * @param templateData the templateData value to set. * @return the WorkbookTemplateUpdateParameters object itself. */ @@ -133,7 +137,7 @@ public WorkbookTemplateUpdateParameters withTemplateData(Object templateData) { /** * Get the galleries property: Workbook galleries supported by the template. - * + * * @return the galleries value. */ public List galleries() { @@ -142,7 +146,7 @@ public List galleries() { /** * Set the galleries property: Workbook galleries supported by the template. - * + * * @param galleries the galleries value to set. * @return the WorkbookTemplateUpdateParameters object itself. */ @@ -157,7 +161,7 @@ public WorkbookTemplateUpdateParameters withGalleries(List> localized() { @@ -167,12 +171,12 @@ public Map> localized() { /** * Set the localized property: Key value pair of localized gallery. Each key is the locale code of languages * supported by the Azure portal. - * + * * @param localized the localized value to set. * @return the WorkbookTemplateUpdateParameters object itself. */ - public WorkbookTemplateUpdateParameters withLocalized( - Map> localized) { + public WorkbookTemplateUpdateParameters + withLocalized(Map> localized) { if (this.innerProperties() == null) { this.innerProperties = new WorkbookTemplateProperties(); } @@ -182,7 +186,7 @@ public WorkbookTemplateUpdateParameters withLocalized( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java index e98c951b87158..1744393a794ba 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 @@ -8,36 +8,38 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of WorkbookTemplates. */ +/** + * Resource collection API of WorkbookTemplates. + */ public interface WorkbookTemplates { /** * Get all Workbook templates defined within a specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbook templates defined within a specified resource group as paginated response with {@link - * PagedIterable}. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** * Get all Workbook templates defined within a specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbook templates defined within a specified resource group as paginated response with {@link - * PagedIterable}. + * @return all Workbook templates defined within a specified resource group as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Get a single workbook template by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. @@ -46,12 +48,12 @@ public interface WorkbookTemplates { * @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}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); /** * Get a single workbook template by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,7 +65,7 @@ Response getByResourceGroupWithResponse( /** * Delete a workbook template. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. @@ -76,7 +78,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -87,7 +89,7 @@ Response getByResourceGroupWithResponse( /** * Get a single workbook template by its resourceName. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,7 +100,7 @@ Response getByResourceGroupWithResponse( /** * Get a single workbook template by its resourceName. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -110,7 +112,7 @@ Response getByResourceGroupWithResponse( /** * Delete a workbook template. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -120,7 +122,7 @@ Response getByResourceGroupWithResponse( /** * Delete a workbook template. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -132,7 +134,7 @@ Response getByResourceGroupWithResponse( /** * Begins definition for a new WorkbookTemplate resource. - * + * * @param name resource name. * @return the first stage of the new WorkbookTemplate definition. */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java index cca91031d7225..b87f39e3e989a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** WorkbookTemplate list result. */ +/** + * WorkbookTemplate list result. + */ @Fluent public final class WorkbookTemplatesListResult { /* @@ -18,13 +20,15 @@ public final class WorkbookTemplatesListResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of WorkbookTemplatesListResult class. */ + /** + * Creates an instance of WorkbookTemplatesListResult class. + */ public WorkbookTemplatesListResult() { } /** * Get the value property: An array of workbook templates. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: An array of workbook templates. - * + * * @param value the value value to set. * @return the WorkbookTemplatesListResult object itself. */ @@ -44,7 +48,7 @@ public WorkbookTemplatesListResult withValue(List value) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java index 81957068d40d9..934c32d6d9c13 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 @@ -11,7 +11,9 @@ import java.util.List; import java.util.Map; -/** The parameters that can be provided when updating workbook properties properties. */ +/** + * The parameters that can be provided when updating workbook properties properties. + */ @Fluent public final class WorkbookUpdateParameters { /* @@ -33,13 +35,15 @@ public final class WorkbookUpdateParameters { @JsonProperty(value = "properties") private WorkbookPropertiesUpdateParameters innerProperties; - /** Creates an instance of WorkbookUpdateParameters class. */ + /** + * Creates an instance of WorkbookUpdateParameters class. + */ public WorkbookUpdateParameters() { } /** * Get the kind property: The kind of workbook. Only valid value is shared. - * + * * @return the kind value. */ public WorkbookUpdateSharedTypeKind kind() { @@ -48,7 +52,7 @@ public WorkbookUpdateSharedTypeKind kind() { /** * Set the kind property: The kind of workbook. Only valid value is shared. - * + * * @param kind the kind value to set. * @return the WorkbookUpdateParameters object itself. */ @@ -59,7 +63,7 @@ public WorkbookUpdateParameters withKind(WorkbookUpdateSharedTypeKind kind) { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -68,7 +72,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the WorkbookUpdateParameters object itself. */ @@ -79,7 +83,7 @@ public WorkbookUpdateParameters withTags(Map tags) { /** * Get the innerProperties property: Metadata describing a workbook for an Azure resource. - * + * * @return the innerProperties value. */ private WorkbookPropertiesUpdateParameters innerProperties() { @@ -88,7 +92,7 @@ private WorkbookPropertiesUpdateParameters innerProperties() { /** * Get the displayName property: The user-defined name (display name) of the workbook. - * + * * @return the displayName value. */ public String displayName() { @@ -97,7 +101,7 @@ public String displayName() { /** * Set the displayName property: The user-defined name (display name) of the workbook. - * + * * @param displayName the displayName value to set. * @return the WorkbookUpdateParameters object itself. */ @@ -112,7 +116,7 @@ public WorkbookUpdateParameters withDisplayName(String displayName) { /** * Get the serializedData property: Configuration of this particular workbook. Configuration data is a string * containing valid JSON. - * + * * @return the serializedData value. */ public String serializedData() { @@ -122,7 +126,7 @@ public String 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 WorkbookUpdateParameters object itself. */ @@ -136,7 +140,7 @@ public WorkbookUpdateParameters withSerializedData(String serializedData) { /** * Get the category property: Workbook category, as defined by the user at creation time. - * + * * @return the category value. */ public String category() { @@ -145,7 +149,7 @@ public String category() { /** * Set the category property: Workbook category, as defined by the user at creation time. - * + * * @param category the category value to set. * @return the WorkbookUpdateParameters object itself. */ @@ -159,7 +163,7 @@ public WorkbookUpdateParameters withCategory(String category) { /** * Get the tags property: A list of 0 or more tags that are associated with this workbook definition. - * + * * @return the tags value. */ public List tagsPropertiesTags() { @@ -168,7 +172,7 @@ public List tagsPropertiesTags() { /** * Set the tags property: A list of 0 or more tags that are associated with this workbook definition. - * + * * @param tags the tags value to set. * @return the WorkbookUpdateParameters object itself. */ @@ -182,7 +186,7 @@ public WorkbookUpdateParameters withTagsPropertiesTags(List tags) { /** * Get the description property: The description of the workbook. - * + * * @return the description value. */ public String description() { @@ -191,7 +195,7 @@ public String description() { /** * Set the description property: The description of the workbook. - * + * * @param description the description value to set. * @return the WorkbookUpdateParameters object itself. */ @@ -205,7 +209,7 @@ public WorkbookUpdateParameters withDescription(String description) { /** * Get the revision property: The unique revision id for this workbook definition. - * + * * @return the revision value. */ public String revision() { @@ -214,7 +218,7 @@ public String revision() { /** * Set the revision property: The unique revision id for this workbook definition. - * + * * @param revision the revision value to set. * @return the WorkbookUpdateParameters object itself. */ @@ -228,7 +232,7 @@ public WorkbookUpdateParameters withRevision(String revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java index f790b970c9ac0..b0cea6bc35aab 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The kind of workbook. Only valid value is shared. */ +/** + * The kind of workbook. Only valid value is shared. + */ public final class WorkbookUpdateSharedTypeKind extends ExpandableStringEnum { - /** Static value shared for WorkbookUpdateSharedTypeKind. */ + /** + * Static value shared for WorkbookUpdateSharedTypeKind. + */ public static final WorkbookUpdateSharedTypeKind SHARED = fromString("shared"); /** * Creates a new instance of WorkbookUpdateSharedTypeKind value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public WorkbookUpdateSharedTypeKind() { /** * Creates or finds a WorkbookUpdateSharedTypeKind from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkbookUpdateSharedTypeKind. */ @@ -35,7 +39,7 @@ public static WorkbookUpdateSharedTypeKind fromString(String name) { /** * Gets known WorkbookUpdateSharedTypeKind values. - * + * * @return known WorkbookUpdateSharedTypeKind values. */ public static Collection values() { 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 057fcdf7f88ac..c2539ad6ce30a 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 @@ -9,102 +9,99 @@ import com.azure.core.util.Context; import java.util.List; -/** Resource collection API of Workbooks. */ +/** + * Resource collection API of Workbooks. + */ 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. + * 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}. + * @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. - * + * * @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. + * 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. + * 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}. + * @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. + * 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 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. + * 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. + * 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 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); + PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category, List tags, + String sourceId, Boolean canFetchContent, Context context); /** * Get a single workbook by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. + * 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. + * 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}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Boolean canFetchContent, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Boolean canFetchContent, Context context); /** * Get a single workbook by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param 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. + * 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. */ @@ -112,13 +109,13 @@ Response getByResourceGroupWithResponse( /** * Delete a workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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 com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the - * request is rejected by server. + * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @@ -126,70 +123,70 @@ Response getByResourceGroupWithResponse( /** * Delete a workbook. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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. + * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteByResourceGroup(String resourceGroupName, String resourceName); /** * Get the revisions for the workbook defined by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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. + * 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 - * PagedIterable}. + * @return the revisions for the workbook defined by its resourceName as paginated response with + * {@link PagedIterable}. */ PagedIterable revisionsList(String resourceGroupName, String resourceName); /** * Get the revisions for the workbook defined by its resourceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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 com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the - * request is rejected by server. + * 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 - * PagedIterable}. + * @return the revisions for the workbook defined by its resourceName as paginated response with + * {@link PagedIterable}. */ PagedIterable revisionsList(String resourceGroupName, String resourceName, Context context); /** * Get a single workbook revision defined by its revisionId. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @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 com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the - * request is rejected by server. + * 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}. */ - Response revisionGetWithResponse( - String resourceGroupName, String resourceName, String revisionId, Context context); + Response revisionGetWithResponse(String resourceGroupName, String resourceName, String revisionId, + Context context); /** * Get a single workbook revision defined by its revisionId. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. + * @param resourceName The name of the workbook resource. The value must be an UUID. * @param revisionId The id of the workbook's revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the - * request is rejected by server. + * 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. */ @@ -197,11 +194,11 @@ Response revisionGetWithResponse( /** * Get a single workbook by its resourceName. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the - * request is rejected by server. + * 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}. */ @@ -209,14 +206,14 @@ Response revisionGetWithResponse( /** * Get a single workbook by its resourceName. - * + * * @param id the resource ID. * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. + * 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. + * 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}. */ @@ -224,23 +221,23 @@ Response revisionGetWithResponse( /** * Delete a workbook. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the - * request is rejected by server. + * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Delete a workbook. - * + * * @param id the resource ID. * @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. + * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @@ -248,7 +245,7 @@ Response revisionGetWithResponse( /** * Begins definition for a new Workbook resource. - * + * * @param name resource name. * @return the first stage of the new Workbook definition. */ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java index 2d501816c425c..05bfc0149259d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Workbook list result. */ +/** + * Workbook list result. + */ @Fluent public final class WorkbooksListResult { /* @@ -24,13 +26,15 @@ public final class WorkbooksListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of WorkbooksListResult class. */ + /** + * Creates an instance of WorkbooksListResult class. + */ public WorkbooksListResult() { } /** * Get the value property: An array of workbooks. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: The nextLink property. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * Set the nextLink property: The nextLink property. - * + * * @param nextLink the nextLink value to set. * @return the WorkbooksListResult object itself. */ @@ -59,7 +63,7 @@ public WorkbooksListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/package-info.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/package-info.java index 9202cf0531185..ce6423194d946 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 @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for ApplicationInsightsManagementClient. Composite Swagger for Application - * Insights Management Client. + * Package containing the data models for ApplicationInsightsManagementClient. + * Composite Swagger for Application Insights Management Client. */ 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 f6e592a7643c4..ebd7e89cc4b2a 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 @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for ApplicationInsightsManagementClient. Composite Swagger for Application Insights - * Management Client. + * Package containing the classes for ApplicationInsightsManagementClient. + * Composite Swagger for Application Insights Management Client. */ 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 4804b9d8c0bb9..7d110a894ccca 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 @@ -10,10 +10,6 @@ exports com.azure.resourcemanager.applicationinsights.fluent.models; exports com.azure.resourcemanager.applicationinsights.models; - opens com.azure.resourcemanager.applicationinsights.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.applicationinsights.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.applicationinsights.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.applicationinsights.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-applicationinsights/proxy-config.json b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-applicationinsights/proxy-config.json index 612c9a201106e..21b0585231845 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-applicationinsights/proxy-config.json +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-applicationinsights/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.applicationinsights.implementation.ComponentsClientImpl$ComponentsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.AnnotationsClientImpl$AnnotationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ApiKeysClientImpl$ApiKeysService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ExportConfigurationsClientImpl$ExportConfigurationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ComponentCurrentBillingFeaturesClientImpl$ComponentCurrentBillingFeaturesService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ComponentQuotaStatusClientImpl$ComponentQuotaStatusService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ComponentFeatureCapabilitiesClientImpl$ComponentFeatureCapabilitiesService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ComponentAvailableFeaturesClientImpl$ComponentAvailableFeaturesService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ProactiveDetectionConfigurationsClientImpl$ProactiveDetectionConfigurationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.WorkItemConfigurationsClientImpl$WorkItemConfigurationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.FavoritesClientImpl$FavoritesService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.WebTestLocationsClientImpl$WebTestLocationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.WebTestsClientImpl$WebTestsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.AnalyticsItemsClientImpl$AnalyticsItemsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.WorkbookTemplatesClientImpl$WorkbookTemplatesService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.MyWorkbooksClientImpl$MyWorkbooksService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.WorkbooksClientImpl$WorkbooksService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.LiveTokensClientImpl$LiveTokensService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.applicationinsights.implementation.ComponentsClientImpl$ComponentsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.AnnotationsClientImpl$AnnotationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ApiKeysClientImpl$ApiKeysService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ExportConfigurationsClientImpl$ExportConfigurationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ComponentCurrentBillingFeaturesClientImpl$ComponentCurrentBillingFeaturesService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ComponentQuotaStatusClientImpl$ComponentQuotaStatusService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ComponentFeatureCapabilitiesClientImpl$ComponentFeatureCapabilitiesService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ComponentAvailableFeaturesClientImpl$ComponentAvailableFeaturesService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ProactiveDetectionConfigurationsClientImpl$ProactiveDetectionConfigurationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.WorkItemConfigurationsClientImpl$WorkItemConfigurationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.FavoritesClientImpl$FavoritesService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.WebTestLocationsClientImpl$WebTestLocationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.WebTestsClientImpl$WebTestsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.AnalyticsItemsClientImpl$AnalyticsItemsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.WorkbookTemplatesClientImpl$WorkbookTemplatesService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.WorkbooksClientImpl$WorkbooksService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.LiveTokensClientImpl$LiveTokensService" ], [ "com.azure.resourcemanager.applicationinsights.implementation.ComponentLinkedStorageAccountsOperationsClientImpl$ComponentLinkedStorageAccountsOperationsService" ] ] \ No newline at end of file diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-applicationinsights/reflect-config.json b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-applicationinsights/reflect-config.json index 60ddbcf3113b1..2d87068158176 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-applicationinsights/reflect-config.json +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-applicationinsights/reflect-config.json @@ -8,11 +8,6 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException", "allDeclaredConstructors" : true, @@ -303,41 +298,6 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.applicationinsights.models.MyWorkbooksListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.applicationinsights.models.MyWorkbookResource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.applicationinsights.models.MyWorkbookUserAssignedIdentities", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.applicationinsights.models.ErrorDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.applicationinsights.models.WorkbooksListResult", "allDeclaredConstructors" : true, @@ -398,6 +358,21 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.applicationinsights.fluent.models.ComponentLinkedStorageAccountsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.applicationinsights.fluent.models.LinkedStorageAccountsProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccountsPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.applicationinsights.models.ApplicationType", "allDeclaredConstructors" : true, @@ -459,27 +434,22 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.applicationinsights.models.Kind", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentityType", + "name" : "com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType", + "name" : "com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind", + "name" : "com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateSharedTypeKind", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateSharedTypeKind", + "name" : "com.azure.resourcemanager.applicationinsights.models.StorageType", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true 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 ffff8ba4c737a..a0558dbf4e77a 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 @@ -6,26 +6,23 @@ import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; -/** Samples for AnalyticsItems Delete. */ +/** + * Samples for AnalyticsItems Delete. + */ public final class AnalyticsItemsDeleteSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemDelete.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * AnalyticsItemDelete.json */ /** * Sample code: AnalyticsItemDelete. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void analyticsItemDelete( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .analyticsItems() - .deleteWithResponse( - "my-resource-group", - "my-component", - ItemScopePath.ANALYTICS_ITEMS, - "3466c160-4a10-4df8-afdf-0007f3f6dee5", - null, - com.azure.core.util.Context.NONE); + public static void + analyticsItemDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.analyticsItems().deleteWithResponse("my-resource-group", "my-component", ItemScopePath.ANALYTICS_ITEMS, + "3466c160-4a10-4df8-afdf-0007f3f6dee5", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetSamples.java index 5050c7e419faf..b62698186afec 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 @@ -6,26 +6,23 @@ import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; -/** Samples for AnalyticsItems Get. */ +/** + * Samples for AnalyticsItems Get. + */ public final class AnalyticsItemsGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemGet.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemGet + * .json */ /** * Sample code: AnalyticsItemGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void analyticsItemGet( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .analyticsItems() - .getWithResponse( - "my-resource-group", - "my-component", - ItemScopePath.ANALYTICS_ITEMS, - "3466c160-4a10-4df8-afdf-0007f3f6dee5", - null, - com.azure.core.util.Context.NONE); + public static void + analyticsItemGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.analyticsItems().getWithResponse("my-resource-group", "my-component", ItemScopePath.ANALYTICS_ITEMS, + "3466c160-4a10-4df8-afdf-0007f3f6dee5", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListSamples.java index 4677486c66179..5d0c03bed618e 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 @@ -6,27 +6,23 @@ import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; -/** Samples for AnalyticsItems List. */ +/** + * Samples for AnalyticsItems List. + */ public final class AnalyticsItemsListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemList.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * AnalyticsItemList.json */ /** * Sample code: AnalyticsItemList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void analyticsItemList( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .analyticsItems() - .listWithResponse( - "my-resource-group", - "my-component", - ItemScopePath.ANALYTICS_ITEMS, - null, - null, - null, - com.azure.core.util.Context.NONE); + public static void + analyticsItemList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.analyticsItems().listWithResponse("my-resource-group", "my-component", ItemScopePath.ANALYTICS_ITEMS, + null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutSamples.java index 47903aa2d0c26..7a550c60a0fec 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 @@ -9,43 +9,27 @@ import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; import com.azure.resourcemanager.applicationinsights.models.ItemType; -/** Samples for AnalyticsItems Put. */ +/** + * Samples for AnalyticsItems Put. + */ public final class AnalyticsItemsPutSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemPut.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemPut + * .json */ /** * Sample code: AnalyticsItemPut. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void analyticsItemPut( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .analyticsItems() - .putWithResponse( - "my-resource-group", - "my-component", - ItemScopePath.ANALYTICS_ITEMS, - new ApplicationInsightsComponentAnalyticsItemInner() - .withName("Exceptions - New in the last 24 hours") - .withContent( - "let newExceptionsTimeRange = 1d;\n" - + "let timeRangeToCheckBefore = 7d;\n" - + "exceptions\n" - + "| where timestamp < ago(timeRangeToCheckBefore)\n" - + "| summarize count() by problemId\n" - + "| join kind= rightanti (\n" - + "exceptions\n" - + "| where timestamp >= ago(newExceptionsTimeRange)\n" - + "| extend stack = tostring(details[0].rawStack)\n" - + "| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp)," - + " any(stack) by problemId \n" - + ") on problemId \n" - + "| order by count_ desc\n") - .withScope(ItemScope.SHARED) - .withType(ItemType.QUERY), - null, - com.azure.core.util.Context.NONE); + public static void + analyticsItemPut(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.analyticsItems().putWithResponse("my-resource-group", "my-component", ItemScopePath.ANALYTICS_ITEMS, + new ApplicationInsightsComponentAnalyticsItemInner().withName("Exceptions - New in the last 24 hours") + .withContent( + "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n") + .withScope(ItemScope.SHARED).withType(ItemType.QUERY), + null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateSamples.java index 03f61878e1b83..48c2606fb3d3c 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 @@ -7,29 +7,27 @@ import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; import java.time.OffsetDateTime; -/** Samples for Annotations Create. */ +/** + * Samples for Annotations Create. + */ public final class AnnotationsCreateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsCreate.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * AnnotationsCreate.json */ /** * Sample code: AnnotationsCreate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void annotationsCreate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .annotations() - .createWithResponse( - "my-resource-group", - "my-component", - new AnnotationInner() - .withAnnotationName("TestAnnotation") - .withCategory("Text") - .withEventTime(OffsetDateTime.parse("2018-01-31T13:41:38.657Z")) - .withId("444e2c08-274a-4bbb-a89e-d77bb720f44a") - .withProperties("{\"Comments\":\"Testing\",\"Label\":\"Success\"}"), - com.azure.core.util.Context.NONE); + public static void + annotationsCreate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.annotations().createWithResponse("my-resource-group", "my-component", + new AnnotationInner().withAnnotationName("TestAnnotation").withCategory("Text") + .withEventTime(OffsetDateTime.parse("2018-01-31T13:41:38.657Z")) + .withId("444e2c08-274a-4bbb-a89e-d77bb720f44a") + .withProperties("{\"Comments\":\"Testing\",\"Label\":\"Success\"}"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java index fa2297441a4e6..2d7ceddeedf71 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java @@ -4,24 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Annotations Delete. */ +/** + * Samples for Annotations Delete. + */ public final class AnnotationsDeleteSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsDelete.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * AnnotationsDelete.json */ /** * Sample code: AnnotationsDelete. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void annotationsDelete( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .annotations() - .deleteWithResponse( - "my-resource-group", - "my-component", - "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", - com.azure.core.util.Context.NONE); + public static void + annotationsDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.annotations().deleteWithResponse("my-resource-group", "my-component", + "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java index 49126a65dfc38..695ff4fea34ef 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java @@ -4,24 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Annotations Get. */ +/** + * Samples for Annotations Get. + */ public final class AnnotationsGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsGet.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsGet. + * json */ /** * Sample code: AnnotationsGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void annotationsGet( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .annotations() - .getWithResponse( - "my-resource-group", - "my-component", - "444e2c08-274a-4bbb-a89e-d77bb720f44a", - com.azure.core.util.Context.NONE); + public static void + annotationsGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.annotations().getWithResponse("my-resource-group", "my-component", + "444e2c08-274a-4bbb-a89e-d77bb720f44a", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java index 98c3ef669d3f1..ea0ee921d0e57 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java @@ -4,25 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Annotations List. */ +/** + * Samples for Annotations List. + */ public final class AnnotationsListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsList.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsList. + * json */ /** * Sample code: AnnotationsList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void annotationsList( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .annotations() - .list( - "my-resource-group", - "my-component", - "2018-02-05T00%3A30%3A00.000Z", - "2018-02-06T00%3A33A00.000Z", - com.azure.core.util.Context.NONE); + public static void + annotationsList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.annotations().list("my-resource-group", "my-component", "2018-02-05T00%3A30%3A00.000Z", + "2018-02-06T00%3A33A00.000Z", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysCreateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysCreateSamples.java index c33dff012dd81..d982f252115e8 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 @@ -7,33 +7,27 @@ import com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest; import java.util.Arrays; -/** Samples for ApiKeys Create. */ +/** + * Samples for ApiKeys Create. + */ public final class ApiKeysCreateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysCreate.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysCreate. + * json */ /** * Sample code: APIKeyCreate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void aPIKeyCreate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .apiKeys() - .createWithResponse( - "my-resource-group", - "my-component", - new ApiKeyRequest() - .withName("test2") - .withLinkedReadProperties( - Arrays - .asList( - "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/api", - "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/agentconfig")) - .withLinkedWriteProperties( - Arrays - .asList( - "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/annotations")), - com.azure.core.util.Context.NONE); + manager.apiKeys().createWithResponse("my-resource-group", "my-component", new ApiKeyRequest().withName("test2") + .withLinkedReadProperties(Arrays.asList( + "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/api", + "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/agentconfig")) + .withLinkedWriteProperties(Arrays.asList( + "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/annotations")), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java index 24abac5023cdd..2e5bb8a7d7543 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java @@ -4,23 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ApiKeys Delete. */ +/** + * Samples for ApiKeys Delete. + */ public final class ApiKeysDeleteSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysDelete.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysDelete. + * json */ /** * Sample code: APIKeyDelete. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void aPIKeyDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .apiKeys() - .deleteWithResponse( - "my-resource-group", - "my-component", - "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", - com.azure.core.util.Context.NONE); + manager.apiKeys().deleteWithResponse("my-resource-group", "my-component", + "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java index cdf5c8f118a28..2acff438ce310 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java @@ -4,23 +4,21 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ApiKeys Get. */ +/** + * Samples for ApiKeys Get. + */ public final class ApiKeysGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysGet.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysGet.json */ /** * Sample code: APIKeysGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void aPIKeysGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .apiKeys() - .getWithResponse( - "my-resource-group", - "my-component", - "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", - com.azure.core.util.Context.NONE); + manager.apiKeys().getWithResponse("my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java index 768da4f94b5f9..4093426bb4fcc 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ApiKeys List. */ +/** + * Samples for ApiKeys List. + */ public final class ApiKeysListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysList.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysList.json */ /** * Sample code: APIKeysList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void aPIKeysList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { 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 8c30de3767fd2..a9e56d3b0a2f8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ComponentAvailableFeatures Get. */ +/** + * Samples for ComponentAvailableFeatures Get. + */ public final class ComponentAvailableFeaturesGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AvailableBillingFeaturesGet.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * AvailableBillingFeaturesGet.json */ /** * Sample code: ComponentCurrentBillingFeaturesGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .componentAvailableFeatures() - .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + manager.componentAvailableFeatures().getWithResponse("my-resource-group", "my-component", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java index b7835705b02f8..4630033389314 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ComponentCurrentBillingFeatures Get. */ +/** + * Samples for ComponentCurrentBillingFeatures Get. + */ public final class ComponentCurrentBillingFeaturesGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesGet.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * CurrentBillingFeaturesGet.json */ /** * Sample code: ComponentCurrentBillingFeaturesGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .componentCurrentBillingFeatures() - .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + manager.componentCurrentBillingFeatures().getWithResponse("my-resource-group", "my-component", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateSamples.java index 05d2731be99bb..c40156c142e20 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 @@ -8,28 +8,27 @@ import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap; import java.util.Arrays; -/** Samples for ComponentCurrentBillingFeatures Update. */ +/** + * Samples for ComponentCurrentBillingFeatures Update. + */ public final class ComponentCurrentBillingFeaturesUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesUpdate.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * CurrentBillingFeaturesUpdate.json */ /** * Sample code: ComponentCurrentBillingFeaturesUpdate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void componentCurrentBillingFeaturesUpdate( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .componentCurrentBillingFeatures() - .updateWithResponse( - "my-resource-group", - "my-component", + manager.componentCurrentBillingFeatures() + .updateWithResponse("my-resource-group", "my-component", new ApplicationInsightsComponentBillingFeaturesInner() - .withDataVolumeCap( - new ApplicationInsightsComponentDataVolumeCap() - .withCap(100.0F) - .withStopSendNotificationWhenHitCap(true)) + .withDataVolumeCap(new ApplicationInsightsComponentDataVolumeCap().withCap(100.0F) + .withStopSendNotificationWhenHitCap(true)) .withCurrentBillingFeatures(Arrays.asList("Basic", "Application Insights Enterprise")), com.azure.core.util.Context.NONE); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java index 11969016c11c0..64a03b93fdb77 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ComponentFeatureCapabilities Get. */ +/** + * Samples for ComponentFeatureCapabilities Get. + */ public final class ComponentFeatureCapabilitiesGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FeatureCapabilitiesGet.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * FeatureCapabilitiesGet.json */ /** * Sample code: ComponentCurrentBillingFeaturesGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .componentFeatureCapabilities() - .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + manager.componentFeatureCapabilities().getWithResponse("my-resource-group", "my-component", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationCreateAndUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationCreateAndUpdateSamples.java new file mode 100644 index 0000000000000..8d6a6c0c587ac --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationCreateAndUpdateSamples.java @@ -0,0 +1,31 @@ +// 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 new file mode 100644 index 0000000000000..29baa9a9cd03f --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationDeleteSamples.java @@ -0,0 +1,28 @@ +// 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 new file mode 100644 index 0000000000000..486b7465f41c6 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationGetSamples.java @@ -0,0 +1,28 @@ +// 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 new file mode 100644 index 0000000000000..89d193763442e --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationUpdateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.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 596c86c093cab..6c4df8aef01c2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ComponentQuotaStatus Get. */ +/** + * Samples for ComponentQuotaStatus Get. + */ public final class ComponentQuotaStatusGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/QuotaStatusGet.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/QuotaStatusGet. + * json */ /** * Sample code: ComponentCurrentBillingFeaturesGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .componentQuotaStatus() - .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + manager.componentQuotaStatus().getWithResponse("my-resource-group", "my-component", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsCreateOrUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsCreateOrUpdateSamples.java index 15d045a2a6300..90275ef4b95ec 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 @@ -10,50 +10,45 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Components CreateOrUpdate. */ +/** + * Samples for Components CreateOrUpdate. + */ 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: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsCreate + * .json */ /** * Sample code: ComponentCreate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentCreate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .define("my-component") - .withRegion("South Central US") - .withExistingResourceGroup("my-resource-group") - .withKind("web") - .withApplicationType(ApplicationType.WEB) - .withFlowType(FlowType.BLUEFIELD) - .withRequestSource(RequestSource.REST) + public static void + componentCreate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.components().define("my-component").withRegion("South Central US") + .withExistingResourceGroup("my-resource-group").withKind("web").withApplicationType(ApplicationType.WEB) + .withFlowType(FlowType.BLUEFIELD).withRequestSource(RequestSource.REST) .withWorkspaceResourceId( "/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace") .create(); } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsUpdate.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsUpdate + * .json */ /** * Sample code: ComponentUpdate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentUpdate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .define("my-component") - .withRegion("South Central US") - .withExistingResourceGroup("my-resource-group") - .withKind("web") - .withTags(mapOf("ApplicationGatewayType", "Internal-Only", "BillingEntity", "Self")) - .create(); + public static void + componentUpdate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.components().define("my-component").withRegion("South Central US") + .withExistingResourceGroup("my-resource-group").withKind("web") + .withTags(mapOf("ApplicationGatewayType", "Internal-Only", "BillingEntity", "Self")).create(); } // Use "Map.of" if available 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 ff2ff05e95a7d..adee807a6fcd3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Components Delete. */ +/** + * Samples for Components Delete. + */ 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: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsDelete + * .json */ /** * Sample code: ComponentsDelete. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentsDelete( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .deleteByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + public static void + componentsDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.components().deleteByResourceGroupWithResponse("my-resource-group", "my-component", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java index a57f071711fd6..cf37563b0706f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Components GetByResourceGroup. */ +/** + * Samples for Components GetByResourceGroup. + */ 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: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsGet. + * json */ /** * Sample code: ComponentGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void componentGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .getByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + manager.components().getByResourceGroupWithResponse("my-resource-group", "my-component", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java index 1673b10dac44a..e20cfef613db2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java @@ -4,24 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Components GetPurgeStatus. */ +/** + * Samples for Components GetPurgeStatus. + */ 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: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ + * ComponentsPurgeStatus.json */ /** * Sample code: ComponentPurge. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentPurge( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .getPurgeStatusWithResponse( - "OIAutoRest5123", - "aztest5048", - "purge-970318e7-b859-4edb-8903-83b1b54d0b74", - com.azure.core.util.Context.NONE); + public static void + componentPurge(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.components().getPurgeStatusWithResponse("OIAutoRest5123", "aztest5048", + "purge-970318e7-b859-4edb-8903-83b1b54d0b74", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java index 686dc234abf5e..617244283df0b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Components ListByResourceGroup. */ +/** + * Samples for Components ListByResourceGroup. + */ 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: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ + * ComponentsListByResourceGroup.json */ /** * Sample code: ComponentListByResourceGroup. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentListByResourceGroup( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + public static void + componentListByResourceGroup(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.components().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java index f415c01352f60..8332c3ac282bd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Components List. */ +/** + * Samples for Components List. + */ 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: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsList. + * json */ /** * Sample code: ComponentsList.json. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentsListJson( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + public static void + componentsListJson(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.components().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsPurgeSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsPurgeSamples.java index aad9539bc7333..779588d772c95 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 @@ -8,32 +8,25 @@ import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBodyFilters; import java.util.Arrays; -/** Samples for Components Purge. */ +/** + * Samples for Components Purge. + */ 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: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurge. + * json */ /** * Sample code: ComponentPurge. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentPurge( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .components() - .purgeWithResponse( - "OIAutoRest5123", - "aztest5048", - new ComponentPurgeBody() - .withTable("Heartbeat") - .withFilters( - Arrays - .asList( - new ComponentPurgeBodyFilters() - .withColumn("TimeGenerated") - .withOperator(">") - .withValue("2017-09-01T00:00:00"))), - com.azure.core.util.Context.NONE); + public static void + componentPurge(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.components().purgeWithResponse("OIAutoRest5123", "aztest5048", + new ComponentPurgeBody().withTable("Heartbeat").withFilters(Arrays.asList(new ComponentPurgeBodyFilters() + .withColumn("TimeGenerated").withOperator(">").withValue("2017-09-01T00:00:00"))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsUpdateTagsSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsUpdateTagsSamples.java index 3335e7df0de3c..ea0c706f7dbe7 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 @@ -8,37 +8,28 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Components UpdateTags. */ +/** + * Samples for Components UpdateTags. + */ 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: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ + * ComponentsUpdateTagsOnly.json */ /** * Sample code: ComponentUpdateTagsOnly. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void componentUpdateTagsOnly( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - ApplicationInsightsComponent resource = - manager - .components() - .getByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE) - .getValue(); + public static void + componentUpdateTagsOnly(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + ApplicationInsightsComponent resource = manager.components() + .getByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE) + .getValue(); resource - .update() - .withTags( - mapOf( - "ApplicationGatewayType", - "Internal-Only", - "BillingEntity", - "Self", - "Color", - "AzureBlue", - "CustomField_01", - "Custom text in some random field named randomly", - "NodeType", - "Edge")) + .update().withTags(mapOf("ApplicationGatewayType", "Internal-Only", "BillingEntity", "Self", "Color", + "AzureBlue", "CustomField_01", "Custom text in some random field named randomly", "NodeType", "Edge")) .apply(); } 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 4be758a3277d8..b224e33f0dc42 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 @@ -6,37 +6,32 @@ import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; -/** Samples for ExportConfigurations Create. */ +/** + * Samples for ExportConfigurations Create. + */ public final class ExportConfigurationsCreateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsPost.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * ExportConfigurationsPost.json */ /** * Sample code: ExportConfigurationPost. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void exportConfigurationPost( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .exportConfigurations() - .createWithResponse( - "my-resource-group", - "my-component", - new ApplicationInsightsComponentExportRequest() - .withRecordTypes( - "Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd," - + " PerformanceCounters, Availability") - .withDestinationType("Blob") - .withDestinationAddress( - "https://mystorageblob.blob.core.windows.net/testexport?sv=2015-04-05&sr=c&sig=token") - .withIsEnabled("true") - .withNotificationQueueEnabled("false") - .withNotificationQueueUri("") - .withDestinationStorageSubscriptionId("subid") - .withDestinationStorageLocationId("eastus") - .withDestinationAccountId( - "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), - com.azure.core.util.Context.NONE); + public static void + exportConfigurationPost(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.exportConfigurations().createWithResponse("my-resource-group", "my-component", + new ApplicationInsightsComponentExportRequest().withRecordTypes( + "Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd, PerformanceCounters, Availability") + .withDestinationType("Blob") + .withDestinationAddress( + "https://mystorageblob.blob.core.windows.net/testexport?sv=2015-04-05&sr=c&sig=token") + .withIsEnabled("true").withNotificationQueueEnabled("false").withNotificationQueueUri("") + .withDestinationStorageSubscriptionId("subid").withDestinationStorageLocationId("eastus") + .withDestinationAccountId( + "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java index 743e136d59e6f..13413224a3d72 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ExportConfigurations Delete. */ +/** + * Samples for ExportConfigurations Delete. + */ public final class ExportConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationDelete.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * ExportConfigurationDelete.json */ /** * Sample code: ExportConfigurationDelete. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void exportConfigurationDelete( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .exportConfigurations() - .deleteWithResponse( - "my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); + public static void + exportConfigurationDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.exportConfigurations().deleteWithResponse("my-resource-group", "my-component", + "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java index f3c369d14da70..62e2b6d1689c1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ExportConfigurations Get. */ +/** + * Samples for ExportConfigurations Get. + */ public final class ExportConfigurationsGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationGet.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * ExportConfigurationGet.json */ /** * Sample code: ExportConfigurationGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void exportConfigurationGet( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .exportConfigurations() - .getWithResponse( - "my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); + public static void + exportConfigurationGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.exportConfigurations().getWithResponse("my-resource-group", "my-component", + "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java index 607232b8740be..7528ed1dcef01 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ExportConfigurations List. */ +/** + * Samples for ExportConfigurations List. + */ public final class ExportConfigurationsListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsList.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * ExportConfigurationsList.json */ /** * Sample code: ExportConfigurationsList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void exportConfigurationsList( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .exportConfigurations() - .listWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + public static void + exportConfigurationsList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.exportConfigurations().listWithResponse("my-resource-group", "my-component", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsUpdateSamples.java index e90fc6b6c30ad..f8026fead4f70 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 @@ -6,38 +6,33 @@ import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; -/** Samples for ExportConfigurations Update. */ +/** + * Samples for ExportConfigurations Update. + */ public final class ExportConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationUpdate.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * ExportConfigurationUpdate.json */ /** * Sample code: ExportConfigurationUpdate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void exportConfigurationUpdate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .exportConfigurations() - .updateWithResponse( - "my-resource-group", - "my-component", - "uGOoki0jQsyEs3IdQ83Q4QsNr4=", - new ApplicationInsightsComponentExportRequest() - .withRecordTypes( - "Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd," - + " PerformanceCounters, Availability") - .withDestinationType("Blob") - .withDestinationAddress( - "https://mystorageblob.blob.core.windows.net/fchentest?sv=2015-04-05&sr=c&sig=token") - .withIsEnabled("true") - .withNotificationQueueEnabled("false") - .withNotificationQueueUri("") - .withDestinationStorageSubscriptionId("subid") - .withDestinationStorageLocationId("eastus") - .withDestinationAccountId( - "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), - com.azure.core.util.Context.NONE); + public static void + exportConfigurationUpdate(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager.exportConfigurations().updateWithResponse("my-resource-group", "my-component", + "uGOoki0jQsyEs3IdQ83Q4QsNr4=", + new ApplicationInsightsComponentExportRequest().withRecordTypes( + "Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd, PerformanceCounters, Availability") + .withDestinationType("Blob") + .withDestinationAddress( + "https://mystorageblob.blob.core.windows.net/fchentest?sv=2015-04-05&sr=c&sig=token") + .withIsEnabled("true").withNotificationQueueEnabled("false").withNotificationQueueUri("") + .withDestinationStorageSubscriptionId("subid").withDestinationStorageLocationId("eastus") + .withDestinationAccountId( + "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddSamples.java index e61549948262a..edfdff4adaed2 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 @@ -8,154 +8,26 @@ import com.azure.resourcemanager.applicationinsights.models.FavoriteType; import java.util.Arrays; -/** Samples for Favorites Add. */ +/** + * Samples for Favorites Add. + */ public final class FavoritesAddSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteAdd.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteAdd.json */ /** * Sample code: FavoriteAdd. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void favoriteAdd(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .favorites() - .addWithResponse( - "my-resource-group", - "my-ai-component", - "deadb33f-8bee-4d3b-a059-9be8dac93960", - new ApplicationInsightsComponentFavoriteInner() - .withName("Blah Blah Blah") - .withConfig( - "{\"MEDataModelRawJSON\":\"{\\n" - + " \\\"version\\\": \\\"1.4.1\\\",\\n" - + " \\\"isCustomDataModel\\\": true,\\n" - + " \\\"items\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\n" - + " \\\"chartType\\\": \\\"Area\\\",\\n" - + " \\\"chartHeight\\\": 4,\\n" - + " \\\"metrics\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"preview/requests/count\\\",\\n" - + " \\\"metricAggregation\\\": \\\"Sum\\\",\\n" - + " \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"priorPeriod\\\": false,\\n" - + " \\\"clickAction\\\": {\\n" - + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n" - + " },\\n" - + " \\\"horizontalBars\\\": true,\\n" - + " \\\"showOther\\\": true,\\n" - + " \\\"aggregation\\\": \\\"Sum\\\",\\n" - + " \\\"percentage\\\": false,\\n" - + " \\\"palette\\\": \\\"fail\\\",\\n" - + " \\\"yAxisOption\\\": 0,\\n" - + " \\\"title\\\": \\\"\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\n" - + " \\\"chartType\\\": \\\"Area\\\",\\n" - + " \\\"chartHeight\\\": 2,\\n" - + " \\\"metrics\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"preview/requests/duration\\\",\\n" - + " \\\"metricAggregation\\\": \\\"Avg\\\",\\n" - + " \\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"priorPeriod\\\": false,\\n" - + " \\\"clickAction\\\": {\\n" - + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n" - + " },\\n" - + " \\\"horizontalBars\\\": true,\\n" - + " \\\"showOther\\\": true,\\n" - + " \\\"aggregation\\\": \\\"Avg\\\",\\n" - + " \\\"percentage\\\": false,\\n" - + " \\\"palette\\\": \\\"greenHues\\\",\\n" - + " \\\"yAxisOption\\\": 0,\\n" - + " \\\"title\\\": \\\"\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\n" - + " \\\"chartType\\\": \\\"Bar\\\",\\n" - + " \\\"chartHeight\\\": 4,\\n" - + " \\\"metrics\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"preview/requests/duration\\\",\\n" - + " \\\"metricAggregation\\\": \\\"Avg\\\",\\n" - + " \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"priorPeriod\\\": false,\\n" - + " \\\"clickAction\\\": {\\n" - + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n" - + " },\\n" - + " \\\"horizontalBars\\\": true,\\n" - + " \\\"showOther\\\": true,\\n" - + " \\\"aggregation\\\": \\\"Avg\\\",\\n" - + " \\\"percentage\\\": false,\\n" - + " \\\"palette\\\": \\\"magentaHues\\\",\\n" - + " \\\"yAxisOption\\\": 0,\\n" - + " \\\"title\\\": \\\"\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\n" - + " \\\"grouping\\\": {\\n" - + " \\\"kind\\\": \\\"ByDimension\\\",\\n" - + " \\\"dimension\\\": \\\"context.application.version\\\"\\n" - + " },\\n" - + " \\\"chartType\\\": \\\"Grid\\\",\\n" - + " \\\"chartHeight\\\": 1,\\n" - + " \\\"metrics\\\": [\\n" - + " {\\n" - + " \\\"id\\\": \\\"basicException.count\\\",\\n" - + " \\\"metricAggregation\\\": \\\"Sum\\\",\\n" - + " \\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"\\n" - + " },\\n" - + " {\\n" - + " \\\"id\\\": \\\"requestFailed.count\\\",\\n" - + " \\\"metricAggregation\\\": \\\"Sum\\\",\\n" - + " \\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"priorPeriod\\\": true,\\n" - + " \\\"clickAction\\\": {\\n" - + " \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n" - + " },\\n" - + " \\\"horizontalBars\\\": true,\\n" - + " \\\"showOther\\\": true,\\n" - + " \\\"percentage\\\": false,\\n" - + " \\\"palette\\\": \\\"blueHues\\\",\\n" - + " \\\"yAxisOption\\\": 0,\\n" - + " \\\"title\\\": \\\"\\\"\\n" - + " }\\n" - + " ],\\n" - + " \\\"currentFilter\\\": {\\n" - + " \\\"eventTypes\\\": [\\n" - + " 1,\\n" - + " 2\\n" - + " ],\\n" - + " \\\"typeFacets\\\": {},\\n" - + " \\\"isPermissive\\\": false\\n" - + " },\\n" - + " \\\"timeContext\\\": {\\n" - + " \\\"durationMs\\\": 75600000,\\n" - + " \\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\n" - + " \\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\n" - + " \\\"isInitialTime\\\": false,\\n" - + " \\\"grain\\\": 1,\\n" - + " \\\"useDashboardTimeRange\\\": false\\n" - + " },\\n" - + " \\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\n" - + " \\\"timeSource\\\": 0\\n" - + "}\"}") - .withVersion("ME") - .withFavoriteType(FavoriteType.SHARED) - .withTags(Arrays.asList("TagSample01", "TagSample02")) - .withIsGeneratedFromTemplate(false), - com.azure.core.util.Context.NONE); + manager.favorites().addWithResponse("my-resource-group", "my-ai-component", + "deadb33f-8bee-4d3b-a059-9be8dac93960", + new ApplicationInsightsComponentFavoriteInner().withName("Blah Blah Blah").withConfig( + "{\"MEDataModelRawJSON\":\"{\\n \\\"version\\\": \\\"1.4.1\\\",\\n \\\"isCustomDataModel\\\": true,\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\n \\\"chartType\\\": \\\"Area\\\",\\n \\\"chartHeight\\\": 4,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Sum\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"fail\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\n \\\"chartType\\\": \\\"Area\\\",\\n \\\"chartHeight\\\": 2,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/duration\\\",\\n \\\"metricAggregation\\\": \\\"Avg\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Avg\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"greenHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\n \\\"chartType\\\": \\\"Bar\\\",\\n \\\"chartHeight\\\": 4,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/duration\\\",\\n \\\"metricAggregation\\\": \\\"Avg\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Avg\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"magentaHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\n \\\"grouping\\\": {\\n \\\"kind\\\": \\\"ByDimension\\\",\\n \\\"dimension\\\": \\\"context.application.version\\\"\\n },\\n \\\"chartType\\\": \\\"Grid\\\",\\n \\\"chartHeight\\\": 1,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"basicException.count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"\\n },\\n {\\n \\\"id\\\": \\\"requestFailed.count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": true,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"blueHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n }\\n ],\\n \\\"currentFilter\\\": {\\n \\\"eventTypes\\\": [\\n 1,\\n 2\\n ],\\n \\\"typeFacets\\\": {},\\n \\\"isPermissive\\\": false\\n },\\n \\\"timeContext\\\": {\\n \\\"durationMs\\\": 75600000,\\n \\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\n \\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\n \\\"isInitialTime\\\": false,\\n \\\"grain\\\": 1,\\n \\\"useDashboardTimeRange\\\": false\\n },\\n \\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\n \\\"timeSource\\\": 0\\n}\"}") + .withVersion("ME").withFavoriteType(FavoriteType.SHARED) + .withTags(Arrays.asList("TagSample01", "TagSample02")).withIsGeneratedFromTemplate(false), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java index a98970f9a054e..d9bf320bf3809 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java @@ -4,23 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Favorites Delete. */ +/** + * Samples for Favorites Delete. + */ public final class FavoritesDeleteSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteDelete.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteDelete. + * json */ /** * Sample code: FavoriteList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void favoriteList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .favorites() - .deleteWithResponse( - "my-resource-group", - "my-ai-component", - "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - com.azure.core.util.Context.NONE); + manager.favorites().deleteWithResponse("my-resource-group", "my-ai-component", + "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java index 1e9d8bd4bf01c..3d830db946b76 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java @@ -4,23 +4,21 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Favorites Get. */ +/** + * Samples for Favorites Get. + */ public final class FavoritesGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteGet.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteGet.json */ /** * Sample code: FavoriteGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void favoriteGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .favorites() - .getWithResponse( - "my-resource-group", - "my-ai-component", - "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - com.azure.core.util.Context.NONE); + manager.favorites().getWithResponse("my-resource-group", "my-ai-component", + "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java index 1d79b3e98172b..792842b354518 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Favorites List. */ +/** + * Samples for Favorites List. + */ public final class FavoritesListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoritesList.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoritesList. + * json */ /** * Sample code: FavoritesList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void favoritesList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .favorites() - .listWithResponse( - "my-resource-group", "my-ai-component", null, null, null, null, com.azure.core.util.Context.NONE); + manager.favorites().listWithResponse("my-resource-group", "my-ai-component", null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateSamples.java index b1c933bffa2f1..78c4ceb7a093c 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 @@ -8,70 +8,28 @@ import com.azure.resourcemanager.applicationinsights.models.FavoriteType; import java.util.Arrays; -/** Samples for Favorites Update. */ +/** + * Samples for Favorites Update. + */ public final class FavoritesUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteUpdate.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteUpdate. + * json */ /** * Sample code: FavoriteList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void favoriteList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .favorites() - .updateWithResponse( - "my-resource-group", - "my-ai-component", - "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - new ApplicationInsightsComponentFavoriteInner() - .withName("Derek Changed This") - .withConfig( - "{\"MEDataModelRawJSON\":\"{\\\"version\\\": \\\"1.4.1\\\",\\\"isCustomDataModel\\\":" - + " true,\\\"items\\\": [{\\\"id\\\":" - + " \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\\"chartType\\\":" - + " \\\"Area\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\":" - + " \\\"preview/requests/count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\":" - + " \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\":" - + " {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\":" - + " true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Sum\\\",\\\"percentage\\\":" - + " false,\\\"palette\\\": \\\"fail\\\",\\\"yAxisOption\\\": 0,\\\"title\\\":" - + " \\\"\\\"},{\\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\\"chartType\\\":" - + " \\\"Area\\\",\\\"chartHeight\\\": 2,\\\"metrics\\\": [{\\\"id\\\":" - + " \\\"preview/requests/duration\\\",\\\"metricAggregation\\\": \\\"Avg\\\",\\\"color\\\":" - + " \\\"msportalfx-bgcolor-j1\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\":" - + " {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\":" - + " true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\":" - + " false,\\\"palette\\\": \\\"greenHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\":" - + " \\\"\\\"},{\\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\\"chartType\\\":" - + " \\\"Bar\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\":" - + " \\\"preview/requests/duration\\\",\\\"metricAggregation\\\": \\\"Avg\\\",\\\"color\\\":" - + " \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\":" - + " {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\":" - + " true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\":" - + " false,\\\"palette\\\": \\\"magentaHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\":" - + " \\\"\\\"},{\\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\\"grouping\\\":" - + " {\\\"kind\\\": \\\"ByDimension\\\",\\\"dimension\\\":" - + " \\\"context.application.version\\\"},\\\"chartType\\\":" - + " \\\"Grid\\\",\\\"chartHeight\\\": 1,\\\"metrics\\\": [{\\\"id\\\":" - + " \\\"basicException.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\":" - + " \\\"msportalfx-bgcolor-g0\\\"},{\\\"id\\\":" - + " \\\"requestFailed.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\":" - + " \\\"msportalfx-bgcolor-f0s2\\\"}],\\\"priorPeriod\\\": true,\\\"clickAction\\\":" - + " {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\":" - + " true,\\\"showOther\\\": true,\\\"percentage\\\": false,\\\"palette\\\":" - + " \\\"blueHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\":" - + " \\\"\\\"}],\\\"currentFilter\\\": {\\\"eventTypes\\\": [1,2],\\\"typeFacets\\\":" - + " {},\\\"isPermissive\\\": false},\\\"timeContext\\\": {\\\"durationMs\\\":" - + " 75600000,\\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\\"createdTime\\\":" - + " \\\"2018-01-31T23:54:26.280Z\\\",\\\"isInitialTime\\\": false,\\\"grain\\\":" - + " 1,\\\"useDashboardTimeRange\\\": false},\\\"jsonUri\\\":" - + " \\\"Favorite_BlankChart\\\",\\\"timeSource\\\": 0}\"}") - .withVersion("ME") - .withFavoriteType(FavoriteType.SHARED) - .withTags(Arrays.asList("TagSample01", "TagSample02", "TagSample03")) - .withIsGeneratedFromTemplate(false), - com.azure.core.util.Context.NONE); + manager.favorites().updateWithResponse("my-resource-group", "my-ai-component", + "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + new ApplicationInsightsComponentFavoriteInner().withName("Derek Changed This").withConfig( + "{\"MEDataModelRawJSON\":\"{\\\"version\\\": \\\"1.4.1\\\",\\\"isCustomDataModel\\\": true,\\\"items\\\": [{\\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\\"chartType\\\": \\\"Area\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\": \\\"preview/requests/count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Sum\\\",\\\"percentage\\\": false,\\\"palette\\\": \\\"fail\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"},{\\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\\"chartType\\\": \\\"Area\\\",\\\"chartHeight\\\": 2,\\\"metrics\\\": [{\\\"id\\\": \\\"preview/requests/duration\\\",\\\"metricAggregation\\\": \\\"Avg\\\",\\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\": false,\\\"palette\\\": \\\"greenHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"},{\\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\\"chartType\\\": \\\"Bar\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\": \\\"preview/requests/duration\\\",\\\"metricAggregation\\\": \\\"Avg\\\",\\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\": false,\\\"palette\\\": \\\"magentaHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"},{\\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\\"grouping\\\": {\\\"kind\\\": \\\"ByDimension\\\",\\\"dimension\\\": \\\"context.application.version\\\"},\\\"chartType\\\": \\\"Grid\\\",\\\"chartHeight\\\": 1,\\\"metrics\\\": [{\\\"id\\\": \\\"basicException.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"},{\\\"id\\\": \\\"requestFailed.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"}],\\\"priorPeriod\\\": true,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"percentage\\\": false,\\\"palette\\\": \\\"blueHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"}],\\\"currentFilter\\\": {\\\"eventTypes\\\": [1,2],\\\"typeFacets\\\": {},\\\"isPermissive\\\": false},\\\"timeContext\\\": {\\\"durationMs\\\": 75600000,\\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\\"isInitialTime\\\": false,\\\"grain\\\": 1,\\\"useDashboardTimeRange\\\": false},\\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\\"timeSource\\\": 0}\"}") + .withVersion("ME").withFavoriteType(FavoriteType.SHARED) + .withTags(Arrays.asList("TagSample01", "TagSample02", "TagSample03")) + .withIsGeneratedFromTemplate(false), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/LiveTokenGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/LiveTokenGetSamples.java index 6260628e05b99..2dfabf287ce04 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/LiveTokenGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/LiveTokenGetSamples.java @@ -4,22 +4,24 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for LiveToken Get. */ +/** + * 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 + * 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); + 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/MyWorkbooksCreateOrUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksCreateOrUpdateSamples.java deleted file mode 100644 index 4b7e7f77e8846..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksCreateOrUpdateSamples.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.resourcemanager.applicationinsights.models.Kind; - -/** Samples for MyWorkbooks CreateOrUpdate. */ -public final class MyWorkbooksCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookAdd.json - */ - /** - * Sample code: WorkbookAdd. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbookAdd(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .myWorkbooks() - .define("deadb33f-8bee-4d3b-a059-9be8dac93960") - .withRegion("west us") - .withExistingResourceGroup("my-resource-group") - .withName("deadb33f-8bee-4d3b-a059-9be8dac93960") - .withKind(Kind.USER) - .withDisplayName("Blah Blah Blah") - .withSerializedData( - "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r" - + "\\n" - + "---\\r" - + "\\n" - + "\\r" - + "\\n" - + "Welcome to your new workbook. This area will display text formatted as markdown.\\r" - + "\\n" - + "\\r" - + "\\n" - + "\\r" - + "\\n" - + "We've included a basic analytics query to get you started. Use the `Edit` button below each" - + " section to configure it or add more" - + " sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union" - + " withsource=TableName *\\n" - + "| summarize Count=count() by TableName\\n" - + "| render" - + " barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}") - .withCategory("workbook") - .withSourceId( - "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens") - .create(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksDeleteSamples.java deleted file mode 100644 index d73a857b30990..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -/** Samples for MyWorkbooks Delete. */ -public final class MyWorkbooksDeleteSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookDelete.json - */ - /** - * Sample code: WorkbookDelete. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbookDelete( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .myWorkbooks() - .deleteByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksGetByResourceGroupSamples.java deleted file mode 100644 index 47b7cbc46499a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksGetByResourceGroupSamples.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 MyWorkbooks GetByResourceGroup. */ -public final class MyWorkbooksGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookGet.json - */ - /** - * Sample code: WorkbookGet. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbookGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .myWorkbooks() - .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListByResourceGroupSamples.java deleted file mode 100644 index 4958c600356e0..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListByResourceGroupSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.resourcemanager.applicationinsights.models.CategoryType; - -/** Samples for MyWorkbooks ListByResourceGroup. */ -public final class MyWorkbooksListByResourceGroupSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList.json - */ - /** - * Sample code: WorkbooksList. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbooksList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .myWorkbooks() - .listByResourceGroup( - "my-resource-group", CategoryType.WORKBOOK, null, null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList2.json - */ - /** - * Sample code: WorkbooksList2. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbooksList2( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .myWorkbooks() - .listByResourceGroup( - "my-resource-group", CategoryType.WORKBOOK, null, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListSamples.java deleted file mode 100644 index 0b4feb7a7e252..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListSamples.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.CategoryType; - -/** Samples for MyWorkbooks List. */ -public final class MyWorkbooksListSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList.json - */ - /** - * Sample code: WorkbooksList. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbooksList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList2.json - */ - /** - * Sample code: WorkbooksList2. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbooksList2( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksUpdateSamples.java deleted file mode 100644 index e05e79d7723a9..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksUpdateSamples.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; - -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; - -/** Samples for MyWorkbooks Update. */ -public final class MyWorkbooksUpdateSamples { - /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookUpdate.json - */ - /** - * Sample code: WorkbookUpdate. - * - * @param manager Entry point to ApplicationInsightsManager. - */ - public static void workbookUpdate( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - MyWorkbook resource = - manager - .myWorkbooks() - .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withKind(Kind.USER) - .withDisplayName("Blah Blah Blah") - .withSerializedData( - "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r" - + "\\n" - + "---\\r" - + "\\n" - + "\\r" - + "\\n" - + "Welcome to your new workbook. This area will display text formatted as markdown.\\r" - + "\\n" - + "\\r" - + "\\n" - + "\\r" - + "\\n" - + "We've included a basic analytics query to get you started. Use the `Edit` button below each" - + " section to configure it or add more" - + " sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union" - + " withsource=TableName *\\n" - + "| summarize Count=count() by TableName\\n" - + "| render" - + " barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}") - .withVersion("ME") - .withCategory("workbook") - .withSourceId( - "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens") - .apply(); - } -} 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 44ca345153ad2..d5408c680cb6b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ProactiveDetectionConfigurations Get. */ +/** + * Samples for ProactiveDetectionConfigurations Get. + */ public final class ProactiveDetectionConfigurationsGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationGet.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * ProactiveDetectionConfigurationGet.json */ /** * Sample code: ProactiveDetectionConfigurationGet. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void proactiveDetectionConfigurationGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .proactiveDetectionConfigurations() - .getWithResponse("my-resource-group", "my-component", "slowpageloadtime", com.azure.core.util.Context.NONE); + manager.proactiveDetectionConfigurations().getWithResponse("my-resource-group", "my-component", + "slowpageloadtime", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java index 3910dce18da53..2640e341efaa0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for ProactiveDetectionConfigurations List. */ +/** + * Samples for ProactiveDetectionConfigurations List. + */ public final class ProactiveDetectionConfigurationsListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationsList.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * ProactiveDetectionConfigurationsList.json */ /** * Sample code: ProactiveDetectionConfigurationsList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void proactiveDetectionConfigurationsList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .proactiveDetectionConfigurations() - .listWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); + manager.proactiveDetectionConfigurations().listWithResponse("my-resource-group", "my-component", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateSamples.java index aa1f9407dcb69..ce6ebc11e2890 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 @@ -8,40 +8,34 @@ import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; import java.util.Arrays; -/** Samples for ProactiveDetectionConfigurations Update. */ +/** + * Samples for ProactiveDetectionConfigurations Update. + */ public final class ProactiveDetectionConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationUpdate.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * ProactiveDetectionConfigurationUpdate.json */ /** * Sample code: ProactiveDetectionConfigurationUpdate. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void proactiveDetectionConfigurationUpdate( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .proactiveDetectionConfigurations() - .updateWithResponse( - "my-resource-group", - "my-component", - "slowpageloadtime", - new ApplicationInsightsComponentProactiveDetectionConfigurationInner() - .withName("slowpageloadtime") - .withEnabled(true) - .withSendEmailsToSubscriptionOwners(true) - .withCustomEmails(Arrays.asList("foo@microsoft.com", "foo2@microsoft.com")) - .withRuleDefinitions( - new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions() - .withName("slowpageloadtime") - .withDisplayName("Slow page load time") - .withDescription("Smart Detection rules notify you of performance anomaly issues.") - .withHelpUrl( - "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics") - .withIsHidden(false) - .withIsEnabledByDefault(true) - .withIsInPreview(false) - .withSupportsEmailNotifications(true)), - com.azure.core.util.Context.NONE); + manager.proactiveDetectionConfigurations().updateWithResponse("my-resource-group", "my-component", + "slowpageloadtime", + new ApplicationInsightsComponentProactiveDetectionConfigurationInner().withName("slowpageloadtime") + .withEnabled(true).withSendEmailsToSubscriptionOwners(true) + .withCustomEmails(Arrays.asList("foo@microsoft.com", "foo2@microsoft.com")) + .withRuleDefinitions(new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions() + .withName("slowpageloadtime").withDisplayName("Slow page load time") + .withDescription("Smart Detection rules notify you of performance anomaly issues.") + .withHelpUrl( + "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics") + .withIsHidden(false).withIsEnabledByDefault(true).withIsInPreview(false) + .withSupportsEmailNotifications(true)), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java index 4490a45943ac3..6fbc7be78f075 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WebTestLocations List. */ +/** + * Samples for WebTestLocations List. + */ public final class WebTestLocationsListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestLocationsList.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ + * WebTestLocationsList.json */ /** * Sample code: WebTestLocationsList. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void webTestLocationsList( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + public static void + webTestLocationsList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.webTestLocations().list("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsCreateOrUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsCreateOrUpdateSamples.java index e425dab149128..c3658ff16caff 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsCreateOrUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsCreateOrUpdateSamples.java @@ -12,131 +12,79 @@ import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRules; import java.util.Arrays; -/** Samples for WebTests CreateOrUpdate. */ +/** + * 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 + * 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) + 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( - "")) + .withConfiguration(new WebTestPropertiesConfiguration().withWebTest( + "")) .create(); } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestCreateStandard.json + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/ + * WebTestCreateStandard.json */ /** * Sample code: webTestCreateStandard. - * + * * @param manager Entry point to ApplicationInsightsManager. */ - public static void webTestCreateStandard( - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager - .webTests() - .define("my-webtest-my-component") - .withRegion("South Central US") - .withExistingResourceGroup("my-resource-group") - .withSyntheticMonitorId("my-webtest-my-component") - .withWebTestName("my-webtest-my-component") - .withDescription("Ping web test alert for mytestwebapp") - .withEnabled(true) - .withFrequency(900) - .withTimeout(120) - .withWebTestKind(WebTestKind.STANDARD) + 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=")) + .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 + * 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( - "")) + 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 index 4edf6d7ddbc76..7cedf37f640fc 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WebTests Delete. */ +/** + * 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 + * 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); + manager.webTests().deleteByResourceGroupWithResponse("my-resource-group", "my-webtest-01-mywebservice", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsGetByResourceGroupSamples.java index 1104001e69eb5..151b9213dbc37 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsGetByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsGetByResourceGroupSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WebTests GetByResourceGroup. */ +/** + * 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 + * 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); + 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 index cfba1763e9f35..82243da3a38c7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByComponentSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByComponentSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WebTests ListByComponent. */ +/** + * 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 + * 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) { + 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 index 4ead17286283c..d6aeac58b88f6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByResourceGroupSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WebTests ListByResourceGroup. */ +/** + * 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 + * 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) { + 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 index e5a5e26181cf1..31c79c28c23ee 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WebTests List. */ +/** + * 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 + * 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) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsUpdateTagsSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsUpdateTagsSamples.java index 08ab37fe20940..041981851c3aa 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsUpdateTagsSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsUpdateTagsSamples.java @@ -8,37 +8,28 @@ import java.util.HashMap; import java.util.Map; -/** Samples for WebTests UpdateTags. */ +/** + * 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 + * 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(); + 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 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 9ce64e219b02a..7104431dc336e 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 @@ -8,30 +8,28 @@ import java.util.HashMap; import java.util.Map; -/** Samples for WorkItemConfigurations Create. */ +/** + * 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 + * 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); + 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 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 fbd1ca8905863..63c040d578ff4 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WorkItemConfigurations Delete. */ +/** + * 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 + * 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); + 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); } } 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 11ffbab7d2662..d7a5f306202fb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WorkItemConfigurations GetDefault. */ +/** + * 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 + * 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); + manager.workItemConfigurations().getDefaultWithResponse("my-resource-group", "my-component", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java index 43bbac73d0ad7..0bc99214c9d59 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WorkItemConfigurations GetItem. */ +/** + * 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 + * 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); + manager.workItemConfigurations().getItemWithResponse("my-resource-group", "my-component", + "Visual Studio Team Services", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java index c4f8e0158b24d..a37b43c77f545 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WorkItemConfigurations List. */ +/** + * 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 + * 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) { + public static void + workItemConfigurationsList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager.workItemConfigurations().list("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemSamples.java index ae52da821678b..2ab08450bb30d 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 @@ -8,31 +8,29 @@ import java.util.HashMap; import java.util.Map; -/** Samples for WorkItemConfigurations UpdateItem. */ +/** + * 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 + * 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); + 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 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 index 07160d823416f..53ed5784b5f26 100644 --- 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 @@ -10,54 +10,30 @@ import java.io.IOException; import java.util.Arrays; -/** Samples for WorkbookTemplates CreateOrUpdate. */ +/** + * 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 + * x-ms-original-file: + * specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/ + * WorkbookTemplateAdd.json */ /** * Sample code: WorkbookTemplateAdd. - * + * * @param manager Entry point to ApplicationInsightsManager. */ public static void workbookTemplateAdd( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) throws IOException { - manager - .workbookTemplates() - .define("testtemplate2") - .withRegion("west us") - .withExistingResourceGroup("my-resource-group") - .withPriority(1) - .withAuthor("Contoso") - .withTemplateData( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"$schema\":\"https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json\",\"items\":[{\"name\":\"text" - + " - 2\",\"type\":1,\"content\":{\"json\":\"## New workbook\\n" - + "---\\n" - + "\\n" - + "Welcome to your new workbook. This area will display text formatted as markdown.\\n" - + "\\n" - + "\\n" - + "We've included a basic analytics query to get you started. Use the `Edit` button below" - + " each section to configure it or add more sections.\"}},{\"name\":\"query -" - + " 2\",\"type\":3,\"content\":{\"exportToExcelOptions\":\"visible\",\"query\":\"union" - + " withsource=TableName *\\n" - + "| summarize Count=count() by TableName\\n" - + "| render" - + " barchart\",\"queryType\":0,\"resourceType\":\"microsoft.operationalinsights/workspaces\",\"size\":1,\"version\":\"KqlItem/1.0\"}}],\"styleSettings\":{},\"version\":\"Notebook/1.0\"}", - Object.class, - SerializerEncoding.JSON)) + 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"))) + 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 index 711c5bb2b0666..ada7b51155ae1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WorkbookTemplates Delete. */ +/** + * 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 + * 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); + 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 index 933eb134170d4..2ba08b2566f1c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WorkbookTemplates GetByResourceGroup. */ +/** + * 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 + * 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); + 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 index 24db1de269a64..1c4b94c316799 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for WorkbookTemplates ListByResourceGroup. */ +/** + * 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 + * 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) { + 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 index 4a3e7580c1cbc..d0bc4bfc54a98 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesUpdateSamples.java @@ -6,24 +6,24 @@ import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; -/** Samples for WorkbookTemplates Update. */ +/** + * 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 + * 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(); + 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 index 5bceb1025dc7e..b85a66110ada1 100644 --- 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 @@ -11,85 +11,56 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Workbooks CreateOrUpdate. */ +/** + * Samples for Workbooks CreateOrUpdate. + */ public final class WorkbooksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedAdd.json + * 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") + 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") + .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") + "{\"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( + .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/2022-04-01/examples/WorkbookAdd.json + * 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") + 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") + .withKind(WorkbookSharedTypeKind.SHARED).withDisplayName("Sample workbook") .withSerializedData( - "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r" - + "\\n" - + "---\\r" - + "\\n" - + "\\r" - + "\\n" - + "Welcome to your new workbook. This area will display text formatted as markdown.\\r" - + "\\n" - + "\\r" - + "\\n" - + "\\r" - + "\\n" - + "We've included a basic analytics query to get you started. Use the `Edit` button below each" - + " section to configure it or add more" - + " sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union" - + " withsource=TableName *\\n" - + "| summarize Count=count() by TableName\\n" - + "| render" - + " barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}") - .withCategory("workbook") - .withDescription("Sample workbook") - .withSourceIdParameter( + "{\"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(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteSamples.java index fc0f24566a5ea..0c3a64523ef67 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Workbooks Delete. */ +/** + * Samples for Workbooks Delete. + */ public final class WorkbooksDeleteSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookDelete.json + * 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); + 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 index efacc417da19c..4d24fe9de5773 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupSamples.java @@ -4,51 +4,52 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Workbooks GetByResourceGroup. */ +/** + * Samples for Workbooks GetByResourceGroup. + */ public final class WorkbooksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet1.json + * 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); + 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/2022-04-01/examples/WorkbookManagedGet.json + * 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); + 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/2022-04-01/examples/WorkbookGet.json + * 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); + 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 index dc3506a96e5c9..914886bfc6da2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupSamples.java @@ -6,46 +6,40 @@ import com.azure.resourcemanager.applicationinsights.models.CategoryType; -/** Samples for Workbooks ListByResourceGroup. */ +/** + * Samples for Workbooks ListByResourceGroup. + */ public final class WorkbooksListByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksManagedList.json + * 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); + 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/2022-04-01/examples/WorkbooksList.json + * 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); + 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 index c2b1fafd3beab..719ee4c0759ee 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListSamples.java @@ -6,31 +6,37 @@ import com.azure.resourcemanager.applicationinsights.models.CategoryType; -/** Samples for Workbooks List. */ +/** + * Samples for Workbooks List. + */ public final class WorkbooksListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksListSub.json + * 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) { + 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/2022-04-01/examples/WorkbooksList2.json + * 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) { + 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 index fc1f78f9917a6..d09ba87bc4bac 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetSamples.java @@ -4,24 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Workbooks RevisionGet. */ +/** + * Samples for Workbooks RevisionGet. + */ public final class WorkbooksRevisionGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionGet.json + * 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); + 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 index 3080dc565fde7..c32ce9ed472cf 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.applicationinsights.generated; -/** Samples for Workbooks RevisionsList. */ +/** + * Samples for Workbooks RevisionsList. + */ public final class WorkbooksRevisionsListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionsList.json + * 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); + 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 index a9cb9ecfb9b5f..8f34b000a9509 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksUpdateSamples.java @@ -6,49 +6,44 @@ import com.azure.resourcemanager.applicationinsights.models.Workbook; -/** Samples for Workbooks Update. */ +/** + * Samples for Workbooks Update. + */ public final class WorkbooksUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookUpdate.json + * 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") + 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/2022-04-01/examples/WorkbookManagedUpdate.json + * 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() + 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 deleted file mode 100644 index ec8d8b549b2fb..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AnalyticsItemsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .analyticsItems() - .deleteWithResponse( - "kywuhpsvfuu", - "utlwexxwla", - ItemScopePath.MYANALYTICS_ITEMS, - "iexzsrzpge", - "q", - 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 deleted file mode 100644 index edf69b0602784..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetWithResponseMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem; -import com.azure.resourcemanager.applicationinsights.models.ItemScope; -import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; -import com.azure.resourcemanager.applicationinsights.models.ItemType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AnalyticsItemsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"Id\":\"hheioqaqhvseuf\",\"Name\":\"yrxpdlcgqls\",\"Content\":\"mjqfrddgamquhio\",\"Version\":\"sjuivfcdisyir\",\"Scope\":\"user\",\"Type\":\"function\",\"TimeCreated\":\"exrxzbujrtrhq\",\"TimeModified\":\"revkhgnlnzo\",\"Properties\":{\"functionAlias\":\"rpiqywncv\"}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentAnalyticsItem response = - manager - .analyticsItems() - .getWithResponse( - "sieekpndzaapm", - "dqmeqwigpibudq", - ItemScopePath.ANALYTICS_ITEMS, - "xebeybpmz", - "nrtffyaqi", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hheioqaqhvseuf", response.id()); - Assertions.assertEquals("yrxpdlcgqls", response.name()); - Assertions.assertEquals("mjqfrddgamquhio", response.content()); - Assertions.assertEquals(ItemScope.USER, response.scope()); - Assertions.assertEquals(ItemType.FUNCTION, response.type()); - Assertions.assertEquals("rpiqywncv", 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 deleted file mode 100644 index 3a163a8cbcb65..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListWithResponseMockTests.java +++ /dev/null @@ -1,87 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem; -import com.azure.resourcemanager.applicationinsights.models.ItemScope; -import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; -import com.azure.resourcemanager.applicationinsights.models.ItemType; -import com.azure.resourcemanager.applicationinsights.models.ItemTypeParameter; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AnalyticsItemsListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "[{\"Id\":\"qlgehg\",\"Name\":\"ipifhpfeoajvg\",\"Content\":\"txjcsheafidlt\",\"Version\":\"sr\",\"Scope\":\"shared\",\"Type\":\"recent\",\"TimeCreated\":\"jhoiftxfkfweg\",\"TimeModified\":\"hpt\",\"Properties\":{\"functionAlias\":\"ucb\"}},{\"Id\":\"tgdqohmcwsldriz\",\"Name\":\"pwbralllibphbqz\",\"Content\":\"zakakankjpdn\",\"Version\":\"ha\",\"Scope\":\"shared\",\"Type\":\"query\",\"TimeCreated\":\"lmuoyxprimrsopte\",\"TimeModified\":\"jme\",\"Properties\":{\"functionAlias\":\"stvasylwxdzaumw\"}},{\"Id\":\"ohguuf\",\"Name\":\"boyjathwt\",\"Content\":\"lbaemwmdxmeb\",\"Version\":\"scjpahlxv\",\"Scope\":\"user\",\"Type\":\"query\",\"TimeCreated\":\"nmwmqtibx\",\"TimeModified\":\"jddtvqct\",\"Properties\":{\"functionAlias\":\"ijaeukm\"}}]"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - List response = - manager - .analyticsItems() - .listWithResponse( - "ylkdghrje", - "utlwxezwzhok", - ItemScopePath.ANALYTICS_ITEMS, - ItemScope.USER, - ItemTypeParameter.NONE, - false, - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qlgehg", response.get(0).id()); - Assertions.assertEquals("ipifhpfeoajvg", response.get(0).name()); - Assertions.assertEquals("txjcsheafidlt", response.get(0).content()); - Assertions.assertEquals(ItemScope.SHARED, response.get(0).scope()); - Assertions.assertEquals(ItemType.RECENT, response.get(0).type()); - Assertions.assertEquals("ucb", 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 deleted file mode 100644 index 9d579a935e521..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutWithResponseMockTests.java +++ /dev/null @@ -1,93 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAnalyticsItemProperties; -import com.azure.resourcemanager.applicationinsights.models.ItemScope; -import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; -import com.azure.resourcemanager.applicationinsights.models.ItemType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AnalyticsItemsPutWithResponseMockTests { - @Test - public void testPutWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"Id\":\"hbxcu\",\"Name\":\"hxgsrboldfor\",\"Content\":\"wjlvizbfhfov\",\"Version\":\"cqpbtuo\",\"Scope\":\"user\",\"Type\":\"none\",\"TimeCreated\":\"bbelawumuaslzk\",\"TimeModified\":\"rwoycqucwyh\",\"Properties\":{\"functionAlias\":\"omd\"}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentAnalyticsItem response = - manager - .analyticsItems() - .putWithResponse( - "tszcofizehtdhgb", - "k", - ItemScopePath.MYANALYTICS_ITEMS, - new ApplicationInsightsComponentAnalyticsItemInner() - .withId("ljeamu") - .withName("zmlovuanash") - .withContent("lpmjerb") - .withScope(ItemScope.SHARED) - .withType(ItemType.FUNCTION) - .withProperties( - new ApplicationInsightsComponentAnalyticsItemProperties().withFunctionAlias("mkdasv")), - false, - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hbxcu", response.id()); - Assertions.assertEquals("hxgsrboldfor", response.name()); - Assertions.assertEquals("wjlvizbfhfov", response.content()); - Assertions.assertEquals(ItemScope.USER, response.scope()); - Assertions.assertEquals(ItemType.NONE, response.type()); - Assertions.assertEquals("omd", response.properties().functionAlias()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationErrorTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationErrorTests.java deleted file mode 100644 index bfc9658936bb9..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationErrorTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.AnnotationError; - -public final class AnnotationErrorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AnnotationError model = - BinaryData - .fromString( - "{\"innererror\":{\"diagnosticcontext\":\"pvwryoqpsoacc\",\"time\":\"2021-10-30T16:42:46Z\"}}") - .toObject(AnnotationError.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AnnotationError model = new AnnotationError(); - model = BinaryData.fromObject(model).toObject(AnnotationError.class); - } -} 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 deleted file mode 100644 index 4e477d066c61f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -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\"}") - .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()); - } - - @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"); - 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()); - } -} 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 deleted file mode 100644 index f2c0f44358988..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateWithResponseMockTests.java +++ /dev/null @@ -1,87 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; -import com.azure.resourcemanager.applicationinsights.models.Annotation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AnnotationsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "[{\"AnnotationName\":\"jjklff\",\"Category\":\"ouw\",\"EventTime\":\"2021-02-08T18:01:31Z\",\"Id\":\"rfzeey\",\"Properties\":\"izikayuhq\",\"RelatedAnnotation\":\"jbsybbqw\"},{\"AnnotationName\":\"t\",\"Category\":\"gmfpgvmp\",\"EventTime\":\"2021-10-24T06:37:57Z\",\"Id\":\"ltha\",\"Properties\":\"x\",\"RelatedAnnotation\":\"mwutwbdsre\"},{\"AnnotationName\":\"drhneuyow\",\"Category\":\"d\",\"EventTime\":\"2021-09-27T03:48:20Z\",\"Id\":\"sibircgpi\",\"Properties\":\"zimejzanlfzx\",\"RelatedAnnotation\":\"vrmbzono\"},{\"AnnotationName\":\"xrjqcirgzpfrlazs\",\"Category\":\"nwoiind\",\"EventTime\":\"2020-12-22T05:34:35Z\",\"Id\":\"jylwbtlhflsj\",\"Properties\":\"hszfjvfb\",\"RelatedAnnotation\":\"feljagrqm\"}]"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - List response = - manager - .annotations() - .createWithResponse( - "kghv", - "ndzwmkrefa", - new AnnotationInner() - .withAnnotationName("jorwkqnyhgbij") - .withCategory("ivfxzsjabibsyst") - .withEventTime(OffsetDateTime.parse("2021-05-13T21:12:04Z")) - .withId("djpvkvpbjxbkz") - .withProperties("kd") - .withRelatedAnnotation("cjabudurgkakmo"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("jjklff", response.get(0).annotationName()); - Assertions.assertEquals("ouw", response.get(0).category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T18:01:31Z"), response.get(0).eventTime()); - Assertions.assertEquals("rfzeey", response.get(0).id()); - Assertions.assertEquals("izikayuhq", response.get(0).properties()); - Assertions.assertEquals("jbsybbqw", 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 deleted file mode 100644 index e49647b1bbb39..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AnnotationsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .annotations() - .deleteWithResponse("hldvriii", "jnalghf", "vtvsexsowueluq", 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 deleted file mode 100644 index 7971da9d9241a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetWithResponseMockTests.java +++ /dev/null @@ -1,76 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.Annotation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AnnotationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "[{\"AnnotationName\":\"ujxukndxd\",\"Category\":\"rjguufzdmsyqtf\",\"EventTime\":\"2021-02-25T10:39:49Z\",\"Id\":\"botzingamvppho\",\"Properties\":\"qzudphq\",\"RelatedAnnotation\":\"vdkfwynwcvtbvk\"},{\"AnnotationName\":\"hmtnvy\",\"Category\":\"atkzwpcnpw\",\"EventTime\":\"2021-02-07T21:37:46Z\",\"Id\":\"esgvvsccyaj\",\"Properties\":\"qfhwyg\",\"RelatedAnnotation\":\"vdnkfxusem\"},{\"AnnotationName\":\"zrmuhapfcqdps\",\"Category\":\"qvpsvuoymg\",\"EventTime\":\"2021-10-29T23:35:36Z\",\"Id\":\"vezrypqlmfeo\",\"Properties\":\"rqwky\",\"RelatedAnnotation\":\"ob\"}]"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - List response = - manager - .annotations() - .getWithResponse("hahhxvrhmzkwpj", "wws", "ughftqsx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ujxukndxd", response.get(0).annotationName()); - Assertions.assertEquals("rjguufzdmsyqtf", response.get(0).category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T10:39:49Z"), response.get(0).eventTime()); - Assertions.assertEquals("botzingamvppho", response.get(0).id()); - Assertions.assertEquals("qzudphq", response.get(0).properties()); - Assertions.assertEquals("vdkfwynwcvtbvk", 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 deleted file mode 100644 index d2c7fe09cebe0..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.Annotation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AnnotationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"AnnotationName\":\"qunyowxwlmdjr\",\"Category\":\"fgbvfvpdbo\",\"EventTime\":\"2021-12-02T21:38:46Z\",\"Id\":\"zsjqlh\",\"Properties\":\"r\",\"RelatedAnnotation\":\"deibqip\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .annotations() - .list("ykhevxccedcpnmdy", "dnwzxltjcvnhltiu", "cxnavv", "xqi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qunyowxwlmdjr", response.iterator().next().annotationName()); - Assertions.assertEquals("fgbvfvpdbo", response.iterator().next().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T21:38:46Z"), response.iterator().next().eventTime()); - Assertions.assertEquals("zsjqlh", response.iterator().next().id()); - Assertions.assertEquals("r", response.iterator().next().properties()); - Assertions.assertEquals("deibqip", 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 deleted file mode 100644 index ae1582064f527..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListResultTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.AnnotationsListResult; - -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\"}]}") - .toObject(AnnotationsListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AnnotationsListResult model = new AnnotationsListResult(); - model = BinaryData.fromObject(model).toObject(AnnotationsListResult.class); - } -} 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 deleted file mode 100644 index 671f47a74a027..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeyRequestTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ApiKeyRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApiKeyRequest model = - BinaryData - .fromString( - "{\"name\":\"bpf\",\"linkedReadProperties\":[\"inzgvfcj\"],\"linkedWriteProperties\":[\"oxxjtfelluwf\",\"it\"]}") - .toObject(ApiKeyRequest.class); - Assertions.assertEquals("bpf", model.name()); - Assertions.assertEquals("inzgvfcj", model.linkedReadProperties().get(0)); - Assertions.assertEquals("oxxjtfelluwf", model.linkedWriteProperties().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApiKeyRequest model = - new ApiKeyRequest() - .withName("bpf") - .withLinkedReadProperties(Arrays.asList("inzgvfcj")) - .withLinkedWriteProperties(Arrays.asList("oxxjtfelluwf", "it")); - model = BinaryData.fromObject(model).toObject(ApiKeyRequest.class); - Assertions.assertEquals("bpf", model.name()); - Assertions.assertEquals("inzgvfcj", model.linkedReadProperties().get(0)); - Assertions.assertEquals("oxxjtfelluwf", 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 deleted file mode 100644 index ce8e3e84fcacc..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAnalyticsItemInnerTests.java +++ /dev/null @@ -1,48 +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.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAnalyticsItemProperties; -import com.azure.resourcemanager.applicationinsights.models.ItemScope; -import com.azure.resourcemanager.applicationinsights.models.ItemType; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationInsightsComponentAnalyticsItemInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentAnalyticsItemInner model = - BinaryData - .fromString( - "{\"Id\":\"okacspk\",\"Name\":\"hzdobpxjmflbvvnc\",\"Content\":\"kcciwwzjuqkhr\",\"Version\":\"jiwkuofoskghsau\",\"Scope\":\"user\",\"Type\":\"none\",\"TimeCreated\":\"xieduugidyjrr\",\"TimeModified\":\"y\",\"Properties\":{\"functionAlias\":\"v\"}}") - .toObject(ApplicationInsightsComponentAnalyticsItemInner.class); - Assertions.assertEquals("okacspk", model.id()); - Assertions.assertEquals("hzdobpxjmflbvvnc", model.name()); - Assertions.assertEquals("kcciwwzjuqkhr", model.content()); - Assertions.assertEquals(ItemScope.USER, model.scope()); - Assertions.assertEquals(ItemType.NONE, model.type()); - Assertions.assertEquals("v", model.properties().functionAlias()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentAnalyticsItemInner model = - new ApplicationInsightsComponentAnalyticsItemInner() - .withId("okacspk") - .withName("hzdobpxjmflbvvnc") - .withContent("kcciwwzjuqkhr") - .withScope(ItemScope.USER) - .withType(ItemType.NONE) - .withProperties(new ApplicationInsightsComponentAnalyticsItemProperties().withFunctionAlias("v")); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentAnalyticsItemInner.class); - Assertions.assertEquals("okacspk", model.id()); - Assertions.assertEquals("hzdobpxjmflbvvnc", model.name()); - Assertions.assertEquals("kcciwwzjuqkhr", model.content()); - Assertions.assertEquals(ItemScope.USER, model.scope()); - Assertions.assertEquals(ItemType.NONE, model.type()); - Assertions.assertEquals("v", 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 deleted file mode 100644 index 08fdc36299714..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAnalyticsItemPropertiesTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAnalyticsItemProperties; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationInsightsComponentAnalyticsItemPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentAnalyticsItemProperties model = - BinaryData - .fromString("{\"functionAlias\":\"csonpclhoco\"}") - .toObject(ApplicationInsightsComponentAnalyticsItemProperties.class); - Assertions.assertEquals("csonpclhoco", model.functionAlias()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentAnalyticsItemProperties model = - new ApplicationInsightsComponentAnalyticsItemProperties().withFunctionAlias("csonpclhoco"); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentAnalyticsItemProperties.class); - Assertions.assertEquals("csonpclhoco", 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 deleted file mode 100644 index f14e307f519ca..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentAvailableFeaturesInnerTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner; - -public final class ApplicationInsightsComponentAvailableFeaturesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentAvailableFeaturesInner model = - BinaryData - .fromString( - "{\"Result\":[{\"FeatureName\":\"vkaozwyiftyhxhur\",\"MeterId\":\"ftyxolniw\",\"MeterRateFrequency\":\"cukjf\",\"ResouceId\":\"iawxklry\",\"IsHidden\":true,\"Capabilities\":[{\"Name\":\"asy\",\"Description\":\"nddhsgcbacph\",\"Value\":\"koty\",\"Unit\":\"gou\",\"MeterId\":\"ndlik\",\"MeterRateFrequency\":\"qkgfgibma\"},{\"Name\":\"akeqs\",\"Description\":\"yb\",\"Value\":\"qedqytbciqfoufl\",\"Unit\":\"nkzsmodmglou\",\"MeterId\":\"b\",\"MeterRateFrequency\":\"tmut\"}],\"Title\":\"qktapspwgcuert\",\"IsMainFeature\":false,\"SupportedAddonFeatures\":\"o\"}]}") - .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 deleted file mode 100644 index 09ce8b0cc48d5..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentBillingFeaturesInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationInsightsComponentBillingFeaturesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentBillingFeaturesInner model = - BinaryData - .fromString( - "{\"DataVolumeCap\":{\"Cap\":80.98324,\"ResetTime\":1887671612,\"WarningThreshold\":565226786,\"StopSendNotificationWhenHitThreshold\":true,\"StopSendNotificationWhenHitCap\":false,\"MaxHistoryCap\":2.1371305},\"CurrentBillingFeatures\":[\"mjqulngsn\",\"nbybkzgcwrwcl\",\"xwrljdouskcqvkoc\",\"cjdkwtnhxbnjbi\"]}") - .toObject(ApplicationInsightsComponentBillingFeaturesInner.class); - Assertions.assertEquals(80.98324F, model.dataVolumeCap().cap()); - Assertions.assertEquals(565226786, model.dataVolumeCap().warningThreshold()); - Assertions.assertEquals(true, model.dataVolumeCap().stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(false, model.dataVolumeCap().stopSendNotificationWhenHitCap()); - Assertions.assertEquals("mjqulngsn", model.currentBillingFeatures().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentBillingFeaturesInner model = - new ApplicationInsightsComponentBillingFeaturesInner() - .withDataVolumeCap( - new ApplicationInsightsComponentDataVolumeCap() - .withCap(80.98324F) - .withWarningThreshold(565226786) - .withStopSendNotificationWhenHitThreshold(true) - .withStopSendNotificationWhenHitCap(false)) - .withCurrentBillingFeatures( - Arrays.asList("mjqulngsn", "nbybkzgcwrwcl", "xwrljdouskcqvkoc", "cjdkwtnhxbnjbi")); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentBillingFeaturesInner.class); - Assertions.assertEquals(80.98324F, model.dataVolumeCap().cap()); - Assertions.assertEquals(565226786, model.dataVolumeCap().warningThreshold()); - Assertions.assertEquals(true, model.dataVolumeCap().stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(false, model.dataVolumeCap().stopSendNotificationWhenHitCap()); - Assertions.assertEquals("mjqulngsn", 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 deleted file mode 100644 index a53a884d8b66b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentDataVolumeCapTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationInsightsComponentDataVolumeCapTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentDataVolumeCap model = - BinaryData - .fromString( - "{\"Cap\":85.262695,\"ResetTime\":727267147,\"WarningThreshold\":1154463022,\"StopSendNotificationWhenHitThreshold\":true,\"StopSendNotificationWhenHitCap\":true,\"MaxHistoryCap\":5.3407373}") - .toObject(ApplicationInsightsComponentDataVolumeCap.class); - Assertions.assertEquals(85.262695F, model.cap()); - Assertions.assertEquals(1154463022, model.warningThreshold()); - Assertions.assertEquals(true, model.stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(true, model.stopSendNotificationWhenHitCap()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentDataVolumeCap model = - new ApplicationInsightsComponentDataVolumeCap() - .withCap(85.262695F) - .withWarningThreshold(1154463022) - .withStopSendNotificationWhenHitThreshold(true) - .withStopSendNotificationWhenHitCap(true); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentDataVolumeCap.class); - Assertions.assertEquals(85.262695F, model.cap()); - Assertions.assertEquals(1154463022, model.warningThreshold()); - Assertions.assertEquals(true, model.stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(true, 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 deleted file mode 100644 index 477c4aea7c4d6..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentExportRequestTests.java +++ /dev/null @@ -1,54 +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.ApplicationInsightsComponentExportRequest; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationInsightsComponentExportRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentExportRequest model = - BinaryData - .fromString( - "{\"RecordTypes\":\"nmayhuybb\",\"DestinationType\":\"odepoogin\",\"DestinationAddress\":\"amiheognarxz\",\"IsEnabled\":\"heotusiv\",\"NotificationQueueEnabled\":\"v\",\"NotificationQueueUri\":\"iqihn\",\"DestinationStorageSubscriptionId\":\"ngbwjz\",\"DestinationStorageLocationId\":\"fygxgispemvtzfk\",\"DestinationAccountId\":\"ubljofxqe\"}") - .toObject(ApplicationInsightsComponentExportRequest.class); - Assertions.assertEquals("nmayhuybb", model.recordTypes()); - Assertions.assertEquals("odepoogin", model.destinationType()); - Assertions.assertEquals("amiheognarxz", model.destinationAddress()); - Assertions.assertEquals("heotusiv", model.isEnabled()); - Assertions.assertEquals("v", model.notificationQueueEnabled()); - Assertions.assertEquals("iqihn", model.notificationQueueUri()); - Assertions.assertEquals("ngbwjz", model.destinationStorageSubscriptionId()); - Assertions.assertEquals("fygxgispemvtzfk", model.destinationStorageLocationId()); - Assertions.assertEquals("ubljofxqe", model.destinationAccountId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentExportRequest model = - new ApplicationInsightsComponentExportRequest() - .withRecordTypes("nmayhuybb") - .withDestinationType("odepoogin") - .withDestinationAddress("amiheognarxz") - .withIsEnabled("heotusiv") - .withNotificationQueueEnabled("v") - .withNotificationQueueUri("iqihn") - .withDestinationStorageSubscriptionId("ngbwjz") - .withDestinationStorageLocationId("fygxgispemvtzfk") - .withDestinationAccountId("ubljofxqe"); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentExportRequest.class); - Assertions.assertEquals("nmayhuybb", model.recordTypes()); - Assertions.assertEquals("odepoogin", model.destinationType()); - Assertions.assertEquals("amiheognarxz", model.destinationAddress()); - Assertions.assertEquals("heotusiv", model.isEnabled()); - Assertions.assertEquals("v", model.notificationQueueEnabled()); - Assertions.assertEquals("iqihn", model.notificationQueueUri()); - Assertions.assertEquals("ngbwjz", model.destinationStorageSubscriptionId()); - Assertions.assertEquals("fygxgispemvtzfk", model.destinationStorageLocationId()); - Assertions.assertEquals("ubljofxqe", 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 deleted file mode 100644 index d418a214d86a7..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFavoriteInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; -import com.azure.resourcemanager.applicationinsights.models.FavoriteType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationInsightsComponentFavoriteInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentFavoriteInner model = - BinaryData - .fromString( - "{\"Name\":\"dzxibqeojnxqbzvd\",\"Config\":\"t\",\"Version\":\"deicbtwnpzao\",\"FavoriteId\":\"uhrhcffcyddgl\",\"FavoriteType\":\"shared\",\"SourceType\":\"jqkwpyeicx\",\"TimeModified\":\"ciwqvhk\",\"Tags\":[\"uigdtopbobjog\",\"m\",\"w\"],\"Category\":\"m\",\"IsGeneratedFromTemplate\":true,\"UserId\":\"z\"}") - .toObject(ApplicationInsightsComponentFavoriteInner.class); - Assertions.assertEquals("dzxibqeojnxqbzvd", model.name()); - Assertions.assertEquals("t", model.config()); - Assertions.assertEquals("deicbtwnpzao", model.version()); - Assertions.assertEquals(FavoriteType.SHARED, model.favoriteType()); - Assertions.assertEquals("jqkwpyeicx", model.sourceType()); - Assertions.assertEquals("uigdtopbobjog", model.tags().get(0)); - Assertions.assertEquals("m", model.category()); - Assertions.assertEquals(true, model.isGeneratedFromTemplate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentFavoriteInner model = - new ApplicationInsightsComponentFavoriteInner() - .withName("dzxibqeojnxqbzvd") - .withConfig("t") - .withVersion("deicbtwnpzao") - .withFavoriteType(FavoriteType.SHARED) - .withSourceType("jqkwpyeicx") - .withTags(Arrays.asList("uigdtopbobjog", "m", "w")) - .withCategory("m") - .withIsGeneratedFromTemplate(true); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsComponentFavoriteInner.class); - Assertions.assertEquals("dzxibqeojnxqbzvd", model.name()); - Assertions.assertEquals("t", model.config()); - Assertions.assertEquals("deicbtwnpzao", model.version()); - Assertions.assertEquals(FavoriteType.SHARED, model.favoriteType()); - Assertions.assertEquals("jqkwpyeicx", model.sourceType()); - Assertions.assertEquals("uigdtopbobjog", model.tags().get(0)); - Assertions.assertEquals("m", model.category()); - Assertions.assertEquals(true, 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 deleted file mode 100644 index e0783689a30ed..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureCapabilitiesInnerTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner; - -public final class ApplicationInsightsComponentFeatureCapabilitiesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentFeatureCapabilitiesInner model = - BinaryData - .fromString( - "{\"SupportExportData\":false,\"BurstThrottlePolicy\":\"ndhkrw\",\"MetadataClass\":\"appd\",\"LiveStreamMetrics\":true,\"ApplicationMap\":false,\"WorkItemIntegration\":false,\"PowerBIIntegration\":false,\"OpenSchema\":false,\"ProactiveDetection\":false,\"AnalyticsIntegration\":false,\"MultipleStepWebTest\":false,\"ApiAccessLevel\":\"eltmrldhugjzzdat\",\"TrackingType\":\"hocdgeab\",\"DailyCap\":22.124004,\"DailyCapResetTime\":91.44667,\"ThrottleRate\":89.55463}") - .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 deleted file mode 100644 index 9ae9e705d3874..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureCapabilityTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFeatureCapability; - -public final class ApplicationInsightsComponentFeatureCapabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentFeatureCapability model = - BinaryData - .fromString( - "{\"Name\":\"vkmijcmmxdcuf\",\"Description\":\"srp\",\"Value\":\"zidnsezcxtbzsgfy\",\"Unit\":\"sne\",\"MeterId\":\"dwzjeiach\",\"MeterRateFrequency\":\"osfln\"}") - .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 deleted file mode 100644 index 14011e8f38a88..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentFeatureTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFeature; - -public final class ApplicationInsightsComponentFeatureTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentFeature model = - BinaryData - .fromString( - "{\"FeatureName\":\"qw\",\"MeterId\":\"mdgbbjfdd\",\"MeterRateFrequency\":\"bmbexppbhtqqro\",\"ResouceId\":\"p\",\"IsHidden\":false,\"Capabilities\":[{\"Name\":\"bquxigjy\",\"Description\":\"zjaoyfhrtxil\",\"Value\":\"rkujy\",\"Unit\":\"l\",\"MeterId\":\"uvfqawrlyxwj\",\"MeterRateFrequency\":\"prbnwbxgjvtbv\"},{\"Name\":\"sszdnru\",\"Description\":\"guhmuouqfpr\",\"Value\":\"wbnguitnwui\",\"Unit\":\"a\",\"MeterId\":\"ufizuckyf\",\"MeterRateFrequency\":\"rfidfvzwdz\"}],\"Title\":\"tymw\",\"IsMainFeature\":true,\"SupportedAddonFeatures\":\"fthwxmnteiwa\"}") - .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 deleted file mode 100644 index 2ffd7d2ad3da2..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentProactiveDetectionConfigurationInnerTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationInsightsComponentProactiveDetectionConfigurationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentProactiveDetectionConfigurationInner model = - BinaryData - .fromString( - "{\"Name\":\"sfqpteehz\",\"Enabled\":true,\"SendEmailsToSubscriptionOwners\":false,\"CustomEmails\":[\"i\"],\"LastUpdatedTime\":\"inpvswjdkirsoodq\",\"RuleDefinitions\":{\"Name\":\"rmnohj\",\"DisplayName\":\"kwh\",\"Description\":\"oifiyipjxsqwpgr\",\"HelpUrl\":\"znorcj\",\"IsHidden\":false,\"IsEnabledByDefault\":false,\"IsInPreview\":true,\"SupportsEmailNotifications\":true}}") - .toObject(ApplicationInsightsComponentProactiveDetectionConfigurationInner.class); - Assertions.assertEquals("sfqpteehz", model.name()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(false, model.sendEmailsToSubscriptionOwners()); - Assertions.assertEquals("i", model.customEmails().get(0)); - Assertions.assertEquals("inpvswjdkirsoodq", model.lastUpdatedTime()); - Assertions.assertEquals("rmnohj", model.ruleDefinitions().name()); - Assertions.assertEquals("kwh", model.ruleDefinitions().displayName()); - Assertions.assertEquals("oifiyipjxsqwpgr", model.ruleDefinitions().description()); - Assertions.assertEquals("znorcj", model.ruleDefinitions().helpUrl()); - Assertions.assertEquals(false, model.ruleDefinitions().isHidden()); - Assertions.assertEquals(false, model.ruleDefinitions().isEnabledByDefault()); - Assertions.assertEquals(true, model.ruleDefinitions().isInPreview()); - Assertions.assertEquals(true, model.ruleDefinitions().supportsEmailNotifications()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentProactiveDetectionConfigurationInner model = - new ApplicationInsightsComponentProactiveDetectionConfigurationInner() - .withName("sfqpteehz") - .withEnabled(true) - .withSendEmailsToSubscriptionOwners(false) - .withCustomEmails(Arrays.asList("i")) - .withLastUpdatedTime("inpvswjdkirsoodq") - .withRuleDefinitions( - new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions() - .withName("rmnohj") - .withDisplayName("kwh") - .withDescription("oifiyipjxsqwpgr") - .withHelpUrl("znorcj") - .withIsHidden(false) - .withIsEnabledByDefault(false) - .withIsInPreview(true) - .withSupportsEmailNotifications(true)); - model = - BinaryData - .fromObject(model) - .toObject(ApplicationInsightsComponentProactiveDetectionConfigurationInner.class); - Assertions.assertEquals("sfqpteehz", model.name()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(false, model.sendEmailsToSubscriptionOwners()); - Assertions.assertEquals("i", model.customEmails().get(0)); - Assertions.assertEquals("inpvswjdkirsoodq", model.lastUpdatedTime()); - Assertions.assertEquals("rmnohj", model.ruleDefinitions().name()); - Assertions.assertEquals("kwh", model.ruleDefinitions().displayName()); - Assertions.assertEquals("oifiyipjxsqwpgr", model.ruleDefinitions().description()); - Assertions.assertEquals("znorcj", model.ruleDefinitions().helpUrl()); - Assertions.assertEquals(false, model.ruleDefinitions().isHidden()); - Assertions.assertEquals(false, model.ruleDefinitions().isEnabledByDefault()); - Assertions.assertEquals(true, model.ruleDefinitions().isInPreview()); - Assertions.assertEquals(true, 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 deleted file mode 100644 index 2efe99b142458..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitionsTests.java +++ /dev/null @@ -1,54 +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.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions model = - BinaryData - .fromString( - "{\"Name\":\"nmoc\",\"DisplayName\":\"ysh\",\"Description\":\"zafb\",\"HelpUrl\":\"j\",\"IsHidden\":true,\"IsEnabledByDefault\":false,\"IsInPreview\":false,\"SupportsEmailNotifications\":false}") - .toObject(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.class); - Assertions.assertEquals("nmoc", model.name()); - Assertions.assertEquals("ysh", model.displayName()); - Assertions.assertEquals("zafb", model.description()); - Assertions.assertEquals("j", model.helpUrl()); - Assertions.assertEquals(true, model.isHidden()); - Assertions.assertEquals(false, model.isEnabledByDefault()); - Assertions.assertEquals(false, model.isInPreview()); - Assertions.assertEquals(false, model.supportsEmailNotifications()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions model = - new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions() - .withName("nmoc") - .withDisplayName("ysh") - .withDescription("zafb") - .withHelpUrl("j") - .withIsHidden(true) - .withIsEnabledByDefault(false) - .withIsInPreview(false) - .withSupportsEmailNotifications(false); - model = - BinaryData - .fromObject(model) - .toObject(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.class); - Assertions.assertEquals("nmoc", model.name()); - Assertions.assertEquals("ysh", model.displayName()); - Assertions.assertEquals("zafb", model.description()); - Assertions.assertEquals("j", model.helpUrl()); - Assertions.assertEquals(true, model.isHidden()); - Assertions.assertEquals(false, model.isEnabledByDefault()); - Assertions.assertEquals(false, model.isInPreview()); - Assertions.assertEquals(false, 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 deleted file mode 100644 index b917a29ea7956..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentQuotaStatusInnerTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner; - -public final class ApplicationInsightsComponentQuotaStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentQuotaStatusInner model = - BinaryData - .fromString( - "{\"AppId\":\"wnzlljfmppeeb\",\"ShouldBeThrottled\":false,\"ExpirationTime\":\"sabkyqduujitcjcz\"}") - .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 deleted file mode 100644 index afad8af823ee3..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsComponentWebTestLocationInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; - -public final class ApplicationInsightsComponentWebTestLocationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsComponentWebTestLocationInner model = - BinaryData - .fromString("{\"DisplayName\":\"qfbow\",\"Tag\":\"anyktzlcuiywg\"}") - .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 deleted file mode 100644 index e97df44ff47eb..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ApplicationInsightsWebTestLocationsListResultTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsWebTestLocationsListResult; -import java.util.Arrays; - -public final class ApplicationInsightsWebTestLocationsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInsightsWebTestLocationsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"DisplayName\":\"vtpgvdfgiotkf\",\"Tag\":\"tqxln\"},{\"DisplayName\":\"lefgugnxk\",\"Tag\":\"dqmidtt\"},{\"DisplayName\":\"rvqdra\",\"Tag\":\"jybige\"}]}") - .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())); - model = BinaryData.fromObject(model).toObject(ApplicationInsightsWebTestLocationsListResult.class); - } -} 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 deleted file mode 100644 index 41eacd6676077..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAvailableFeatures; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentAvailableFeaturesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"Result\":[{\"FeatureName\":\"hyus\",\"MeterId\":\"kasdvlm\",\"MeterRateFrequency\":\"dgzxulucvpamrsr\",\"ResouceId\":\"zvxurisjnhny\",\"IsHidden\":false,\"Capabilities\":[{\"Name\":\"zgxmr\",\"Description\":\"blwpcesutrgj\",\"Value\":\"auutpwoqhihe\",\"Unit\":\"g\",\"MeterId\":\"pnfqntcyp\",\"MeterRateFrequency\":\"jv\"},{\"Name\":\"imwkslircizj\",\"Description\":\"ydfce\",\"Value\":\"vlhv\",\"Unit\":\"dyftumrtwna\",\"MeterId\":\"slbi\",\"MeterRateFrequency\":\"ojgcyzt\"},{\"Name\":\"mznbaeqphch\",\"Description\":\"rn\",\"Value\":\"x\",\"Unit\":\"uwrykqgaifmvikl\",\"MeterId\":\"dvk\",\"MeterRateFrequency\":\"ejd\"}],\"Title\":\"xcv\",\"IsMainFeature\":false,\"SupportedAddonFeatures\":\"njivolvtnovq\"},{\"FeatureName\":\"gemjdftuljltdu\",\"MeterId\":\"amtmcz\",\"MeterRateFrequency\":\"m\",\"ResouceId\":\"wcw\",\"IsHidden\":true,\"Capabilities\":[{\"Name\":\"ssxmojms\",\"Description\":\"kjprvk\",\"Value\":\"fz\",\"Unit\":\"jyxgtczh\",\"MeterId\":\"dbsdshm\",\"MeterRateFrequency\":\"maehvbbxurip\"},{\"Name\":\"fnhtbaxkgxyw\",\"Description\":\"kpyklyhp\",\"Value\":\"odpvruudlgzib\",\"Unit\":\"ostgkts\",\"MeterId\":\"dxeclzedqbcvh\",\"MeterRateFrequency\":\"h\"},{\"Name\":\"odqkdlwwqfb\",\"Description\":\"lkxt\",\"Value\":\"jfsmlmbtxhwgfwsr\",\"Unit\":\"wcoezbrhub\",\"MeterId\":\"hud\",\"MeterRateFrequency\":\"oookkqfq\"}],\"Title\":\"vleo\",\"IsMainFeature\":false,\"SupportedAddonFeatures\":\"uiqtqzfavy\"},{\"FeatureName\":\"qqybarye\",\"MeterId\":\"yjkqabqgzslesjcb\",\"MeterRateFrequency\":\"rnntiewdjcv\",\"ResouceId\":\"uwrbehwagoh\",\"IsHidden\":false,\"Capabilities\":[{\"Name\":\"rqemvvhmxt\",\"Description\":\"jfutacoebj\",\"Value\":\"wzcjznmwcpmgua\",\"Unit\":\"raufactkahzova\",\"MeterId\":\"ziuxxpshnee\",\"MeterRateFrequency\":\"lfg\"}],\"Title\":\"qubkw\",\"IsMainFeature\":false,\"SupportedAddonFeatures\":\"rds\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentAvailableFeatures response = - manager - .componentAvailableFeatures() - .getWithResponse("hirctymoxoftpipi", "yczuhxacpq", 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 deleted file mode 100644 index cd692d9316e29..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentBillingFeatures; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentCurrentBillingFeaturesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"DataVolumeCap\":{\"Cap\":72.29011,\"ResetTime\":2015224761,\"WarningThreshold\":142407954,\"StopSendNotificationWhenHitThreshold\":false,\"StopSendNotificationWhenHitCap\":false,\"MaxHistoryCap\":0.78641176},\"CurrentBillingFeatures\":[\"ozqyzh\",\"tw\",\"sgogczhonnxk\",\"lgnyhmo\"]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentBillingFeatures response = - manager - .componentCurrentBillingFeatures() - .getWithResponse("jlpijnkrx", "rddh", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(72.29011F, response.dataVolumeCap().cap()); - Assertions.assertEquals(142407954, response.dataVolumeCap().warningThreshold()); - Assertions.assertEquals(false, response.dataVolumeCap().stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(false, response.dataVolumeCap().stopSendNotificationWhenHitCap()); - Assertions.assertEquals("ozqyzh", 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 deleted file mode 100644 index cf4af31dfb034..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateWithResponseMockTests.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.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentBillingFeatures; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentCurrentBillingFeaturesUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"DataVolumeCap\":{\"Cap\":85.27624,\"ResetTime\":828801062,\"WarningThreshold\":1775941190,\"StopSendNotificationWhenHitThreshold\":false,\"StopSendNotificationWhenHitCap\":true,\"MaxHistoryCap\":37.982494},\"CurrentBillingFeatures\":[\"ntps\",\"wgioilqukry\",\"xtqmieoxor\",\"gufhyaomtbg\"]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentBillingFeatures response = - manager - .componentCurrentBillingFeatures() - .updateWithResponse( - "sxkkg", - "h", - new ApplicationInsightsComponentBillingFeaturesInner() - .withDataVolumeCap( - new ApplicationInsightsComponentDataVolumeCap() - .withCap(61.330803F) - .withWarningThreshold(1776403307) - .withStopSendNotificationWhenHitThreshold(true) - .withStopSendNotificationWhenHitCap(true)) - .withCurrentBillingFeatures( - Arrays.asList("rpdsof", "shrnsvbuswdvz", "ybycnunvj", "rtkfawnopq")), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(85.27624F, response.dataVolumeCap().cap()); - Assertions.assertEquals(1775941190, response.dataVolumeCap().warningThreshold()); - Assertions.assertEquals(false, response.dataVolumeCap().stopSendNotificationWhenHitThreshold()); - Assertions.assertEquals(true, response.dataVolumeCap().stopSendNotificationWhenHitCap()); - Assertions.assertEquals("ntps", 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 deleted file mode 100644 index 0fe18651c486f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFeatureCapabilities; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentFeatureCapabilitiesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"SupportExportData\":true,\"BurstThrottlePolicy\":\"scyhwz\",\"MetadataClass\":\"irujbz\",\"LiveStreamMetrics\":true,\"ApplicationMap\":true,\"WorkItemIntegration\":true,\"PowerBIIntegration\":false,\"OpenSchema\":false,\"ProactiveDetection\":true,\"AnalyticsIntegration\":true,\"MultipleStepWebTest\":true,\"ApiAccessLevel\":\"viylwdshfssnrbgy\",\"TrackingType\":\"rymsgaojfmw\",\"DailyCap\":45.922955,\"DailyCapResetTime\":73.57272,\"ThrottleRate\":23.704523}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentFeatureCapabilities response = - manager - .componentFeatureCapabilities() - .getWithResponse("fxumv", "cluyovwxnbkf", com.azure.core.util.Context.NONE) - .getValue(); - } -} 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 deleted file mode 100644 index 356ea7ff3f23a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentPurgeResponseInnerTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeResponseInner; -import org.junit.jupiter.api.Assertions; - -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()); - } -} 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 deleted file mode 100644 index c3530a393fad6..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentPurgeStatusResponseInnerTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeStatusResponseInner; -import com.azure.resourcemanager.applicationinsights.models.PurgeState; -import org.junit.jupiter.api.Assertions; - -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()); - } -} 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 deleted file mode 100644 index 2aa52a4a7f80f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetWithResponseMockTests.java +++ /dev/null @@ -1,66 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentQuotaStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentQuotaStatusGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"AppId\":\"zh\",\"ShouldBeThrottled\":true,\"ExpirationTime\":\"bgj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentQuotaStatus response = - manager - .componentQuotaStatus() - .getWithResponse("havgrvk", "fo", 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 deleted file mode 100644 index 044374671fc49..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.components().deleteByResourceGroupWithResponse("enuuzkopbm", "nrfdw", 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 deleted file mode 100644 index e85105c0b3276..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeStatusResponse; -import com.azure.resourcemanager.applicationinsights.models.PurgeState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentsGetPurgeStatusWithResponseMockTests { - @Test - public void testGetPurgeStatusWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"status\":\"pending\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentPurgeStatusResponse response = - manager - .components() - .getPurgeStatusWithResponse("iypbsfgytgusl", "eadcygqukyhejhz", "sx", 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 deleted file mode 100644 index eee8a24f413de..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsResourceTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.ComponentsResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -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\"}") - .toObject(ComponentsResource.class); - Assertions.assertEquals("usarhmofc", model.location()); - Assertions.assertEquals("my", model.tags().get("rkdtmlxh")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentsResource model = new ComponentsResource().withLocation("usarhmofc").withTags(mapOf("rkdtmlxh", "my")); - model = BinaryData.fromObject(model).toObject(ComponentsResource.class); - Assertions.assertEquals("usarhmofc", model.location()); - Assertions.assertEquals("my", model.tags().get("rkdtmlxh")); - } - - // 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/ErrorDefinitionTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ErrorDefinitionTests.java deleted file mode 100644 index 1ee25278314fa..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ErrorDefinitionTests.java +++ /dev/null @@ -1,22 +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.ErrorDefinition; - -public final class ErrorDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ErrorDefinition model = - BinaryData.fromString("{\"innererror\":\"dataocmbqfqvmkcxoza\"}").toObject(ErrorDefinition.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ErrorDefinition model = new ErrorDefinition(); - model = BinaryData.fromObject(model).toObject(ErrorDefinition.class); - } -} 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 deleted file mode 100644 index 10d66c629e107..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddWithResponseMockTests.java +++ /dev/null @@ -1,93 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFavorite; -import com.azure.resourcemanager.applicationinsights.models.FavoriteType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FavoritesAddWithResponseMockTests { - @Test - public void testAddWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"Name\":\"uagrttikteusqc\",\"Config\":\"vyklxuby\",\"Version\":\"ff\",\"FavoriteId\":\"fblcq\",\"FavoriteType\":\"shared\",\"SourceType\":\"gqibrtalmetttw\",\"TimeModified\":\"slqxi\",\"Tags\":[\"moo\",\"z\",\"seypxiutcxapz\"],\"Category\":\"rpetogebjoxsl\",\"IsGeneratedFromTemplate\":false,\"UserId\":\"labrqnkkzjcjbtr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentFavorite response = - manager - .favorites() - .addWithResponse( - "qwogfnzjvus", - "zldmozuxy", - "fsbtkad", - new ApplicationInsightsComponentFavoriteInner() - .withName("s") - .withConfig("nbtgkbugrjqctoj") - .withVersion("isofieypefojyqd") - .withFavoriteType(FavoriteType.SHARED) - .withSourceType("lcwkhihihlhz") - .withTags(Arrays.asList("gnowcjhfgmveca", "txmwoteyow", "luqovekqvg")) - .withCategory("uwifzmpjwyiv") - .withIsGeneratedFromTemplate(true), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("uagrttikteusqc", response.name()); - Assertions.assertEquals("vyklxuby", response.config()); - Assertions.assertEquals("ff", response.version()); - Assertions.assertEquals(FavoriteType.SHARED, response.favoriteType()); - Assertions.assertEquals("gqibrtalmetttw", response.sourceType()); - Assertions.assertEquals("moo", response.tags().get(0)); - Assertions.assertEquals("rpetogebjoxsl", response.category()); - Assertions.assertEquals(false, 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 deleted file mode 100644 index a28529168e99f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FavoritesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .favorites() - .deleteWithResponse("oxgsgbpfgzdjtx", "zflbqvg", "qvlgafcqusrdvetn", 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 deleted file mode 100644 index 4ce371c968dd7..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFavorite; -import com.azure.resourcemanager.applicationinsights.models.FavoriteType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FavoritesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"Name\":\"oyxcdyuib\",\"Config\":\"fdn\",\"Version\":\"ydvfvfcjnae\",\"FavoriteId\":\"srvhmgorffuki\",\"FavoriteType\":\"user\",\"SourceType\":\"mzhwplefaxvxi\",\"TimeModified\":\"btgn\",\"Tags\":[\"eyqxtjjfzql\",\"hycav\",\"dggxdbeesmi\",\"knlrariaawiuagy\"],\"Category\":\"qfby\",\"IsGeneratedFromTemplate\":false,\"UserId\":\"giagtcojo\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentFavorite response = - manager - .favorites() - .getWithResponse("udaspavehh", "vkbunzozudh", "xg", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("oyxcdyuib", response.name()); - Assertions.assertEquals("fdn", response.config()); - Assertions.assertEquals("ydvfvfcjnae", response.version()); - Assertions.assertEquals(FavoriteType.USER, response.favoriteType()); - Assertions.assertEquals("mzhwplefaxvxi", response.sourceType()); - Assertions.assertEquals("eyqxtjjfzql", response.tags().get(0)); - Assertions.assertEquals("qfby", response.category()); - Assertions.assertEquals(false, 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 deleted file mode 100644 index 6ee255cbe73b1..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListWithResponseMockTests.java +++ /dev/null @@ -1,88 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFavorite; -import com.azure.resourcemanager.applicationinsights.models.FavoriteSourceType; -import com.azure.resourcemanager.applicationinsights.models.FavoriteType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FavoritesListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "[{\"Name\":\"wva\",\"Config\":\"yuvvfonkp\",\"Version\":\"qyikvy\",\"FavoriteId\":\"uyav\",\"FavoriteType\":\"shared\",\"SourceType\":\"ncstt\",\"TimeModified\":\"fybvpoek\",\"Tags\":[\"sgbdhuz\",\"gnjdgkynscliqhz\",\"h\"],\"Category\":\"komtkubotppn\",\"IsGeneratedFromTemplate\":false,\"UserId\":\"xhihfrbbcevqagtl\"},{\"Name\":\"hlfkqojpy\",\"Config\":\"gtrd\",\"Version\":\"ifmzzsd\",\"FavoriteId\":\"brn\",\"FavoriteType\":\"shared\",\"SourceType\":\"m\",\"TimeModified\":\"a\",\"Tags\":[\"ckh\"],\"Category\":\"xvd\",\"IsGeneratedFromTemplate\":true,\"UserId\":\"afqr\"}]"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - List response = - manager - .favorites() - .listWithResponse( - "dynhdwdigum", - "nraauzz", - FavoriteType.SHARED, - FavoriteSourceType.SEGMENTATION, - false, - Arrays.asList("zysdzh"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wva", response.get(0).name()); - Assertions.assertEquals("yuvvfonkp", response.get(0).config()); - Assertions.assertEquals("qyikvy", response.get(0).version()); - Assertions.assertEquals(FavoriteType.SHARED, response.get(0).favoriteType()); - Assertions.assertEquals("ncstt", response.get(0).sourceType()); - Assertions.assertEquals("sgbdhuz", response.get(0).tags().get(0)); - Assertions.assertEquals("komtkubotppn", response.get(0).category()); - Assertions.assertEquals(false, 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 deleted file mode 100644 index 14ae8e916311b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateWithResponseMockTests.java +++ /dev/null @@ -1,93 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFavorite; -import com.azure.resourcemanager.applicationinsights.models.FavoriteType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FavoritesUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"Name\":\"hlf\",\"Config\":\"wpchwahf\",\"Version\":\"usnfepgfewet\",\"FavoriteId\":\"yxgncxykxhdjhli\",\"FavoriteType\":\"shared\",\"SourceType\":\"x\",\"TimeModified\":\"bcporxvxcjzhqizx\",\"Tags\":[\"tgqscjavftjuh\",\"qaz\",\"mtggu\",\"pijrajcivmmghf\"],\"Category\":\"iwrxgkn\",\"IsGeneratedFromTemplate\":false,\"UserId\":\"inzqodfvpgs\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentFavorite response = - manager - .favorites() - .updateWithResponse( - "aehvvibrxjjstoq", - "eitpkxztmo", - "bklftidgfcwqmpim", - new ApplicationInsightsComponentFavoriteInner() - .withName("xzhemjyh") - .withConfig("uj") - .withVersion("t") - .withFavoriteType(FavoriteType.USER) - .withSourceType("jnjwltlwt") - .withTags(Arrays.asList("hsnvkcdmxzrp", "aimlnwiaaom", "l")) - .withCategory("azul") - .withIsGeneratedFromTemplate(true), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hlf", response.name()); - Assertions.assertEquals("wpchwahf", response.config()); - Assertions.assertEquals("usnfepgfewet", response.version()); - Assertions.assertEquals(FavoriteType.SHARED, response.favoriteType()); - Assertions.assertEquals("x", response.sourceType()); - Assertions.assertEquals("tgqscjavftjuh", response.tags().get(0)); - Assertions.assertEquals("iwrxgkn", response.category()); - Assertions.assertEquals(false, 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 deleted file mode 100644 index 28ebda0a902d1..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/InnerErrorTests.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.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.InnerError; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class InnerErrorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InnerError model = - BinaryData - .fromString("{\"diagnosticcontext\":\"kljla\",\"time\":\"2021-06-15T07:28:27Z\"}") - .toObject(InnerError.class); - Assertions.assertEquals("kljla", model.diagnosticcontext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-15T07:28:27Z"), model.time()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InnerError model = - new InnerError().withDiagnosticcontext("kljla").withTime(OffsetDateTime.parse("2021-06-15T07:28:27Z")); - model = BinaryData.fromObject(model).toObject(InnerError.class); - Assertions.assertEquals("kljla", model.diagnosticcontext()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-15T07:28:27Z"), model.time()); - } -} 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 deleted file mode 100644 index 5e02e4d95e189..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,54 +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.ManagedServiceIdentity; -import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"5ac184f3-e838-424e-a537-b3a516fc3c67\",\"tenantId\":\"c116fb11-95c4-48a7-91cf-0e188af1c05a\",\"type\":\"None\",\"userAssignedIdentities\":{\"ztppriolxorjalto\":{\"principalId\":\"daa7de2f-8519-4a21-a35f-86349edd5d2e\",\"clientId\":\"0d9b4504-7285-4073-af7f-490f38d4406b\"},\"cwsobqwcs\":{\"principalId\":\"a9012897-781c-4847-b010-ff1e095af3ce\",\"clientId\":\"02f84796-f3f8-460d-9110-a73ae46299d5\"},\"wdcfhucqdpfuv\":{\"principalId\":\"2ee4bc46-e973-40db-a8b2-a3c985ad727b\",\"clientId\":\"8ab54990-ef46-437e-a9be-557466b7c7ac\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf( - "ztppriolxorjalto", - new UserAssignedIdentity(), - "cwsobqwcs", - new UserAssignedIdentity(), - "wdcfhucqdpfuv", - new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - // 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/MyWorkbookInnerTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookInnerTests.java deleted file mode 100644 index 3189091334708..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookInnerTests.java +++ /dev/null @@ -1,94 +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.fluent.models.MyWorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentity; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentityType; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookUserAssignedIdentities; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MyWorkbookInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MyWorkbookInner model = - BinaryData - .fromString( - "{\"kind\":\"user\",\"properties\":{\"displayName\":\"lpstdbhhxsrzdz\",\"serializedData\":\"cers\",\"version\":\"ntnev\",\"timeModified\":\"wjmy\",\"category\":\"tdss\",\"tags\":[\"tmweriofzpyq\",\"emwabnet\"],\"userId\":\"hszhedplvwiwu\",\"sourceId\":\"wmbesldnkw\",\"storageUri\":\"pp\"},\"identity\":{\"userAssignedIdentities\":{\"principalId\":\"ogaok\",\"tenantId\":\"z\"},\"type\":\"None\"},\"id\":\"morppxebmnzbtbh\",\"name\":\"pglkf\",\"type\":\"ohdneuel\",\"etag\":{\"ibqdxbxwakbogqx\":\"dkwobdagx\",\"lbpodxunk\":\"dlkzgxhuri\"},\"location\":\"ebxmubyynt\",\"tags\":{\"ltmuwlauwzizx\":\"bqtkoievseotgqr\",\"d\":\"mpgcjefuzmuvpbt\"}}") - .toObject(MyWorkbookInner.class); - Assertions.assertEquals("ebxmubyynt", model.location()); - Assertions.assertEquals("bqtkoievseotgqr", model.tags().get("ltmuwlauwzizx")); - Assertions.assertEquals(MyWorkbookManagedIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("morppxebmnzbtbh", model.id()); - Assertions.assertEquals("pglkf", model.name()); - Assertions.assertEquals("ohdneuel", model.type()); - Assertions.assertEquals("dkwobdagx", model.etag().get("ibqdxbxwakbogqx")); - Assertions.assertEquals(Kind.USER, model.kind()); - Assertions.assertEquals("lpstdbhhxsrzdz", model.displayName()); - Assertions.assertEquals("cers", model.serializedData()); - Assertions.assertEquals("ntnev", model.version()); - Assertions.assertEquals("tdss", model.category()); - Assertions.assertEquals("tmweriofzpyq", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("wmbesldnkw", model.sourceId()); - Assertions.assertEquals("pp", model.storageUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MyWorkbookInner model = - new MyWorkbookInner() - .withLocation("ebxmubyynt") - .withTags(mapOf("ltmuwlauwzizx", "bqtkoievseotgqr", "d", "mpgcjefuzmuvpbt")) - .withIdentity( - new MyWorkbookManagedIdentity() - .withUserAssignedIdentities(new MyWorkbookUserAssignedIdentities()) - .withType(MyWorkbookManagedIdentityType.NONE)) - .withId("morppxebmnzbtbh") - .withName("pglkf") - .withType("ohdneuel") - .withEtag(mapOf("ibqdxbxwakbogqx", "dkwobdagx", "lbpodxunk", "dlkzgxhuri")) - .withKind(Kind.USER) - .withDisplayName("lpstdbhhxsrzdz") - .withSerializedData("cers") - .withVersion("ntnev") - .withCategory("tdss") - .withTagsPropertiesTags(Arrays.asList("tmweriofzpyq", "emwabnet")) - .withSourceId("wmbesldnkw") - .withStorageUri("pp"); - model = BinaryData.fromObject(model).toObject(MyWorkbookInner.class); - Assertions.assertEquals("ebxmubyynt", model.location()); - Assertions.assertEquals("bqtkoievseotgqr", model.tags().get("ltmuwlauwzizx")); - Assertions.assertEquals(MyWorkbookManagedIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("morppxebmnzbtbh", model.id()); - Assertions.assertEquals("pglkf", model.name()); - Assertions.assertEquals("ohdneuel", model.type()); - Assertions.assertEquals("dkwobdagx", model.etag().get("ibqdxbxwakbogqx")); - Assertions.assertEquals(Kind.USER, model.kind()); - Assertions.assertEquals("lpstdbhhxsrzdz", model.displayName()); - Assertions.assertEquals("cers", model.serializedData()); - Assertions.assertEquals("ntnev", model.version()); - Assertions.assertEquals("tdss", model.category()); - Assertions.assertEquals("tmweriofzpyq", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("wmbesldnkw", model.sourceId()); - Assertions.assertEquals("pp", model.storageUri()); - } - - // 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/MyWorkbookManagedIdentityTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookManagedIdentityTests.java deleted file mode 100644 index d2fa12aad5f76..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookManagedIdentityTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentity; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentityType; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookUserAssignedIdentities; -import org.junit.jupiter.api.Assertions; - -public final class MyWorkbookManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MyWorkbookManagedIdentity model = - BinaryData - .fromString( - "{\"userAssignedIdentities\":{\"principalId\":\"smond\",\"tenantId\":\"quxvypomgkop\"},\"type\":\"None\"}") - .toObject(MyWorkbookManagedIdentity.class); - Assertions.assertEquals(MyWorkbookManagedIdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MyWorkbookManagedIdentity model = - new MyWorkbookManagedIdentity() - .withUserAssignedIdentities(new MyWorkbookUserAssignedIdentities()) - .withType(MyWorkbookManagedIdentityType.NONE); - model = BinaryData.fromObject(model).toObject(MyWorkbookManagedIdentity.class); - Assertions.assertEquals(MyWorkbookManagedIdentityType.NONE, model.type()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookPropertiesTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookPropertiesTests.java deleted file mode 100644 index a1375af7a6eef..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookPropertiesTests.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.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MyWorkbookPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MyWorkbookProperties model = - BinaryData - .fromString( - "{\"displayName\":\"phsdyhto\",\"serializedData\":\"fikdowwqu\",\"version\":\"xzxcl\",\"timeModified\":\"thhqzonosggbh\",\"category\":\"ohfwds\",\"tags\":[\"aljutiiswac\"],\"userId\":\"gdkz\",\"sourceId\":\"wkfvhqcrailvp\",\"storageUri\":\"pfuflrw\"}") - .toObject(MyWorkbookProperties.class); - Assertions.assertEquals("phsdyhto", model.displayName()); - Assertions.assertEquals("fikdowwqu", model.serializedData()); - Assertions.assertEquals("xzxcl", model.version()); - Assertions.assertEquals("ohfwds", model.category()); - Assertions.assertEquals("aljutiiswac", model.tags().get(0)); - Assertions.assertEquals("wkfvhqcrailvp", model.sourceId()); - Assertions.assertEquals("pfuflrw", model.storageUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MyWorkbookProperties model = - new MyWorkbookProperties() - .withDisplayName("phsdyhto") - .withSerializedData("fikdowwqu") - .withVersion("xzxcl") - .withCategory("ohfwds") - .withTags(Arrays.asList("aljutiiswac")) - .withSourceId("wkfvhqcrailvp") - .withStorageUri("pfuflrw"); - model = BinaryData.fromObject(model).toObject(MyWorkbookProperties.class); - Assertions.assertEquals("phsdyhto", model.displayName()); - Assertions.assertEquals("fikdowwqu", model.serializedData()); - Assertions.assertEquals("xzxcl", model.version()); - Assertions.assertEquals("ohfwds", model.category()); - Assertions.assertEquals("aljutiiswac", model.tags().get(0)); - Assertions.assertEquals("wkfvhqcrailvp", model.sourceId()); - Assertions.assertEquals("pfuflrw", model.storageUri()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookResourceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookResourceTests.java deleted file mode 100644 index e3b7721353323..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookResourceTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentity; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentityType; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookResource; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookUserAssignedIdentities; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MyWorkbookResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MyWorkbookResource model = - BinaryData - .fromString( - "{\"identity\":{\"userAssignedIdentities\":{\"principalId\":\"lxyjr\",\"tenantId\":\"agafcnihgwqap\"},\"type\":\"None\"},\"id\":\"rfouyftaakcpw\",\"name\":\"yzvqt\",\"type\":\"nubexk\",\"etag\":{\"d\":\"zdopcjwvnhd\",\"twuoegrpkhjwni\":\"mgxcxrslpm\"},\"location\":\"qsluicp\",\"tags\":{\"uefywsbpfvmwy\":\"kzzlvmbmpaxmodf\"}}") - .toObject(MyWorkbookResource.class); - Assertions.assertEquals("qsluicp", model.location()); - Assertions.assertEquals("kzzlvmbmpaxmodf", model.tags().get("uefywsbpfvmwy")); - Assertions.assertEquals(MyWorkbookManagedIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("rfouyftaakcpw", model.id()); - Assertions.assertEquals("yzvqt", model.name()); - Assertions.assertEquals("nubexk", model.type()); - Assertions.assertEquals("zdopcjwvnhd", model.etag().get("d")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MyWorkbookResource model = - new MyWorkbookResource() - .withLocation("qsluicp") - .withTags(mapOf("uefywsbpfvmwy", "kzzlvmbmpaxmodf")) - .withIdentity( - new MyWorkbookManagedIdentity() - .withUserAssignedIdentities(new MyWorkbookUserAssignedIdentities()) - .withType(MyWorkbookManagedIdentityType.NONE)) - .withId("rfouyftaakcpw") - .withName("yzvqt") - .withType("nubexk") - .withEtag(mapOf("d", "zdopcjwvnhd", "twuoegrpkhjwni", "mgxcxrslpm")); - model = BinaryData.fromObject(model).toObject(MyWorkbookResource.class); - Assertions.assertEquals("qsluicp", model.location()); - Assertions.assertEquals("kzzlvmbmpaxmodf", model.tags().get("uefywsbpfvmwy")); - Assertions.assertEquals(MyWorkbookManagedIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("rfouyftaakcpw", model.id()); - Assertions.assertEquals("yzvqt", model.name()); - Assertions.assertEquals("nubexk", model.type()); - Assertions.assertEquals("zdopcjwvnhd", model.etag().get("d")); - } - - // 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/MyWorkbookUserAssignedIdentitiesTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookUserAssignedIdentitiesTests.java deleted file mode 100644 index 2ddb0487e37fe..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbookUserAssignedIdentitiesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookUserAssignedIdentities; - -public final class MyWorkbookUserAssignedIdentitiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MyWorkbookUserAssignedIdentities model = - BinaryData - .fromString("{\"principalId\":\"jvp\",\"tenantId\":\"qgxy\"}") - .toObject(MyWorkbookUserAssignedIdentities.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MyWorkbookUserAssignedIdentities model = new MyWorkbookUserAssignedIdentities(); - model = BinaryData.fromObject(model).toObject(MyWorkbookUserAssignedIdentities.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksCreateOrUpdateWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 480b2fa32a64b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,122 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentity; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentityType; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookUserAssignedIdentities; -import java.nio.ByteBuffer; -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 org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MyWorkbooksCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"user\",\"properties\":{\"displayName\":\"urrxxgewpktv\",\"serializedData\":\"ylkmqp\",\"version\":\"yhlfb\",\"timeModified\":\"wgcloxoebqinji\",\"category\":\"nwjfu\",\"tags\":[\"afcba\",\"hpzpo\"],\"userId\":\"iyjwpfilkmkkho\",\"sourceId\":\"dndviauogp\",\"storageUri\":\"artvti\"},\"identity\":{\"userAssignedIdentities\":{\"principalId\":\"chnmna\",\"tenantId\":\"nxhkxjqi\"},\"type\":\"None\"},\"id\":\"llndnpd\",\"name\":\"rpqaf\",\"type\":\"fugsnnfhyetefy\",\"etag\":{\"vmfqhppubo\":\"boi\"},\"location\":\"sepdfgk\",\"tags\":{\"c\":\"herngb\",\"obkauxofsh\":\"uahokq\",\"whslwkoj\":\"phwpnulaiywzej\"}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MyWorkbook response = - manager - .myWorkbooks() - .define("j") - .withRegion("qwm") - .withExistingResourceGroup("xtiv") - .withTags(mapOf("ynpdkvgfab", "njmxmcuqudtcvcl", "uzphdugnei", "iyji")) - .withIdentity( - new MyWorkbookManagedIdentity() - .withUserAssignedIdentities(new MyWorkbookUserAssignedIdentities()) - .withType(MyWorkbookManagedIdentityType.NONE)) - .withName("gox") - .withType("jiuqhibtozi") - .withEtag(mapOf("nykzcugswvxwlm", "ucfotangcf")) - .withKind(Kind.SHARED) - .withDisplayName("ibg") - .withSerializedData("jxgpnrhgovfg") - .withVersion("kqmhhaowjr") - .withCategory("fvxcnqmxqpswo") - .withTagsPropertiesTags(Arrays.asList("khlg", "dhbemzqkzszu", "iwtglxxhljfpg")) - .withSourceId("pqcbfrmbodthsq") - .withStorageUri("vriibakclacjfr") - .withSourceIdParameter("qw") - .create(); - - Assertions.assertEquals("sepdfgk", response.location()); - Assertions.assertEquals("herngb", response.tags().get("c")); - Assertions.assertEquals(MyWorkbookManagedIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("llndnpd", response.id()); - Assertions.assertEquals("rpqaf", response.name()); - Assertions.assertEquals("fugsnnfhyetefy", response.type()); - Assertions.assertEquals("boi", response.etag().get("vmfqhppubo")); - Assertions.assertEquals(Kind.USER, response.kind()); - Assertions.assertEquals("urrxxgewpktv", response.displayName()); - Assertions.assertEquals("ylkmqp", response.serializedData()); - Assertions.assertEquals("yhlfb", response.version()); - Assertions.assertEquals("nwjfu", response.category()); - Assertions.assertEquals("afcba", response.tagsPropertiesTags().get(0)); - Assertions.assertEquals("dndviauogp", response.sourceId()); - Assertions.assertEquals("artvti", response.storageUri()); - } - - // 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/MyWorkbooksDeleteByResourceGroupWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 736fa3cd56680..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MyWorkbooksDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .myWorkbooks() - .deleteByResourceGroupWithResponse("khpzvuqdflv", "niypfpubcpzg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksGetByResourceGroupWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 3cc11d18fdc5d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksGetByResourceGroupWithResponseMockTests.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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MyWorkbooksGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"user\",\"properties\":{\"displayName\":\"rqunjq\",\"serializedData\":\"denxau\",\"version\":\"pakdkifmjnnawt\",\"timeModified\":\"bpxuckpggqoweyi\",\"category\":\"dhlisngwflqqmpi\",\"tags\":[\"w\",\"pqxpx\",\"wfcngjsaas\",\"ixtmkzjvkviirhgf\"],\"userId\":\"wsdpgratzvzb\",\"sourceId\":\"byvi\",\"storageUri\":\"ctbrxkjzwrgxffm\"},\"identity\":{\"userAssignedIdentities\":{\"principalId\":\"bkgozxwopdbydpi\",\"tenantId\":\"aclnapxbiygnugj\"},\"type\":\"None\"},\"id\":\"vg\",\"name\":\"nkvxlxpaglqi\",\"type\":\"bgkc\",\"etag\":{\"fprnjl\":\"qjtwhauu\",\"rpddouifamo\":\"tlxs\",\"iwhxqszdtmaajq\":\"aziynknlqwzdv\"},\"location\":\"huxy\",\"tags\":{\"mzyospspshck\":\"vmtygj\",\"df\":\"kyjpmspbps\",\"vczkcnyxrxmunjd\":\"pyogtieyuj\"}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MyWorkbook response = - manager - .myWorkbooks() - .getByResourceGroupWithResponse("nlb", "jkwrusnkq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("huxy", response.location()); - Assertions.assertEquals("vmtygj", response.tags().get("mzyospspshck")); - Assertions.assertEquals(MyWorkbookManagedIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("vg", response.id()); - Assertions.assertEquals("nkvxlxpaglqi", response.name()); - Assertions.assertEquals("bgkc", response.type()); - Assertions.assertEquals("qjtwhauu", response.etag().get("fprnjl")); - Assertions.assertEquals(Kind.USER, response.kind()); - Assertions.assertEquals("rqunjq", response.displayName()); - Assertions.assertEquals("denxau", response.serializedData()); - Assertions.assertEquals("pakdkifmjnnawt", response.version()); - Assertions.assertEquals("dhlisngwflqqmpi", response.category()); - Assertions.assertEquals("w", response.tagsPropertiesTags().get(0)); - Assertions.assertEquals("byvi", response.sourceId()); - Assertions.assertEquals("ctbrxkjzwrgxffm", response.storageUri()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListByResourceGroupMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListByResourceGroupMockTests.java deleted file mode 100644 index 0506c4f455980..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListByResourceGroupMockTests.java +++ /dev/null @@ -1,94 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MyWorkbooksListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"kind\":\"user\",\"properties\":{\"displayName\":\"st\",\"serializedData\":\"vnlvxbcuiiznktwf\",\"version\":\"snvpdibmi\",\"timeModified\":\"stbz\",\"category\":\"kiwbuqnyoph\",\"tags\":[\"l\"],\"userId\":\"crpfbcunez\",\"sourceId\":\"e\",\"storageUri\":\"lfwyfwlwxjwetn\"},\"identity\":{\"userAssignedIdentities\":{\"principalId\":\"lafzvaylptr\",\"tenantId\":\"qwztcmwqkc\"},\"type\":\"None\"},\"id\":\"mikzeb\",\"name\":\"qbsms\",\"type\":\"ziqgfuh\",\"etag\":{\"wpgj\":\"xzjrgy\",\"pttaqutd\":\"snptfujgicgaao\",\"gehkfkimrtixokff\":\"wemxswvruunzz\",\"qwhix\":\"yinljqe\"},\"location\":\"onsts\",\"tags\":{\"vuwcobiegstmnin\":\"xgvelfclduccbird\",\"ejjtbxqmul\":\"jizcilnghgs\",\"rsbycucrwn\":\"xlxqzvn\"}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .myWorkbooks() - .listByResourceGroup( - "kxkbsazgakgacyr", - CategoryType.WORKBOOK, - Arrays.asList("jdmspofapvuhryln"), - "ofrzgb", - false, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("onsts", response.iterator().next().location()); - Assertions.assertEquals("xgvelfclduccbird", response.iterator().next().tags().get("vuwcobiegstmnin")); - Assertions.assertEquals(MyWorkbookManagedIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("mikzeb", response.iterator().next().id()); - Assertions.assertEquals("qbsms", response.iterator().next().name()); - Assertions.assertEquals("ziqgfuh", response.iterator().next().type()); - Assertions.assertEquals("xzjrgy", response.iterator().next().etag().get("wpgj")); - Assertions.assertEquals(Kind.USER, response.iterator().next().kind()); - Assertions.assertEquals("st", response.iterator().next().displayName()); - Assertions.assertEquals("vnlvxbcuiiznktwf", response.iterator().next().serializedData()); - Assertions.assertEquals("snvpdibmi", response.iterator().next().version()); - Assertions.assertEquals("kiwbuqnyoph", response.iterator().next().category()); - Assertions.assertEquals("l", response.iterator().next().tagsPropertiesTags().get(0)); - Assertions.assertEquals("e", response.iterator().next().sourceId()); - Assertions.assertEquals("lfwyfwlwxjwetn", response.iterator().next().storageUri()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListMockTests.java deleted file mode 100644 index ab2337615bdc0..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListMockTests.java +++ /dev/null @@ -1,88 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookManagedIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MyWorkbooksListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"kind\":\"user\",\"properties\":{\"displayName\":\"n\",\"serializedData\":\"fbycjs\",\"version\":\"wwixzvumw\",\"timeModified\":\"qhndvnoam\",\"category\":\"dsehaohdjhhflzo\",\"tags\":[\"ox\",\"e\",\"nje\"],\"userId\":\"gltsxoat\",\"sourceId\":\"g\",\"storageUri\":\"npbs\"},\"identity\":{\"userAssignedIdentities\":{\"principalId\":\"occsr\",\"tenantId\":\"zihmipgawtxxpky\"},\"type\":\"None\"},\"id\":\"pdqmjxlyyzglgouw\",\"name\":\"lmjjyuo\",\"type\":\"qtobaxkjeyt\",\"etag\":{\"wkjaos\":\"sxwpndfcpfnznthj\",\"smgbzahgxqdl\":\"xuzvoamktcqi\"},\"location\":\"rtltla\",\"tags\":{\"atbhjmznn\":\"tz\",\"qeqala\":\"s\",\"tgfebwln\":\"vlagun\",\"av\":\"mhyreeudz\"}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .myWorkbooks() - .list(CategoryType.TSG, Arrays.asList("zruswh"), false, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rtltla", response.iterator().next().location()); - Assertions.assertEquals("tz", response.iterator().next().tags().get("atbhjmznn")); - Assertions.assertEquals(MyWorkbookManagedIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("pdqmjxlyyzglgouw", response.iterator().next().id()); - Assertions.assertEquals("lmjjyuo", response.iterator().next().name()); - Assertions.assertEquals("qtobaxkjeyt", response.iterator().next().type()); - Assertions.assertEquals("sxwpndfcpfnznthj", response.iterator().next().etag().get("wkjaos")); - Assertions.assertEquals(Kind.USER, response.iterator().next().kind()); - Assertions.assertEquals("n", response.iterator().next().displayName()); - Assertions.assertEquals("fbycjs", response.iterator().next().serializedData()); - Assertions.assertEquals("wwixzvumw", response.iterator().next().version()); - Assertions.assertEquals("dsehaohdjhhflzo", response.iterator().next().category()); - Assertions.assertEquals("ox", response.iterator().next().tagsPropertiesTags().get(0)); - Assertions.assertEquals("g", response.iterator().next().sourceId()); - Assertions.assertEquals("npbs", response.iterator().next().storageUri()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListResultTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListResultTests.java deleted file mode 100644 index 15774a4f3f095..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListResultTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbooksListResult; -import org.junit.jupiter.api.Assertions; - -public final class MyWorkbooksListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MyWorkbooksListResult model = - BinaryData - .fromString( - "{\"value\":[{\"kind\":\"shared\",\"properties\":{\"displayName\":\"blmpewww\",\"serializedData\":\"bkrvrnsvshqj\",\"version\":\"xc\",\"timeModified\":\"bfovasrruvwbhsq\",\"category\":\"sub\",\"tags\":[\"birx\"],\"userId\":\"ybsrfbjfdtwss\",\"sourceId\":\"ftpvjzbexil\",\"storageUri\":\"nfqqnvwp\"},\"identity\":{\"userAssignedIdentities\":{\"principalId\":\"uoujmkcjhwqy\",\"tenantId\":\"r\"},\"type\":\"UserAssigned\"},\"id\":\"cwyhzdxssa\",\"name\":\"bzmnvdfznud\",\"type\":\"od\",\"etag\":{\"dslgnayqigynduh\":\"gmifthnzd\"},\"location\":\"vhqlkthumaqo\",\"tags\":{\"gccymvaolpssl\":\"ycduier\",\"d\":\"lfmmdnbbglzpswi\"}}],\"nextLink\":\"zbn\"}") - .toObject(MyWorkbooksListResult.class); - Assertions.assertEquals("zbn", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MyWorkbooksListResult model = new MyWorkbooksListResult().withNextLink("zbn"); - model = BinaryData.fromObject(model).toObject(MyWorkbooksListResult.class); - Assertions.assertEquals("zbn", model.nextLink()); - } -} 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 deleted file mode 100644 index a9f332f82f9ec..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationDisplayTests.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.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString("{\"provider\":\"g\",\"resource\":\"piu\",\"operation\":\"ygevqzntypmrbpiz\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("g", model.provider()); - Assertions.assertEquals("piu", model.resource()); - Assertions.assertEquals("ygevqzntypmrbpiz", model.operation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay().withProvider("g").withResource("piu").withOperation("ygevqzntypmrbpiz"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("g", model.provider()); - Assertions.assertEquals("piu", model.resource()); - Assertions.assertEquals("ygevqzntypmrbpiz", 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 deleted file mode 100644 index 76611e6e51edb..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationInnerTests.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.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\":\"tko\",\"display\":{\"provider\":\"ou\",\"resource\":\"vudwtiukbldng\",\"operation\":\"ocipazyxoeg\"}}") - .toObject(OperationInner.class); - Assertions.assertEquals("tko", model.name()); - Assertions.assertEquals("ou", model.display().provider()); - Assertions.assertEquals("vudwtiukbldng", model.display().resource()); - Assertions.assertEquals("ocipazyxoeg", model.display().operation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = - new OperationInner() - .withName("tko") - .withDisplay( - new OperationDisplay() - .withProvider("ou") - .withResource("vudwtiukbldng") - .withOperation("ocipazyxoeg")); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("tko", model.name()); - Assertions.assertEquals("ou", model.display().provider()); - Assertions.assertEquals("vudwtiukbldng", model.display().resource()); - Assertions.assertEquals("ocipazyxoeg", 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 deleted file mode 100644 index f551f1bfd0b13..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/OperationListResultTests.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; - -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 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\":\"ev\",\"display\":{\"provider\":\"gz\",\"resource\":\"u\",\"operation\":\"mvfaxkffeiith\"}},{\"name\":\"m\",\"display\":{\"provider\":\"v\",\"resource\":\"xmzsbbzogg\",\"operation\":\"rxwburv\"}}],\"nextLink\":\"xjnspy\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("ev", model.value().get(0).name()); - Assertions.assertEquals("gz", model.value().get(0).display().provider()); - Assertions.assertEquals("u", model.value().get(0).display().resource()); - Assertions.assertEquals("mvfaxkffeiith", model.value().get(0).display().operation()); - Assertions.assertEquals("xjnspy", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = - new OperationListResult() - .withValue( - Arrays - .asList( - new OperationInner() - .withName("ev") - .withDisplay( - new OperationDisplay() - .withProvider("gz") - .withResource("u") - .withOperation("mvfaxkffeiith")), - new OperationInner() - .withName("m") - .withDisplay( - new OperationDisplay() - .withProvider("v") - .withResource("xmzsbbzogg") - .withOperation("rxwburv")))) - .withNextLink("xjnspy"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("ev", model.value().get(0).name()); - Assertions.assertEquals("gz", model.value().get(0).display().provider()); - Assertions.assertEquals("u", model.value().get(0).display().resource()); - Assertions.assertEquals("mvfaxkffeiith", model.value().get(0).display().operation()); - Assertions.assertEquals("xjnspy", 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 deleted file mode 100644 index ccef4d38e112f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/PrivateLinkScopedResourceTests.java +++ /dev/null @@ -1,30 +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.PrivateLinkScopedResource; -import org.junit.jupiter.api.Assertions; - -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()); - } -} 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 deleted file mode 100644 index 9cd9d981cfe2d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetWithResponseMockTests.java +++ /dev/null @@ -1,82 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ProactiveDetectionConfigurationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"Name\":\"joxoism\",\"Enabled\":false,\"SendEmailsToSubscriptionOwners\":false,\"CustomEmails\":[\"lqol\",\"xkcgxxlxsffgcvi\"],\"LastUpdatedTime\":\"zdwlvwlyoupfgfb\",\"RuleDefinitions\":{\"Name\":\"bdyhgkfminsgowz\",\"DisplayName\":\"tsttktlahbq\",\"Description\":\"tx\",\"HelpUrl\":\"zukxitmmqtgqq\",\"IsHidden\":false,\"IsEnabledByDefault\":false,\"IsInPreview\":true,\"SupportsEmailNotifications\":false}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentProactiveDetectionConfiguration response = - manager - .proactiveDetectionConfigurations() - .getWithResponse("fscjfnynszquji", "dvoqyt", "byowbblgyavutp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("joxoism", response.name()); - Assertions.assertEquals(false, response.enabled()); - Assertions.assertEquals(false, response.sendEmailsToSubscriptionOwners()); - Assertions.assertEquals("lqol", response.customEmails().get(0)); - Assertions.assertEquals("zdwlvwlyoupfgfb", response.lastUpdatedTime()); - Assertions.assertEquals("bdyhgkfminsgowz", response.ruleDefinitions().name()); - Assertions.assertEquals("tsttktlahbq", response.ruleDefinitions().displayName()); - Assertions.assertEquals("tx", response.ruleDefinitions().description()); - Assertions.assertEquals("zukxitmmqtgqq", response.ruleDefinitions().helpUrl()); - Assertions.assertEquals(false, response.ruleDefinitions().isHidden()); - Assertions.assertEquals(false, response.ruleDefinitions().isEnabledByDefault()); - Assertions.assertEquals(true, response.ruleDefinitions().isInPreview()); - Assertions.assertEquals(false, 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 deleted file mode 100644 index 0829ae9d6a009..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListWithResponseMockTests.java +++ /dev/null @@ -1,83 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ProactiveDetectionConfigurationsListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "[{\"Name\":\"lvxwmyg\",\"Enabled\":true,\"SendEmailsToSubscriptionOwners\":true,\"CustomEmails\":[\"hiszepnnbjcrxgib\",\"daxconfozauorsuk\"],\"LastUpdatedTime\":\"wbqpl\",\"RuleDefinitions\":{\"Name\":\"nuuepzlrp\",\"DisplayName\":\"zsoldwey\",\"Description\":\"dunvmnnrwrbiorkt\",\"HelpUrl\":\"ywjhhgdnhx\",\"IsHidden\":true,\"IsEnabledByDefault\":true,\"IsInPreview\":true,\"SupportsEmailNotifications\":true}},{\"Name\":\"xggdufi\",\"Enabled\":true,\"SendEmailsToSubscriptionOwners\":false,\"CustomEmails\":[\"ao\",\"jchvcyy\",\"s\"],\"LastUpdatedTime\":\"dotcubiipuip\",\"RuleDefinitions\":{\"Name\":\"onmacjekniz\",\"DisplayName\":\"qvci\",\"Description\":\"ev\",\"HelpUrl\":\"mblrrilbywd\",\"IsHidden\":true,\"IsEnabledByDefault\":false,\"IsInPreview\":true,\"SupportsEmailNotifications\":false}}]"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - List response = - manager - .proactiveDetectionConfigurations() - .listWithResponse("tujbazpju", "hminyflnorwmduv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("lvxwmyg", response.get(0).name()); - Assertions.assertEquals(true, response.get(0).enabled()); - Assertions.assertEquals(true, response.get(0).sendEmailsToSubscriptionOwners()); - Assertions.assertEquals("hiszepnnbjcrxgib", response.get(0).customEmails().get(0)); - Assertions.assertEquals("wbqpl", response.get(0).lastUpdatedTime()); - Assertions.assertEquals("nuuepzlrp", response.get(0).ruleDefinitions().name()); - Assertions.assertEquals("zsoldwey", response.get(0).ruleDefinitions().displayName()); - Assertions.assertEquals("dunvmnnrwrbiorkt", response.get(0).ruleDefinitions().description()); - Assertions.assertEquals("ywjhhgdnhx", response.get(0).ruleDefinitions().helpUrl()); - Assertions.assertEquals(true, response.get(0).ruleDefinitions().isHidden()); - Assertions.assertEquals(true, response.get(0).ruleDefinitions().isEnabledByDefault()); - Assertions.assertEquals(true, response.get(0).ruleDefinitions().isInPreview()); - Assertions.assertEquals(true, 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 deleted file mode 100644 index fae9e3350f1c1..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateWithResponseMockTests.java +++ /dev/null @@ -1,105 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ProactiveDetectionConfigurationsUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"Name\":\"kxn\",\"Enabled\":false,\"SendEmailsToSubscriptionOwners\":false,\"CustomEmails\":[\"vudtjuewbcihx\",\"uwhcjyxccybv\",\"ayakkudzpx\"],\"LastUpdatedTime\":\"jplmagstcy\",\"RuleDefinitions\":{\"Name\":\"fkyrk\",\"DisplayName\":\"dg\",\"Description\":\"gsj\",\"HelpUrl\":\"nwqjnoba\",\"IsHidden\":false,\"IsEnabledByDefault\":false,\"IsInPreview\":true,\"SupportsEmailNotifications\":true}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationInsightsComponentProactiveDetectionConfiguration response = - manager - .proactiveDetectionConfigurations() - .updateWithResponse( - "pjui", - "av", - "k", - new ApplicationInsightsComponentProactiveDetectionConfigurationInner() - .withName("zfvazi") - .withEnabled(false) - .withSendEmailsToSubscriptionOwners(true) - .withCustomEmails(Arrays.asList("tbajlkatn", "xyiopidkqqfku")) - .withLastUpdatedTime("cxkdmligovi") - .withRuleDefinitions( - new ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions() - .withName("kpmloa") - .withDisplayName("ruocbgo") - .withDescription("bteoybf") - .withHelpUrl("xakvvjgslor") - .withIsHidden(true) - .withIsEnabledByDefault(false) - .withIsInPreview(false) - .withSupportsEmailNotifications(false)), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("kxn", response.name()); - Assertions.assertEquals(false, response.enabled()); - Assertions.assertEquals(false, response.sendEmailsToSubscriptionOwners()); - Assertions.assertEquals("vudtjuewbcihx", response.customEmails().get(0)); - Assertions.assertEquals("jplmagstcy", response.lastUpdatedTime()); - Assertions.assertEquals("fkyrk", response.ruleDefinitions().name()); - Assertions.assertEquals("dg", response.ruleDefinitions().displayName()); - Assertions.assertEquals("gsj", response.ruleDefinitions().description()); - Assertions.assertEquals("nwqjnoba", response.ruleDefinitions().helpUrl()); - Assertions.assertEquals(false, response.ruleDefinitions().isHidden()); - Assertions.assertEquals(false, response.ruleDefinitions().isEnabledByDefault()); - Assertions.assertEquals(true, response.ruleDefinitions().isInPreview()); - Assertions.assertEquals(true, 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 deleted file mode 100644 index d64ae4dff5de1..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/TagsResourceTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.TagsResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -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\"}}") - .toObject(TagsResource.class); - Assertions.assertEquals("knryrtihfxtij", model.tags().get("pzvgnwzsymglzufc")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TagsResource model = - new TagsResource().withTags(mapOf("pzvgnwzsymglzufc", "knryrtihfxtij", "hdbihan", "zk", "y", "fhfcb")); - model = BinaryData.fromObject(model).toObject(TagsResource.class); - Assertions.assertEquals("knryrtihfxtij", model.tags().get("pzvgnwzsymglzufc")); - } - - // 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 deleted file mode 100644 index e88e3644dd8bf..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/UserAssignedIdentityTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"618c7011-e4e6-4c2d-96c0-e4a4828e9e9e\",\"clientId\":\"74a74469-ce50-4bdb-9d60-ef78bee04a6f\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} 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 deleted file mode 100644 index 494aac7f0a38c..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestGeolocationTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation; -import org.junit.jupiter.api.Assertions; - -public final class WebTestGeolocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebTestGeolocation model = BinaryData.fromString("{\"Id\":\"jvnysounqe\"}").toObject(WebTestGeolocation.class); - Assertions.assertEquals("jvnysounqe", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebTestGeolocation model = new WebTestGeolocation().withLocation("jvnysounqe"); - model = BinaryData.fromObject(model).toObject(WebTestGeolocation.class); - Assertions.assertEquals("jvnysounqe", 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 deleted file mode 100644 index 3c37a69ee870e..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentWebTestLocation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebTestLocationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"DisplayName\":\"uqgsj\",\"Tag\":\"undxgketw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.webTestLocations().list("sdtutnwlduyc", "uzhyrmewipmvekdx", 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 deleted file mode 100644 index 31f8cfdd40f9b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestPropertiesConfigurationTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class WebTestPropertiesConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebTestPropertiesConfiguration model = - BinaryData.fromString("{\"WebTest\":\"noae\"}").toObject(WebTestPropertiesConfiguration.class); - Assertions.assertEquals("noae", model.webTest()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebTestPropertiesConfiguration model = new WebTestPropertiesConfiguration().withWebTest("noae"); - model = BinaryData.fromObject(model).toObject(WebTestPropertiesConfiguration.class); - Assertions.assertEquals("noae", 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 deleted file mode 100644 index 8378ce65a9daa..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestPropertiesValidationRulesContentValidationTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRulesContentValidation; -import org.junit.jupiter.api.Assertions; - -public final class WebTestPropertiesValidationRulesContentValidationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebTestPropertiesValidationRulesContentValidation model = - BinaryData - .fromString("{\"ContentMatch\":\"ureximoryocfs\",\"IgnoreCase\":false,\"PassIfTextFound\":true}") - .toObject(WebTestPropertiesValidationRulesContentValidation.class); - Assertions.assertEquals("ureximoryocfs", model.contentMatch()); - Assertions.assertEquals(false, model.ignoreCase()); - Assertions.assertEquals(true, model.passIfTextFound()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebTestPropertiesValidationRulesContentValidation model = - new WebTestPropertiesValidationRulesContentValidation() - .withContentMatch("ureximoryocfs") - .withIgnoreCase(false) - .withPassIfTextFound(true); - model = BinaryData.fromObject(model).toObject(WebTestPropertiesValidationRulesContentValidation.class); - Assertions.assertEquals("ureximoryocfs", model.contentMatch()); - Assertions.assertEquals(false, model.ignoreCase()); - Assertions.assertEquals(true, 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 3bc6e568b09d1..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebTestsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .webTests() - .deleteByResourceGroupWithResponse("kgfmocwahpq", "atjeaahh", 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 deleted file mode 100644 index 6c663770d380e..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WebtestsResourceTests.java +++ /dev/null @@ -1,45 +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.WebtestsResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WebtestsResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebtestsResource model = - BinaryData - .fromString( - "{\"location\":\"ddystkiiuxhqy\",\"tags\":{\"rq\":\"o\",\"oczvy\":\"b\"},\"id\":\"fqrvkdvjsllrmvvd\",\"name\":\"watkpnpulexxb\",\"type\":\"zwtruwiqzbqjvsov\"}") - .toObject(WebtestsResource.class); - Assertions.assertEquals("ddystkiiuxhqy", model.location()); - Assertions.assertEquals("o", model.tags().get("rq")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebtestsResource model = - new WebtestsResource().withLocation("ddystkiiuxhqy").withTags(mapOf("rq", "o", "oczvy", "b")); - model = BinaryData.fromObject(model).toObject(WebtestsResource.class); - Assertions.assertEquals("ddystkiiuxhqy", model.location()); - Assertions.assertEquals("o", model.tags().get("rq")); - } - - // 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/WorkItemConfigurationErrorTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationErrorTests.java deleted file mode 100644 index 5456253a8a81f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationErrorTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationError; - -public final class WorkItemConfigurationErrorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkItemConfigurationError model = - BinaryData - .fromString( - "{\"innererror\":{\"diagnosticcontext\":\"txgcpodgmaajr\",\"time\":\"2021-07-18T09:47:03Z\"}}") - .toObject(WorkItemConfigurationError.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkItemConfigurationError model = new WorkItemConfigurationError(); - model = BinaryData.fromObject(model).toObject(WorkItemConfigurationError.class); - } -} 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 deleted file mode 100644 index fb716c1168dc9..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner; -import org.junit.jupiter.api.Assertions; - -public final class WorkItemConfigurationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkItemConfigurationInner model = - BinaryData - .fromString( - "{\"ConnectorId\":\"a\",\"ConfigDisplayName\":\"j\",\"IsDefault\":false,\"Id\":\"obnbdxkqpxokaj\",\"ConfigProperties\":\"npime\"}") - .toObject(WorkItemConfigurationInner.class); - Assertions.assertEquals("a", model.connectorId()); - Assertions.assertEquals("j", model.configDisplayName()); - Assertions.assertEquals(false, model.isDefault()); - Assertions.assertEquals("obnbdxkqpxokaj", model.id()); - Assertions.assertEquals("npime", model.configProperties()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkItemConfigurationInner model = - new WorkItemConfigurationInner() - .withConnectorId("a") - .withConfigDisplayName("j") - .withIsDefault(false) - .withId("obnbdxkqpxokaj") - .withConfigProperties("npime"); - model = BinaryData.fromObject(model).toObject(WorkItemConfigurationInner.class); - Assertions.assertEquals("a", model.connectorId()); - Assertions.assertEquals("j", model.configDisplayName()); - Assertions.assertEquals(false, model.isDefault()); - Assertions.assertEquals("obnbdxkqpxokaj", model.id()); - Assertions.assertEquals("npime", 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 deleted file mode 100644 index 97992a6a90f2e..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateWithResponseMockTests.java +++ /dev/null @@ -1,97 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfiguration; -import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkItemConfigurationsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"ConnectorId\":\"onbzoggculapzwy\",\"ConfigDisplayName\":\"gogtqxepnylbf\",\"IsDefault\":true,\"Id\":\"yjt\",\"ConfigProperties\":\"of\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkItemConfiguration response = - manager - .workItemConfigurations() - .createWithResponse( - "pfcvlerchpqbmfp", - "babwidfcxss", - new WorkItemCreateConfiguration() - .withConnectorId("unnoxyhk") - .withConnectorDataConfiguration("qddrihpfhoqcaae") - .withValidateOnly(true) - .withWorkItemProperties(mapOf("xkzb", "djvlpj", "ncj", "msgeivsiykzk")), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("onbzoggculapzwy", response.connectorId()); - Assertions.assertEquals("gogtqxepnylbf", response.configDisplayName()); - Assertions.assertEquals(true, response.isDefault()); - Assertions.assertEquals("yjt", response.id()); - Assertions.assertEquals("of", response.configProperties()); - } - - // 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/WorkItemConfigurationsDeleteWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteWithResponseMockTests.java deleted file mode 100644 index b4bf8301d79ef..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkItemConfigurationsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workItemConfigurations() - .deleteWithResponse("rriloz", "peewchpxlkt", "kuziycsle", 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 deleted file mode 100644 index 1bcdba801c074..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfiguration; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkItemConfigurationsGetDefaultWithResponseMockTests { - @Test - public void testGetDefaultWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"ConnectorId\":\"fzwiivwzjbhyz\",\"ConfigDisplayName\":\"jrkambtrnegvmnv\",\"IsDefault\":true,\"Id\":\"vldspa\",\"ConfigProperties\":\"jbkkdmflvestmjl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkItemConfiguration response = - manager - .workItemConfigurations() - .getDefaultWithResponse("zhvfcibyfmowuxr", "jpvd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("fzwiivwzjbhyz", response.connectorId()); - Assertions.assertEquals("jrkambtrnegvmnv", response.configDisplayName()); - Assertions.assertEquals(true, response.isDefault()); - Assertions.assertEquals("vldspa", response.id()); - Assertions.assertEquals("jbkkdmflvestmjl", 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 deleted file mode 100644 index dedb28b37fbba..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfiguration; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkItemConfigurationsGetItemWithResponseMockTests { - @Test - public void testGetItemWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"ConnectorId\":\"rjvpglydzgkrvqee\",\"ConfigDisplayName\":\"oepry\",\"IsDefault\":false,\"Id\":\"ytp\",\"ConfigProperties\":\"mov\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkItemConfiguration response = - manager - .workItemConfigurations() - .getItemWithResponse("ufuztcktyhjtq", "dcgzul", "mmrqz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rjvpglydzgkrvqee", response.connectorId()); - Assertions.assertEquals("oepry", response.configDisplayName()); - Assertions.assertEquals(false, response.isDefault()); - Assertions.assertEquals("ytp", response.id()); - Assertions.assertEquals("mov", 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 deleted file mode 100644 index 35dcb31088fed..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfiguration; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkItemConfigurationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"ConnectorId\":\"chp\",\"ConfigDisplayName\":\"bzevwrd\",\"IsDefault\":true,\"Id\":\"kuvsjcswsm\",\"ConfigProperties\":\"tuluq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workItemConfigurations().list("egfnmntfpmvmemfn", "zdwvvbalxl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("chp", response.iterator().next().connectorId()); - Assertions.assertEquals("bzevwrd", response.iterator().next().configDisplayName()); - Assertions.assertEquals(true, response.iterator().next().isDefault()); - Assertions.assertEquals("kuvsjcswsm", response.iterator().next().id()); - Assertions.assertEquals("tuluq", 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 deleted file mode 100644 index 43d881a096b83..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListResultTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationsListResult; - -public final class WorkItemConfigurationsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkItemConfigurationsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"ConnectorId\":\"a\",\"ConfigDisplayName\":\"qidtqajzyu\",\"IsDefault\":true,\"Id\":\"dj\",\"ConfigProperties\":\"lkhbz\"},{\"ConnectorId\":\"epgzgqexz\",\"ConfigDisplayName\":\"c\",\"IsDefault\":false,\"Id\":\"aierhhb\",\"ConfigProperties\":\"glu\"}]}") - .toObject(WorkItemConfigurationsListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkItemConfigurationsListResult model = new WorkItemConfigurationsListResult(); - model = BinaryData.fromObject(model).toObject(WorkItemConfigurationsListResult.class); - } -} 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 deleted file mode 100644 index 0ec791ba800ba..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemWithResponseMockTests.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfiguration; -import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkItemConfigurationsUpdateItemWithResponseMockTests { - @Test - public void testUpdateItemWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"ConnectorId\":\"irclnpk\",\"ConfigDisplayName\":\"ayzri\",\"IsDefault\":false,\"Id\":\"awfvjlboxqvkjl\",\"ConfigProperties\":\"ho\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkItemConfiguration response = - manager - .workItemConfigurations() - .updateItemWithResponse( - "vf", - "aawzqadfl", - "z", - new WorkItemCreateConfiguration() - .withConnectorId("iglaecx") - .withConnectorDataConfiguration("t") - .withValidateOnly(false) - .withWorkItemProperties(mapOf("qtmldgxo", "vzm")), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("irclnpk", response.connectorId()); - Assertions.assertEquals("ayzri", response.configDisplayName()); - Assertions.assertEquals(false, response.isDefault()); - Assertions.assertEquals("awfvjlboxqvkjl", response.id()); - Assertions.assertEquals("ho", response.configProperties()); - } - - // 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/WorkItemCreateConfigurationTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemCreateConfigurationTests.java deleted file mode 100644 index 1ee54402db0fb..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemCreateConfigurationTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkItemCreateConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkItemCreateConfiguration model = - BinaryData - .fromString( - "{\"ConnectorId\":\"wzrlovmclwhij\",\"ConnectorDataConfiguration\":\"ejctbzaqsqsycb\",\"ValidateOnly\":true,\"WorkItemProperties\":{\"c\":\"ukdkexxppofmxa\",\"toc\":\"jpgd\",\"hvpmoue\":\"j\"}}") - .toObject(WorkItemCreateConfiguration.class); - Assertions.assertEquals("wzrlovmclwhij", model.connectorId()); - Assertions.assertEquals("ejctbzaqsqsycb", model.connectorDataConfiguration()); - Assertions.assertEquals(true, model.validateOnly()); - Assertions.assertEquals("ukdkexxppofmxa", model.workItemProperties().get("c")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkItemCreateConfiguration model = - new WorkItemCreateConfiguration() - .withConnectorId("wzrlovmclwhij") - .withConnectorDataConfiguration("ejctbzaqsqsycb") - .withValidateOnly(true) - .withWorkItemProperties(mapOf("c", "ukdkexxppofmxa", "toc", "jpgd", "hvpmoue", "j")); - model = BinaryData.fromObject(model).toObject(WorkItemCreateConfiguration.class); - Assertions.assertEquals("wzrlovmclwhij", model.connectorId()); - Assertions.assertEquals("ejctbzaqsqsycb", model.connectorDataConfiguration()); - Assertions.assertEquals(true, model.validateOnly()); - Assertions.assertEquals("ukdkexxppofmxa", model.workItemProperties().get("c")); - } - - // 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/WorkbookErrorDefinitionTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookErrorDefinitionTests.java deleted file mode 100644 index 140c6256450e5..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookErrorDefinitionTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinition; - -public final class WorkbookErrorDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookErrorDefinition model = - BinaryData - .fromString("{\"innererror\":{\"trace\":[\"ca\",\"vxb\",\"t\",\"udutnco\"]}}") - .toObject(WorkbookErrorDefinition.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookErrorDefinition model = new WorkbookErrorDefinition(); - model = BinaryData.fromObject(model).toObject(WorkbookErrorDefinition.class); - } -} 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 deleted file mode 100644 index 63aa141faa83e..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookInnerErrorTraceTests.java +++ /dev/null @@ -1,22 +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.WorkbookInnerErrorTrace; - -public final class WorkbookInnerErrorTraceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookInnerErrorTrace model = - BinaryData.fromString("{\"trace\":[\"lxqtvcofudfl\"]}").toObject(WorkbookInnerErrorTrace.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookInnerErrorTrace model = new WorkbookInnerErrorTrace(); - model = BinaryData.fromObject(model).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 deleted file mode 100644 index de8407b621c53..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookInnerTests.java +++ /dev/null @@ -1,88 +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.fluent.models.WorkbookInner; -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.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"wdmjsjqbjhhyx\",\"serializedData\":\"rw\",\"version\":\"co\",\"timeModified\":\"2021-02-27T00:57:42Z\",\"category\":\"p\",\"tags\":[\"gymare\",\"n\",\"jxqugjhky\",\"ubeddg\"],\"userId\":\"ofwq\",\"sourceId\":\"qal\",\"storageUri\":\"mnjijpxacqqudf\",\"description\":\"yxbaaabjyvayf\",\"revision\":\"m\"},\"identity\":{\"principalId\":\"be632264-181e-4d90-a7c6-76af9f361265\",\"tenantId\":\"51f31ba0-c910-4b3f-87b2-eb46357f0c67\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"exn\":{\"principalId\":\"06583265-61d0-4385-8f06-96bf6687cf4f\",\"clientId\":\"e1e22704-ee09-4a3b-b432-3658bf5231d5\"}}},\"kind\":\"shared\",\"etag\":\"nwnwme\",\"location\":\"zsyyceuzso\",\"tags\":{\"frxtrthzvaytdwk\":\"ud\",\"xhexiilivpdti\":\"brqubp\"},\"id\":\"r\",\"name\":\"tdqoaxoruzfgsq\",\"type\":\"yfxrx\"}") - .toObject(WorkbookInner.class); - Assertions.assertEquals("zsyyceuzso", model.location()); - Assertions.assertEquals("ud", model.tags().get("frxtrthzvaytdwk")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("nwnwme", model.etag()); - Assertions.assertEquals("wdmjsjqbjhhyx", model.displayName()); - Assertions.assertEquals("rw", model.serializedData()); - Assertions.assertEquals("co", model.version()); - Assertions.assertEquals("p", model.category()); - Assertions.assertEquals("gymare", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("qal", model.sourceId()); - Assertions.assertEquals("mnjijpxacqqudf", model.storageUri()); - Assertions.assertEquals("yxbaaabjyvayf", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookInner model = - new WorkbookInner() - .withLocation("zsyyceuzso") - .withTags(mapOf("frxtrthzvaytdwk", "ud", "xhexiilivpdti", "brqubp")) - .withIdentity( - new WorkbookResourceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("exn", new UserAssignedIdentity()))) - .withKind(WorkbookSharedTypeKind.SHARED) - .withEtag("nwnwme") - .withDisplayName("wdmjsjqbjhhyx") - .withSerializedData("rw") - .withVersion("co") - .withCategory("p") - .withTagsPropertiesTags(Arrays.asList("gymare", "n", "jxqugjhky", "ubeddg")) - .withSourceId("qal") - .withStorageUri("mnjijpxacqqudf") - .withDescription("yxbaaabjyvayf"); - model = BinaryData.fromObject(model).toObject(WorkbookInner.class); - Assertions.assertEquals("zsyyceuzso", model.location()); - Assertions.assertEquals("ud", model.tags().get("frxtrthzvaytdwk")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("nwnwme", model.etag()); - Assertions.assertEquals("wdmjsjqbjhhyx", model.displayName()); - Assertions.assertEquals("rw", model.serializedData()); - Assertions.assertEquals("co", model.version()); - Assertions.assertEquals("p", model.category()); - Assertions.assertEquals("gymare", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("qal", model.sourceId()); - Assertions.assertEquals("mnjijpxacqqudf", model.storageUri()); - Assertions.assertEquals("yxbaaabjyvayf", 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; - } -} 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 deleted file mode 100644 index b114755db12a4..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookPropertiesTests.java +++ /dev/null @@ -1,52 +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.fluent.models.WorkbookProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookProperties model = - BinaryData - .fromString( - "{\"displayName\":\"l\",\"serializedData\":\"ptramxj\",\"version\":\"wlwnwxuqlcv\",\"timeModified\":\"2021-06-21T00:43:05Z\",\"category\":\"patdooaojkniodko\",\"tags\":[\"wnujhemmsbvdk\"],\"userId\":\"odtji\",\"sourceId\":\"wj\",\"storageUri\":\"lt\",\"description\":\"cjvefkdlfo\",\"revision\":\"ggkfpagaowpul\"}") - .toObject(WorkbookProperties.class); - Assertions.assertEquals("l", model.displayName()); - Assertions.assertEquals("ptramxj", model.serializedData()); - Assertions.assertEquals("wlwnwxuqlcv", model.version()); - Assertions.assertEquals("patdooaojkniodko", model.category()); - Assertions.assertEquals("wnujhemmsbvdk", model.tags().get(0)); - Assertions.assertEquals("wj", model.sourceId()); - Assertions.assertEquals("lt", model.storageUri()); - Assertions.assertEquals("cjvefkdlfo", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookProperties model = - new WorkbookProperties() - .withDisplayName("l") - .withSerializedData("ptramxj") - .withVersion("wlwnwxuqlcv") - .withCategory("patdooaojkniodko") - .withTags(Arrays.asList("wnujhemmsbvdk")) - .withSourceId("wj") - .withStorageUri("lt") - .withDescription("cjvefkdlfo"); - model = BinaryData.fromObject(model).toObject(WorkbookProperties.class); - Assertions.assertEquals("l", model.displayName()); - Assertions.assertEquals("ptramxj", model.serializedData()); - Assertions.assertEquals("wlwnwxuqlcv", model.version()); - Assertions.assertEquals("patdooaojkniodko", model.category()); - Assertions.assertEquals("wnujhemmsbvdk", model.tags().get(0)); - Assertions.assertEquals("wj", model.sourceId()); - Assertions.assertEquals("lt", model.storageUri()); - Assertions.assertEquals("cjvefkdlfo", 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 deleted file mode 100644 index c84098955577d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookPropertiesUpdateParametersTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookPropertiesUpdateParameters; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookPropertiesUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookPropertiesUpdateParameters model = - BinaryData - .fromString( - "{\"displayName\":\"zkoj\",\"serializedData\":\"c\",\"category\":\"foqouicybx\",\"tags\":[\"gszufoxciqopid\"],\"description\":\"mciodhkhazxkhn\",\"revision\":\"onlwntoeg\"}") - .toObject(WorkbookPropertiesUpdateParameters.class); - Assertions.assertEquals("zkoj", model.displayName()); - Assertions.assertEquals("c", model.serializedData()); - Assertions.assertEquals("foqouicybx", model.category()); - Assertions.assertEquals("gszufoxciqopid", model.tags().get(0)); - Assertions.assertEquals("mciodhkhazxkhn", model.description()); - Assertions.assertEquals("onlwntoeg", model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookPropertiesUpdateParameters model = - new WorkbookPropertiesUpdateParameters() - .withDisplayName("zkoj") - .withSerializedData("c") - .withCategory("foqouicybx") - .withTags(Arrays.asList("gszufoxciqopid")) - .withDescription("mciodhkhazxkhn") - .withRevision("onlwntoeg"); - model = BinaryData.fromObject(model).toObject(WorkbookPropertiesUpdateParameters.class); - Assertions.assertEquals("zkoj", model.displayName()); - Assertions.assertEquals("c", model.serializedData()); - Assertions.assertEquals("foqouicybx", model.category()); - Assertions.assertEquals("gszufoxciqopid", model.tags().get(0)); - Assertions.assertEquals("mciodhkhazxkhn", model.description()); - Assertions.assertEquals("onlwntoeg", 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 deleted file mode 100644 index 07322c969970c..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookResourceIdentityTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity; -import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookResourceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookResourceIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"89c30e67-7c7e-469c-a7b2-fdc9cb1a6995\",\"tenantId\":\"a177e4fe-c5a7-4178-b308-b9ea1553ba7a\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"yfzqwhxxbu\":{\"principalId\":\"a5d54bb1-7822-4b1b-8a39-2bc9c49fc704\",\"clientId\":\"6fb2bb87-3f1a-45fd-948a-e10c5b11c475\"}}}") - .toObject(WorkbookResourceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookResourceIdentity model = - new WorkbookResourceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("yfzqwhxxbu", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(WorkbookResourceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - // 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/WorkbookResourceTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookResourceTests.java deleted file mode 100644 index f69fbcad4f0f8..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookResourceTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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\":\"b7deb4ee-efa9-46c9-8c77-7a9290d6e3d7\",\"tenantId\":\"5f85f425-298e-477d-9cf5-2db2e1840718\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"k\":{\"principalId\":\"607bf139-ac9a-4744-b8bd-146929c27749\",\"clientId\":\"8700282f-6aac-4911-bd44-095729a39ac6\"}}},\"kind\":\"shared\",\"etag\":\"jervtia\",\"location\":\"xsdszuempsb\",\"tags\":{\"eyvpnqicvinvkj\":\"z\"},\"id\":\"xdxr\",\"name\":\"uukzclewyhmlw\",\"type\":\"aztz\"}") - .toObject(WorkbookResource.class); - Assertions.assertEquals("xsdszuempsb", model.location()); - Assertions.assertEquals("z", model.tags().get("eyvpnqicvinvkj")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("jervtia", model.etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookResource model = - new WorkbookResource() - .withLocation("xsdszuempsb") - .withTags(mapOf("eyvpnqicvinvkj", "z")) - .withIdentity( - new WorkbookResourceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("k", new UserAssignedIdentity()))) - .withKind(WorkbookSharedTypeKind.SHARED) - .withEtag("jervtia"); - model = BinaryData.fromObject(model).toObject(WorkbookResource.class); - Assertions.assertEquals("xsdszuempsb", model.location()); - Assertions.assertEquals("z", model.tags().get("eyvpnqicvinvkj")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("jervtia", 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 deleted file mode 100644 index 54871446e86f4..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateGalleryTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookTemplateGalleryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookTemplateGallery model = - BinaryData - .fromString( - "{\"name\":\"ah\",\"category\":\"jyzhpvgq\",\"type\":\"j\",\"order\":391970506,\"resourceType\":\"jzlmw\"}") - .toObject(WorkbookTemplateGallery.class); - Assertions.assertEquals("ah", model.name()); - Assertions.assertEquals("jyzhpvgq", model.category()); - Assertions.assertEquals("j", model.type()); - Assertions.assertEquals(391970506, model.order()); - Assertions.assertEquals("jzlmw", model.resourceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookTemplateGallery model = - new WorkbookTemplateGallery() - .withName("ah") - .withCategory("jyzhpvgq") - .withType("j") - .withOrder(391970506) - .withResourceType("jzlmw"); - model = BinaryData.fromObject(model).toObject(WorkbookTemplateGallery.class); - Assertions.assertEquals("ah", model.name()); - Assertions.assertEquals("jyzhpvgq", model.category()); - Assertions.assertEquals("j", model.type()); - Assertions.assertEquals(391970506, model.order()); - Assertions.assertEquals("jzlmw", 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 deleted file mode 100644 index 2543519190926..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateInnerTests.java +++ /dev/null @@ -1,140 +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.fluent.models.WorkbookTemplateInner; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookTemplateInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookTemplateInner model = - BinaryData - .fromString( - "{\"properties\":{\"priority\":871472535,\"author\":\"rp\",\"templateData\":\"dataxepcyvahfn\",\"galleries\":[{\"name\":\"yq\",\"category\":\"vuujq\",\"type\":\"dokgjl\",\"order\":1769769453,\"resourceType\":\"gvcl\"}],\"localized\":{\"vecxgodebfqkk\":[{\"templateData\":\"datac\",\"galleries\":[{},{}]},{\"templateData\":\"dataesz\",\"galleries\":[{},{},{}]},{\"templateData\":\"datajhtxfvgxbfsmxne\",\"galleries\":[{},{},{}]}],\"kpikadrgvt\":[{\"templateData\":\"datapukgriwflzlfb\",\"galleries\":[{}]},{\"templateData\":\"datazycispn\",\"galleries\":[{},{}]},{\"templateData\":\"datamgkbrpyydhibn\",\"galleries\":[{},{},{},{}]}],\"nhijggmebfsi\":[{\"templateData\":\"datan\",\"galleries\":[{},{},{}]}]}},\"location\":\"rbu\",\"tags\":{\"jrunmpxtt\":\"vpnazzm\",\"bnlankxmyskpb\":\"bh\",\"nrs\":\"enbtkcxywny\",\"lhaaxdbabp\":\"nlqidybyxczf\"},\"id\":\"lwrq\",\"name\":\"fkts\",\"type\":\"hsucoc\"}") - .toObject(WorkbookTemplateInner.class); - Assertions.assertEquals("rbu", model.location()); - Assertions.assertEquals("vpnazzm", model.tags().get("jrunmpxtt")); - Assertions.assertEquals(871472535, model.priority()); - Assertions.assertEquals("rp", model.author()); - Assertions.assertEquals("yq", model.galleries().get(0).name()); - Assertions.assertEquals("vuujq", model.galleries().get(0).category()); - Assertions.assertEquals("dokgjl", model.galleries().get(0).type()); - Assertions.assertEquals(1769769453, model.galleries().get(0).order()); - Assertions.assertEquals("gvcl", model.galleries().get(0).resourceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookTemplateInner model = - new WorkbookTemplateInner() - .withLocation("rbu") - .withTags( - mapOf( - "jrunmpxtt", - "vpnazzm", - "bnlankxmyskpb", - "bh", - "nrs", - "enbtkcxywny", - "lhaaxdbabp", - "nlqidybyxczf")) - .withPriority(871472535) - .withAuthor("rp") - .withTemplateData("dataxepcyvahfn") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery() - .withName("yq") - .withCategory("vuujq") - .withType("dokgjl") - .withOrder(1769769453) - .withResourceType("gvcl"))) - .withLocalized( - mapOf( - "vecxgodebfqkk", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datac") - .withGalleries( - Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("dataesz") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datajhtxfvgxbfsmxne") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery()))), - "kpikadrgvt", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datapukgriwflzlfb") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datazycispn") - .withGalleries( - Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datamgkbrpyydhibn") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery()))), - "nhijggmebfsi", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datan") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery()))))); - model = BinaryData.fromObject(model).toObject(WorkbookTemplateInner.class); - Assertions.assertEquals("rbu", model.location()); - Assertions.assertEquals("vpnazzm", model.tags().get("jrunmpxtt")); - Assertions.assertEquals(871472535, model.priority()); - Assertions.assertEquals("rp", model.author()); - Assertions.assertEquals("yq", model.galleries().get(0).name()); - Assertions.assertEquals("vuujq", model.galleries().get(0).category()); - Assertions.assertEquals("dokgjl", model.galleries().get(0).type()); - Assertions.assertEquals(1769769453, model.galleries().get(0).order()); - Assertions.assertEquals("gvcl", model.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/WorkbookTemplateLocalizedGalleryTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateLocalizedGalleryTests.java deleted file mode 100644 index 388fb6b9260c6..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateLocalizedGalleryTests.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.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookTemplateLocalizedGalleryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookTemplateLocalizedGallery model = - BinaryData - .fromString( - "{\"templateData\":\"datakvugfhzovawjvzun\",\"galleries\":[{\"name\":\"nnprn\",\"category\":\"peilpjzuaejxdu\",\"type\":\"skzbb\",\"order\":538368150,\"resourceType\":\"mv\"},{\"name\":\"kgpwoz\",\"category\":\"kfpbs\",\"type\":\"ofd\",\"order\":519560547,\"resourceType\":\"sd\"}]}") - .toObject(WorkbookTemplateLocalizedGallery.class); - Assertions.assertEquals("nnprn", model.galleries().get(0).name()); - Assertions.assertEquals("peilpjzuaejxdu", model.galleries().get(0).category()); - Assertions.assertEquals("skzbb", model.galleries().get(0).type()); - Assertions.assertEquals(538368150, model.galleries().get(0).order()); - Assertions.assertEquals("mv", model.galleries().get(0).resourceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookTemplateLocalizedGallery model = - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datakvugfhzovawjvzun") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery() - .withName("nnprn") - .withCategory("peilpjzuaejxdu") - .withType("skzbb") - .withOrder(538368150) - .withResourceType("mv"), - new WorkbookTemplateGallery() - .withName("kgpwoz") - .withCategory("kfpbs") - .withType("ofd") - .withOrder(519560547) - .withResourceType("sd"))); - model = BinaryData.fromObject(model).toObject(WorkbookTemplateLocalizedGallery.class); - Assertions.assertEquals("nnprn", model.galleries().get(0).name()); - Assertions.assertEquals("peilpjzuaejxdu", model.galleries().get(0).category()); - Assertions.assertEquals("skzbb", model.galleries().get(0).type()); - Assertions.assertEquals(538368150, model.galleries().get(0).order()); - Assertions.assertEquals("mv", 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 deleted file mode 100644 index 9c6e839f9f932..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatePropertiesTests.java +++ /dev/null @@ -1,208 +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.fluent.models.WorkbookTemplateProperties; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookTemplatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookTemplateProperties model = - BinaryData - .fromString( - "{\"priority\":2042838071,\"author\":\"azt\",\"templateData\":\"databt\",\"galleries\":[{\"name\":\"qpuedckzywbiex\",\"category\":\"eyueaxibxujwb\",\"type\":\"walm\",\"order\":978941807,\"resourceType\":\"xaepdkzjancuxr\"},{\"name\":\"wbavxbniwdj\",\"category\":\"zt\",\"type\":\"bpg\",\"order\":1127167490,\"resourceType\":\"x\"}],\"localized\":{\"fudwpznt\":[{\"templateData\":\"datazpfzabglc\",\"galleries\":[{\"name\":\"tcty\",\"category\":\"klbb\",\"type\":\"plwzbhvgyugu\",\"order\":230150141,\"resourceType\":\"kfssxqukkf\"},{\"name\":\"gmgsxnkjzkde\",\"category\":\"pvlopwiyighxpkd\",\"type\":\"baiuebbaumny\",\"order\":624396177,\"resourceType\":\"deoj\"},{\"name\":\"bckhsmtxpsi\",\"category\":\"tfhvpesapskrdqmh\",\"type\":\"dhtldwkyz\",\"order\":1335454628,\"resourceType\":\"kn\"},{\"name\":\"scwsv\",\"category\":\"otogtwrupqs\",\"type\":\"nmic\",\"order\":560100496,\"resourceType\":\"eoveilovnotyf\"}]},{\"templateData\":\"datacnjbkcnxdhbt\",\"galleries\":[{\"name\":\"ywpnvjt\",\"category\":\"nermcl\",\"type\":\"lphox\",\"order\":1158038840,\"resourceType\":\"pabgyeps\"},{\"name\":\"tazqugxywpmueefj\",\"category\":\"fqkquj\",\"type\":\"suyonobglaocq\",\"order\":676078143,\"resourceType\":\"mgyudxytlmoyrxv\"}]}],\"eiotwmcdytdx\":[{\"templateData\":\"datazhlrqjb\",\"galleries\":[{\"name\":\"rlhrxs\",\"category\":\"yvpycanuzbpzk\",\"type\":\"kuwbcrnwb\",\"order\":1542253292,\"resourceType\":\"seyvj\"},{\"name\":\"rts\",\"category\":\"spkdee\",\"type\":\"ofmxagkvtmelmqkr\",\"order\":669336905,\"resourceType\":\"ljuahaquhcdh\"},{\"name\":\"ualaexqpvfadmw\",\"category\":\"crgvxpvgom\",\"type\":\"fmisg\",\"order\":1787960878,\"resourceType\":\"beldawkzbaliourq\"}]},{\"templateData\":\"datakauhashsfwxo\",\"galleries\":[{\"name\":\"xcug\",\"category\":\"jooxdjebw\",\"type\":\"cwwfvovbvme\",\"order\":321338352,\"resourceType\":\"vyhzceuojgjrwj\"}]}],\"nojvknmefqsg\":[{\"templateData\":\"dataxnrj\",\"galleries\":[{\"name\":\"wgxhn\",\"category\":\"kxfbkpycgklwndn\",\"type\":\"dauwhvylwzbtd\",\"order\":1131914831,\"resourceType\":\"znbmpowuwprzq\"},{\"name\":\"eualupjmkhf\",\"category\":\"bbcswsrtjri\",\"type\":\"rbpbewtghfgblcg\",\"order\":1261477123,\"resourceType\":\"lvqhjkbegibtnmx\"},{\"name\":\"bwwaloa\",\"category\":\"cgwrtzjuz\",\"type\":\"yzm\",\"order\":1961357126,\"resourceType\":\"ngmtsavjcb\"},{\"name\":\"xqpsrknftguv\",\"category\":\"uhprwmdyvxqt\",\"type\":\"riwwroy\",\"order\":1621118855,\"resourceType\":\"rmcqiby\"}]}]}}") - .toObject(WorkbookTemplateProperties.class); - Assertions.assertEquals(2042838071, model.priority()); - Assertions.assertEquals("azt", model.author()); - Assertions.assertEquals("qpuedckzywbiex", model.galleries().get(0).name()); - Assertions.assertEquals("eyueaxibxujwb", model.galleries().get(0).category()); - Assertions.assertEquals("walm", model.galleries().get(0).type()); - Assertions.assertEquals(978941807, model.galleries().get(0).order()); - Assertions.assertEquals("xaepdkzjancuxr", model.galleries().get(0).resourceType()); - Assertions.assertEquals("tcty", model.localized().get("fudwpznt").get(0).galleries().get(0).name()); - Assertions.assertEquals("klbb", model.localized().get("fudwpznt").get(0).galleries().get(0).category()); - Assertions.assertEquals("plwzbhvgyugu", model.localized().get("fudwpznt").get(0).galleries().get(0).type()); - Assertions.assertEquals(230150141, model.localized().get("fudwpznt").get(0).galleries().get(0).order()); - Assertions - .assertEquals("kfssxqukkf", model.localized().get("fudwpznt").get(0).galleries().get(0).resourceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookTemplateProperties model = - new WorkbookTemplateProperties() - .withPriority(2042838071) - .withAuthor("azt") - .withTemplateData("databt") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery() - .withName("qpuedckzywbiex") - .withCategory("eyueaxibxujwb") - .withType("walm") - .withOrder(978941807) - .withResourceType("xaepdkzjancuxr"), - new WorkbookTemplateGallery() - .withName("wbavxbniwdj") - .withCategory("zt") - .withType("bpg") - .withOrder(1127167490) - .withResourceType("x"))) - .withLocalized( - mapOf( - "fudwpznt", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datazpfzabglc") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery() - .withName("tcty") - .withCategory("klbb") - .withType("plwzbhvgyugu") - .withOrder(230150141) - .withResourceType("kfssxqukkf"), - new WorkbookTemplateGallery() - .withName("gmgsxnkjzkde") - .withCategory("pvlopwiyighxpkd") - .withType("baiuebbaumny") - .withOrder(624396177) - .withResourceType("deoj"), - new WorkbookTemplateGallery() - .withName("bckhsmtxpsi") - .withCategory("tfhvpesapskrdqmh") - .withType("dhtldwkyz") - .withOrder(1335454628) - .withResourceType("kn"), - new WorkbookTemplateGallery() - .withName("scwsv") - .withCategory("otogtwrupqs") - .withType("nmic") - .withOrder(560100496) - .withResourceType("eoveilovnotyf"))), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datacnjbkcnxdhbt") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery() - .withName("ywpnvjt") - .withCategory("nermcl") - .withType("lphox") - .withOrder(1158038840) - .withResourceType("pabgyeps"), - new WorkbookTemplateGallery() - .withName("tazqugxywpmueefj") - .withCategory("fqkquj") - .withType("suyonobglaocq") - .withOrder(676078143) - .withResourceType("mgyudxytlmoyrxv")))), - "eiotwmcdytdx", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datazhlrqjb") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery() - .withName("rlhrxs") - .withCategory("yvpycanuzbpzk") - .withType("kuwbcrnwb") - .withOrder(1542253292) - .withResourceType("seyvj"), - new WorkbookTemplateGallery() - .withName("rts") - .withCategory("spkdee") - .withType("ofmxagkvtmelmqkr") - .withOrder(669336905) - .withResourceType("ljuahaquhcdh"), - new WorkbookTemplateGallery() - .withName("ualaexqpvfadmw") - .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")))), - "nojvknmefqsg", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("dataxnrj") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery() - .withName("wgxhn") - .withCategory("kxfbkpycgklwndn") - .withType("dauwhvylwzbtd") - .withOrder(1131914831) - .withResourceType("znbmpowuwprzq"), - new WorkbookTemplateGallery() - .withName("eualupjmkhf") - .withCategory("bbcswsrtjri") - .withType("rbpbewtghfgblcg") - .withOrder(1261477123) - .withResourceType("lvqhjkbegibtnmx"), - new WorkbookTemplateGallery() - .withName("bwwaloa") - .withCategory("cgwrtzjuz") - .withType("yzm") - .withOrder(1961357126) - .withResourceType("ngmtsavjcb"), - new WorkbookTemplateGallery() - .withName("xqpsrknftguv") - .withCategory("uhprwmdyvxqt") - .withType("riwwroy") - .withOrder(1621118855) - .withResourceType("rmcqiby")))))); - model = BinaryData.fromObject(model).toObject(WorkbookTemplateProperties.class); - Assertions.assertEquals(2042838071, model.priority()); - Assertions.assertEquals("azt", model.author()); - Assertions.assertEquals("qpuedckzywbiex", model.galleries().get(0).name()); - Assertions.assertEquals("eyueaxibxujwb", model.galleries().get(0).category()); - Assertions.assertEquals("walm", model.galleries().get(0).type()); - Assertions.assertEquals(978941807, model.galleries().get(0).order()); - Assertions.assertEquals("xaepdkzjancuxr", model.galleries().get(0).resourceType()); - Assertions.assertEquals("tcty", model.localized().get("fudwpznt").get(0).galleries().get(0).name()); - Assertions.assertEquals("klbb", model.localized().get("fudwpznt").get(0).galleries().get(0).category()); - Assertions.assertEquals("plwzbhvgyugu", model.localized().get("fudwpznt").get(0).galleries().get(0).type()); - Assertions.assertEquals(230150141, model.localized().get("fudwpznt").get(0).galleries().get(0).order()); - Assertions - .assertEquals("kfssxqukkf", model.localized().get("fudwpznt").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; - } -} 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 a9812953a9b31..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateResourceTests.java +++ /dev/null @@ -1,45 +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\":\"touwaboekqv\",\"tags\":{\"flhhcaal\":\"nsmvbxwyj\"},\"id\":\"jixisxyawjoyaqcs\",\"name\":\"yjpkiidzyexz\",\"type\":\"eli\"}") - .toObject(WorkbookTemplateResource.class); - Assertions.assertEquals("touwaboekqv", model.location()); - Assertions.assertEquals("nsmvbxwyj", model.tags().get("flhhcaal")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookTemplateResource model = - new WorkbookTemplateResource().withLocation("touwaboekqv").withTags(mapOf("flhhcaal", "nsmvbxwyj")); - model = BinaryData.fromObject(model).toObject(WorkbookTemplateResource.class); - Assertions.assertEquals("touwaboekqv", model.location()); - Assertions.assertEquals("nsmvbxwyj", model.tags().get("flhhcaal")); - } - - // 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 deleted file mode 100644 index 3c8d49c2d7145..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplateUpdateParametersTests.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateUpdateParameters; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookTemplateUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookTemplateUpdateParameters model = - BinaryData - .fromString( - "{\"tags\":{\"o\":\"rzt\"},\"properties\":{\"priority\":315550434,\"author\":\"knalaulppg\",\"templateData\":\"datadtpnapnyiropuhp\",\"galleries\":[{\"name\":\"pgylg\",\"category\":\"itxmedjvcslynqww\",\"type\":\"wzz\",\"order\":1437797215,\"resourceType\":\"trmgucnapkte\"},{\"name\":\"llwptfdy\",\"category\":\"fqbuaceopzf\",\"type\":\"hhuao\",\"order\":1553593059,\"resourceType\":\"qeqxo\"}],\"localized\":{\"vjymjhxxjyngud\":[{\"templateData\":\"datazxctobgb\",\"galleries\":[{},{}]},{\"templateData\":\"dataizpost\",\"galleries\":[{},{}]},{\"templateData\":\"datafbunrmfqjhhk\",\"galleries\":[{},{},{},{}]}],\"bxqz\":[{\"templateData\":\"datar\",\"galleries\":[{},{},{}]}],\"yslqbhsfx\":[{\"templateData\":\"datajfauvjfdxxi\",\"galleries\":[{}]},{\"templateData\":\"datat\",\"galleries\":[{},{},{}]},{\"templateData\":\"datatdo\",\"galleries\":[{},{},{},{}]},{\"templateData\":\"dataxv\",\"galleries\":[{},{}]}]}}}") - .toObject(WorkbookTemplateUpdateParameters.class); - Assertions.assertEquals("rzt", model.tags().get("o")); - Assertions.assertEquals(315550434, model.priority()); - Assertions.assertEquals("knalaulppg", model.author()); - Assertions.assertEquals("pgylg", model.galleries().get(0).name()); - Assertions.assertEquals("itxmedjvcslynqww", model.galleries().get(0).category()); - Assertions.assertEquals("wzz", model.galleries().get(0).type()); - Assertions.assertEquals(1437797215, model.galleries().get(0).order()); - Assertions.assertEquals("trmgucnapkte", model.galleries().get(0).resourceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookTemplateUpdateParameters model = - new WorkbookTemplateUpdateParameters() - .withTags(mapOf("o", "rzt")) - .withPriority(315550434) - .withAuthor("knalaulppg") - .withTemplateData("datadtpnapnyiropuhp") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery() - .withName("pgylg") - .withCategory("itxmedjvcslynqww") - .withType("wzz") - .withOrder(1437797215) - .withResourceType("trmgucnapkte"), - new WorkbookTemplateGallery() - .withName("llwptfdy") - .withCategory("fqbuaceopzf") - .withType("hhuao") - .withOrder(1553593059) - .withResourceType("qeqxo"))) - .withLocalized( - mapOf( - "vjymjhxxjyngud", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datazxctobgb") - .withGalleries( - Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("dataizpost") - .withGalleries( - Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datafbunrmfqjhhk") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery()))), - "bxqz", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datar") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery()))), - "yslqbhsfx", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datajfauvjfdxxi") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datat") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datatdo") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("dataxv") - .withGalleries( - Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery()))))); - model = BinaryData.fromObject(model).toObject(WorkbookTemplateUpdateParameters.class); - Assertions.assertEquals("rzt", model.tags().get("o")); - Assertions.assertEquals(315550434, model.priority()); - Assertions.assertEquals("knalaulppg", model.author()); - Assertions.assertEquals("pgylg", model.galleries().get(0).name()); - Assertions.assertEquals("itxmedjvcslynqww", model.galleries().get(0).category()); - Assertions.assertEquals("wzz", model.galleries().get(0).type()); - Assertions.assertEquals(1437797215, model.galleries().get(0).order()); - Assertions.assertEquals("trmgucnapkte", model.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/WorkbookTemplatesCreateOrUpdateWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 2bdc9ad91c9e6..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,203 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.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.ByteBuffer; -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 org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkbookTemplatesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"priority\":400870213,\"author\":\"abzxrvxcushsp\",\"templateData\":\"dataaivmxyasflvgs\",\"galleries\":[{\"name\":\"ywakoihk\",\"category\":\"mjblmljhlny\",\"type\":\"otqyry\",\"order\":782840551,\"resourceType\":\"mqqvxmvwfgtay\"},{\"name\":\"nsup\",\"category\":\"jlzqnhc\",\"type\":\"ql\",\"order\":1936009218,\"resourceType\":\"ibg\"}],\"localized\":{\"bxiqxeiiqbimht\":[{\"templateData\":\"datafyq\",\"galleries\":[{},{}]},{\"templateData\":\"dataqoxwd\",\"galleries\":[{},{}]}]}},\"location\":\"wwinhehf\",\"tags\":{\"embnkbw\":\"fvwbcb\",\"vqihebwtswbzuwf\":\"qvxkd\"},\"id\":\"duragegizvc\",\"name\":\"felisdjub\",\"type\":\"gbqi\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkbookTemplate response = - manager - .workbookTemplates() - .define("zrxcczurt") - .withRegion("fmvigorqjbttzh") - .withExistingResourceGroup("okbzef") - .withTags(mapOf("ckpzvcpopmxeln", "lkafhonqjuje")) - .withPriority(1572244952) - .withAuthor("xbkwv") - .withTemplateData("datagnzvdfbzdixzm") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery() - .withName("odawopqhewjptmcg") - .withCategory("ostzelndlatu") - .withType("zlbiojlvfhrbbpn") - .withOrder(1669443889) - .withResourceType("wwyyurmoch"), - new WorkbookTemplateGallery() - .withName("rprsnm") - .withCategory("ayzejnhlbkpbz") - .withType("piljhahzvech") - .withOrder(491953314) - .withResourceType("wieholewjwiu"), - new WorkbookTemplateGallery() - .withName("wefqsfapaqtferr") - .withCategory("ex") - .withType("mfxapjwogqqno") - .withOrder(1623831151) - .withResourceType("cdabtqwpwya"))) - .withLocalized( - mapOf( - "zsvtuikzhajqgl", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("dataqbucljgkyexaoguy") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datadsdaultxijjumf") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datalnqnmcjn") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("dataqxtbjwgnyf") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery()))), - "sovwxznptgoeiyb", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datamlrqryxynqnz") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery()))), - "zid", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datapfhvfslk") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datalrigjkskyri") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery()))), - "awjutifd", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery() - .withTemplateData("dataaabzmif") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datanmmaxrizkzob") - .withGalleries(Arrays.asList(new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datalhslnelxieixyn") - .withGalleries( - Arrays.asList(new WorkbookTemplateGallery(), new WorkbookTemplateGallery())), - new WorkbookTemplateLocalizedGallery() - .withTemplateData("datacwcrojphs") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery(), - new WorkbookTemplateGallery()))))) - .create(); - - Assertions.assertEquals("wwinhehf", response.location()); - Assertions.assertEquals("fvwbcb", response.tags().get("embnkbw")); - Assertions.assertEquals(400870213, response.priority()); - Assertions.assertEquals("abzxrvxcushsp", response.author()); - Assertions.assertEquals("ywakoihk", response.galleries().get(0).name()); - Assertions.assertEquals("mjblmljhlny", response.galleries().get(0).category()); - Assertions.assertEquals("otqyry", response.galleries().get(0).type()); - Assertions.assertEquals(782840551, response.galleries().get(0).order()); - Assertions.assertEquals("mqqvxmvwfgtay", 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 e60c4d854c1cb..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkbookTemplatesDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workbookTemplates() - .deleteByResourceGroupWithResponse("clj", "ygvkzqkjj", 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 90418f82d97a7..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkbookTemplatesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"priority\":341716623,\"author\":\"omfgbeglqgleohib\",\"templateData\":\"datatnluankrr\",\"galleries\":[{\"name\":\"eebtijvacvb\",\"category\":\"z\",\"type\":\"q\",\"order\":498607950,\"resourceType\":\"rnwxacevehjkuyxo\"},{\"name\":\"gaoql\",\"category\":\"aeylinm\",\"type\":\"vxirpghriypo\",\"order\":1656883941,\"resourceType\":\"lqhykprlpyz\"},{\"name\":\"ciqdsme\",\"category\":\"itdfuxtyasiib\",\"type\":\"ybnnustg\",\"order\":453653118,\"resourceType\":\"nmgixh\"},{\"name\":\"avmqfoudor\",\"category\":\"gyyprotwy\",\"type\":\"ndm\",\"order\":384308231,\"resourceType\":\"gcmjkavl\"}],\"localized\":{\"gqqihedsvqwt\":[{\"templateData\":\"dataftpmdtzfjltfv\",\"galleries\":[{},{},{}]},{\"templateData\":\"datajtotpvopvpbd\",\"galleries\":[{},{},{},{}]}]}},\"location\":\"mkyi\",\"tags\":{\"mcdzsufcohdxbz\":\"sihsgqcwdhohsd\"},\"id\":\"mcmuapc\",\"name\":\"hdbevwqqxeyskon\",\"type\":\"zinkfkbgbzbowxeq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkbookTemplate response = - manager - .workbookTemplates() - .getByResourceGroupWithResponse("hojeevy", "yhsgz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mkyi", response.location()); - Assertions.assertEquals("sihsgqcwdhohsd", response.tags().get("mcdzsufcohdxbz")); - Assertions.assertEquals(341716623, response.priority()); - Assertions.assertEquals("omfgbeglqgleohib", response.author()); - Assertions.assertEquals("eebtijvacvb", response.galleries().get(0).name()); - Assertions.assertEquals("z", response.galleries().get(0).category()); - Assertions.assertEquals("q", response.galleries().get(0).type()); - Assertions.assertEquals(498607950, response.galleries().get(0).order()); - Assertions.assertEquals("rnwxacevehjkuyxo", 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 1d8b9fb8aa09d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupMockTests.java +++ /dev/null @@ -1,76 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkbookTemplatesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"priority\":883576169,\"author\":\"dakchzyvl\",\"templateData\":\"dataxqnrkcxk\",\"galleries\":[{\"name\":\"nxm\",\"category\":\"uxswqrntvl\",\"type\":\"jpsttexoq\",\"order\":1231024606,\"resourceType\":\"yyufmhruncuw\"}],\"localized\":{\"egy\":[{\"templateData\":\"datacdqzhlctddu\",\"galleries\":[{}]},{\"templateData\":\"datayfp\",\"galleries\":[{},{}]},{\"templateData\":\"databnjj\",\"galleries\":[{},{},{},{}]}],\"ihrraiouaub\":[{\"templateData\":\"databoxjumvq\",\"galleries\":[{},{},{},{}]}]}},\"location\":\"jtlo\",\"tags\":{\"pasccbi\":\"uojrngiflr\",\"fqwmkyoquf\":\"imzdlyj\",\"xotngfdguge\":\"vruzslzojhpctfnm\"},\"id\":\"zihgrkyu\",\"name\":\"zabs\",\"type\":\"mfp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workbookTemplates().listByResourceGroup("yb", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jtlo", response.iterator().next().location()); - Assertions.assertEquals("uojrngiflr", response.iterator().next().tags().get("pasccbi")); - Assertions.assertEquals(883576169, response.iterator().next().priority()); - Assertions.assertEquals("dakchzyvl", response.iterator().next().author()); - Assertions.assertEquals("nxm", response.iterator().next().galleries().get(0).name()); - Assertions.assertEquals("uxswqrntvl", response.iterator().next().galleries().get(0).category()); - Assertions.assertEquals("jpsttexoq", response.iterator().next().galleries().get(0).type()); - Assertions.assertEquals(1231024606, response.iterator().next().galleries().get(0).order()); - Assertions.assertEquals("yyufmhruncuw", 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 deleted file mode 100644 index 711a1162466a6..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListResultTests.java +++ /dev/null @@ -1,114 +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.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 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\":1971484471,\"author\":\"pyd\",\"templateData\":\"datafyhxde\",\"galleries\":[{\"name\":\"zi\",\"category\":\"ifsjttgzfbishcb\",\"type\":\"ajdeyeamdphaga\",\"order\":1821646506,\"resourceType\":\"xw\"},{\"name\":\"pwhonowkg\",\"category\":\"wankixzbi\",\"type\":\"eputtmrywnuzoqf\",\"order\":1184256001,\"resourceType\":\"zrnkcqvyxlwh\"},{\"name\":\"sicohoqqnwvlry\",\"category\":\"w\",\"type\":\"eun\",\"order\":1861834573,\"resourceType\":\"gyxzk\"}],\"localized\":{\"uko\":[{},{},{},{}],\"yaxuconuqszfkb\":[{},{}],\"pewr\":[{},{},{},{}]}},\"location\":\"jmwvvj\",\"tags\":{\"zpwv\":\"cxsenhwlrsff\",\"ylihkaetckt\":\"qdqgbi\",\"ctq\":\"fcivfsnkym\"},\"id\":\"jf\",\"name\":\"ebrjcxe\",\"type\":\"fuwutttxf\"}]}") - .toObject(WorkbookTemplatesListResult.class); - Assertions.assertEquals("jmwvvj", model.value().get(0).location()); - Assertions.assertEquals("cxsenhwlrsff", model.value().get(0).tags().get("zpwv")); - Assertions.assertEquals(1971484471, model.value().get(0).priority()); - Assertions.assertEquals("pyd", model.value().get(0).author()); - Assertions.assertEquals("zi", model.value().get(0).galleries().get(0).name()); - Assertions.assertEquals("ifsjttgzfbishcb", model.value().get(0).galleries().get(0).category()); - Assertions.assertEquals("ajdeyeamdphaga", model.value().get(0).galleries().get(0).type()); - Assertions.assertEquals(1821646506, model.value().get(0).galleries().get(0).order()); - Assertions.assertEquals("xw", 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("jmwvvj") - .withTags(mapOf("zpwv", "cxsenhwlrsff", "ylihkaetckt", "qdqgbi", "ctq", "fcivfsnkym")) - .withPriority(1971484471) - .withAuthor("pyd") - .withTemplateData("datafyhxde") - .withGalleries( - Arrays - .asList( - new WorkbookTemplateGallery() - .withName("zi") - .withCategory("ifsjttgzfbishcb") - .withType("ajdeyeamdphaga") - .withOrder(1821646506) - .withResourceType("xw"), - new WorkbookTemplateGallery() - .withName("pwhonowkg") - .withCategory("wankixzbi") - .withType("eputtmrywnuzoqf") - .withOrder(1184256001) - .withResourceType("zrnkcqvyxlwh"), - new WorkbookTemplateGallery() - .withName("sicohoqqnwvlry") - .withCategory("w") - .withType("eun") - .withOrder(1861834573) - .withResourceType("gyxzk"))) - .withLocalized( - mapOf( - "uko", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery(), - new WorkbookTemplateLocalizedGallery(), - new WorkbookTemplateLocalizedGallery(), - new WorkbookTemplateLocalizedGallery()), - "yaxuconuqszfkb", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery(), - new WorkbookTemplateLocalizedGallery()), - "pewr", - Arrays - .asList( - new WorkbookTemplateLocalizedGallery(), - new WorkbookTemplateLocalizedGallery(), - new WorkbookTemplateLocalizedGallery(), - new WorkbookTemplateLocalizedGallery()))))); - model = BinaryData.fromObject(model).toObject(WorkbookTemplatesListResult.class); - Assertions.assertEquals("jmwvvj", model.value().get(0).location()); - Assertions.assertEquals("cxsenhwlrsff", model.value().get(0).tags().get("zpwv")); - Assertions.assertEquals(1971484471, model.value().get(0).priority()); - Assertions.assertEquals("pyd", model.value().get(0).author()); - Assertions.assertEquals("zi", model.value().get(0).galleries().get(0).name()); - Assertions.assertEquals("ifsjttgzfbishcb", model.value().get(0).galleries().get(0).category()); - Assertions.assertEquals("ajdeyeamdphaga", model.value().get(0).galleries().get(0).type()); - Assertions.assertEquals(1821646506, model.value().get(0).galleries().get(0).order()); - Assertions.assertEquals("xw", 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; - } -} 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 deleted file mode 100644 index 2991e8fc8dea3..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookUpdateParametersTests.java +++ /dev/null @@ -1,67 +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.WorkbookUpdateParameters; -import com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateSharedTypeKind; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkbookUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbookUpdateParameters model = - BinaryData - .fromString( - "{\"kind\":\"shared\",\"tags\":{\"aznqntoru\":\"bgdknnqv\"},\"properties\":{\"displayName\":\"sahmky\",\"serializedData\":\"rauwjuetaebu\",\"category\":\"vdmovsmzlxwabm\",\"tags\":[\"fkifr\",\"tpuqujmq\"],\"description\":\"kfbtndoaongbjc\",\"revision\":\"ujitcjedftww\"}}") - .toObject(WorkbookUpdateParameters.class); - Assertions.assertEquals(WorkbookUpdateSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("bgdknnqv", model.tags().get("aznqntoru")); - Assertions.assertEquals("sahmky", model.displayName()); - Assertions.assertEquals("rauwjuetaebu", model.serializedData()); - Assertions.assertEquals("vdmovsmzlxwabm", model.category()); - Assertions.assertEquals("fkifr", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("kfbtndoaongbjc", model.description()); - Assertions.assertEquals("ujitcjedftww", model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbookUpdateParameters model = - new WorkbookUpdateParameters() - .withKind(WorkbookUpdateSharedTypeKind.SHARED) - .withTags(mapOf("aznqntoru", "bgdknnqv")) - .withDisplayName("sahmky") - .withSerializedData("rauwjuetaebu") - .withCategory("vdmovsmzlxwabm") - .withTagsPropertiesTags(Arrays.asList("fkifr", "tpuqujmq")) - .withDescription("kfbtndoaongbjc") - .withRevision("ujitcjedftww"); - model = BinaryData.fromObject(model).toObject(WorkbookUpdateParameters.class); - Assertions.assertEquals(WorkbookUpdateSharedTypeKind.SHARED, model.kind()); - Assertions.assertEquals("bgdknnqv", model.tags().get("aznqntoru")); - Assertions.assertEquals("sahmky", model.displayName()); - Assertions.assertEquals("rauwjuetaebu", model.serializedData()); - Assertions.assertEquals("vdmovsmzlxwabm", model.category()); - Assertions.assertEquals("fkifr", model.tagsPropertiesTags().get(0)); - Assertions.assertEquals("kfbtndoaongbjc", model.description()); - Assertions.assertEquals("ujitcjedftww", model.revision()); - } - - // 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/WorkbooksCreateOrUpdateWithResponseMockTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 712c9d225491d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,128 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.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.ByteBuffer; -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 org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkbooksCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"idwcwvmzegjon\",\"serializedData\":\"hj\",\"version\":\"wgdnqzbr\",\"timeModified\":\"2021-08-15T23:23:18Z\",\"category\":\"pzhz\",\"tags\":[\"sjcitdigsxc\",\"gljplkeuachtomfl\",\"ytswfp\"],\"userId\":\"dgycxnmskwhqjjy\",\"sourceId\":\"urlpshh\",\"storageUri\":\"pedwqsl\",\"description\":\"hmpqvw\",\"revision\":\"kondcb\"},\"identity\":{\"principalId\":\"bd9b94d6-adfb-48d8-884e-5ea84f22fba7\",\"tenantId\":\"72979ca0-d855-4a50-a0de-b5bf7f41f514\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"so\":{\"principalId\":\"ecf304a5-7886-45df-902d-aa58c642305c\",\"clientId\":\"a7d53d43-a74e-4002-bf4e-8dc3fa473e6f\"}}},\"kind\":\"shared\",\"etag\":\"leaesi\",\"location\":\"uqtljqobbpih\",\"tags\":{\"bmpxdlvykfrexc\":\"ecybmrqbrj\",\"qwjksghudgz\":\"s\",\"ggsvoujkxibdaf\":\"xog\",\"xfbvfb\":\"rkmdyom\"},\"id\":\"dy\",\"name\":\"rhpw\",\"type\":\"gddeimaw\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Workbook response = - manager - .workbooks() - .define("ukoveofi") - .withRegion("dulajvlejchcs") - .withExistingResourceGroup("ztlvtmvagbwidqlv") - .withTags(mapOf("cnzqtpjhmqr", "knmzlanrupdwvnp", "hlaiwd", "v", "hzdtxetlgydlh", "xsmlz")) - .withIdentity( - new WorkbookResourceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "ynuchlgmltxd", - new UserAssignedIdentity(), - "ozusgz", - new UserAssignedIdentity(), - "snnjzfpafolpym", - new UserAssignedIdentity(), - "xqzragp", - new UserAssignedIdentity()))) - .withKind(WorkbookSharedTypeKind.SHARED) - .withEtag("t") - .withDisplayName("vjfn") - .withSerializedData("jmvl") - .withVersion("z") - .withCategory("lkujrllfojui") - .withTagsPropertiesTags(Arrays.asList("uuyjucejikz", "eovvtzej", "tjklntikyjuzk")) - .withSourceId("htgv") - .withStorageUri("pcrrk") - .withDescription("awjmjsmw") - .withSourceIdParameter("gjekglklby") - .create(); - - Assertions.assertEquals("uqtljqobbpih", response.location()); - Assertions.assertEquals("ecybmrqbrj", response.tags().get("bmpxdlvykfrexc")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.kind()); - Assertions.assertEquals("leaesi", response.etag()); - Assertions.assertEquals("idwcwvmzegjon", response.displayName()); - Assertions.assertEquals("hj", response.serializedData()); - Assertions.assertEquals("wgdnqzbr", response.version()); - Assertions.assertEquals("pzhz", response.category()); - Assertions.assertEquals("sjcitdigsxc", response.tagsPropertiesTags().get(0)); - Assertions.assertEquals("urlpshh", response.sourceId()); - Assertions.assertEquals("pedwqsl", response.storageUri()); - Assertions.assertEquals("hmpqvw", 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 cb1332e18b542..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkbooksDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workbooks() - .deleteByResourceGroupWithResponse("uxvnsasbcrymodi", "rxklobdxnazpmk", 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 65096aef029a6..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.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.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkbooksGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"igqfusuc\",\"serializedData\":\"zmkw\",\"version\":\"snoxaxmqeqa\",\"timeModified\":\"2021-08-08T18:00:09Z\",\"category\":\"jnhgwydyyn\",\"tags\":[\"khgb\"],\"userId\":\"ta\",\"sourceId\":\"rfdl\",\"storageUri\":\"kh\",\"description\":\"rne\",\"revision\":\"jcpeogkhnmg\"},\"identity\":{\"principalId\":\"2599924e-d293-4086-b818-e3e29e887b9c\",\"tenantId\":\"850e877e-6ec4-4c19-bfb9-572b7bc7d4e6\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hpfpazjzoywjxhp\":{\"principalId\":\"4da8f6be-73f8-4826-8e1f-1b06d63e45db\",\"clientId\":\"0627ffbd-df55-414b-b15d-75e4f5c19c2e\"},\"ontacnpq\":{\"principalId\":\"270a2f34-e9ff-45ee-9277-1a145237d3c0\",\"clientId\":\"8d2410ed-1ee4-4d85-bf29-01824ee084fc\"},\"htuevrhrljy\":{\"principalId\":\"3c069490-845d-47e4-a864-52f068be91fc\",\"clientId\":\"415d6b45-bea3-4a7a-adae-f7ef65865387\"},\"wxhn\":{\"principalId\":\"a9d90d5f-084d-47e1-95de-2efdf02e613e\",\"clientId\":\"a1b7e5b4-5ad6-4111-b0ab-e1b79c1a5284\"}}},\"kind\":\"shared\",\"etag\":\"gwbsreurf\",\"location\":\"kfuarenlv\",\"tags\":{\"jboslcqxypok\":\"klnvnafvvkyfede\",\"ewuninvud\":\"hminqcymczngnbdx\",\"qct\":\"chaqdtvqec\",\"ytxzvtznapxbanno\":\"xxdtddmflh\"},\"id\":\"voxczytpr\",\"name\":\"nwvroevytlyokrr\",\"type\":\"o\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Workbook response = - manager - .workbooks() - .getByResourceGroupWithResponse("nlgmtrwahzjmu", "ftbyrplro", true, com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("kfuarenlv", response.location()); - Assertions.assertEquals("klnvnafvvkyfede", response.tags().get("jboslcqxypok")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.kind()); - Assertions.assertEquals("gwbsreurf", response.etag()); - Assertions.assertEquals("igqfusuc", response.displayName()); - Assertions.assertEquals("zmkw", response.serializedData()); - Assertions.assertEquals("snoxaxmqeqa", response.version()); - Assertions.assertEquals("jnhgwydyyn", response.category()); - Assertions.assertEquals("khgb", response.tagsPropertiesTags().get(0)); - Assertions.assertEquals("rfdl", response.sourceId()); - Assertions.assertEquals("kh", response.storageUri()); - Assertions.assertEquals("rne", 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 91e08f225df02..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupMockTests.java +++ /dev/null @@ -1,93 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.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.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkbooksListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"dirazf\",\"serializedData\":\"xejw\",\"version\":\"mdujtmvcopexcm\",\"timeModified\":\"2021-08-22T13:20:48Z\",\"category\":\"buhhlkyqlt\",\"tags\":[\"ogtu\",\"kffdjktsys\"],\"userId\":\"fvcl\",\"sourceId\":\"xnfuijtkbusqogs\",\"storageUri\":\"kayi\",\"description\":\"sharujtj\",\"revision\":\"xfz\"},\"identity\":{\"principalId\":\"cde341ff-a5e9-46d1-a0a1-9d5123b83156\",\"tenantId\":\"ff9f4cf7-6269-4960-ab1c-c2bd21f8b3e1\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hjpenuygbq\":{\"principalId\":\"9a3c1040-f186-4a43-b191-99f0d7a3d56a\",\"clientId\":\"937a184c-6b22-4a56-8a13-26ff0129db2c\"},\"ekewvnqvcdlguauc\":{\"principalId\":\"46ac3e09-80ef-4dda-83b4-887454d38f18\",\"clientId\":\"6ec92ddf-e466-47e2-b0d9-069b4b6b7476\"},\"jwnlax\":{\"principalId\":\"98ff6eff-b5fe-408e-8ebb-bc5fdba4f9f9\",\"clientId\":\"d68f13ae-b3b1-4bc4-ae61-5d5277cce327\"},\"jqi\":{\"principalId\":\"0037750a-0d03-42f6-829e-339dc17b4a8b\",\"clientId\":\"49cf9276-1424-496e-ba37-79ac56f1b762\"}}},\"kind\":\"shared\",\"etag\":\"vitac\",\"location\":\"xmfcsserxhtv\",\"tags\":{\"sxypruuu\":\"hlwntsjgq\"},\"id\":\"bnchrsziz\",\"name\":\"yuel\",\"type\":\"etndnbfqyggagf\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .workbooks() - .listByResourceGroup( - "hrtdtpdelq", - CategoryType.RETENTION, - Arrays.asList("slmot"), - "ebnfxofvc", - false, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xmfcsserxhtv", response.iterator().next().location()); - Assertions.assertEquals("hlwntsjgq", response.iterator().next().tags().get("sxypruuu")); - Assertions - .assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.iterator().next().kind()); - Assertions.assertEquals("vitac", response.iterator().next().etag()); - Assertions.assertEquals("dirazf", response.iterator().next().displayName()); - Assertions.assertEquals("xejw", response.iterator().next().serializedData()); - Assertions.assertEquals("mdujtmvcopexcm", response.iterator().next().version()); - Assertions.assertEquals("buhhlkyqlt", response.iterator().next().category()); - Assertions.assertEquals("ogtu", response.iterator().next().tagsPropertiesTags().get(0)); - Assertions.assertEquals("xnfuijtkbusqogs", response.iterator().next().sourceId()); - Assertions.assertEquals("kayi", response.iterator().next().storageUri()); - Assertions.assertEquals("sharujtj", 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 b46dfa145d91b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListMockTests.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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.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.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkbooksListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"gt\",\"serializedData\":\"xrjvzuyturmlm\",\"version\":\"wolba\",\"timeModified\":\"2021-07-06T06:01Z\",\"category\":\"opionszon\",\"tags\":[\"gajinnixjawrtmj\",\"jmyccxlzhcoxov\",\"ekhenl\",\"sfnrdtjxt\"],\"userId\":\"dcqtjvidttge\",\"sourceId\":\"slvyjtcvuwkasi\",\"storageUri\":\"esfuught\",\"description\":\"fecjxeygtuhx\",\"revision\":\"cbuewmrswnjlxuz\"},\"identity\":{\"principalId\":\"0da13ee6-0a6e-49e4-8b45-f0bf570a7eb0\",\"tenantId\":\"74cd0370-32e4-4c71-9aa5-a1c30cddf2e9\",\"type\":\"None\",\"userAssignedIdentities\":{\"qehgpd\":{\"principalId\":\"aa6beb51-d412-42be-81df-a30cd47e9200\",\"clientId\":\"e8acf801-c37a-4048-a8e8-37ee732c95a2\"},\"jqatucoigebxn\":{\"principalId\":\"b2bf08fb-7c09-410e-a824-d4a549f238a5\",\"clientId\":\"3a52b46b-e0a8-4927-8dcd-35ae23a72aa1\"},\"fepbnwgfmxjgc\":{\"principalId\":\"ebb26de4-c6aa-477e-bf73-ae1b181b9860\",\"clientId\":\"545a5d82-25ba-43f5-a2be-3fa9e86b8436\"}}},\"kind\":\"shared\",\"etag\":\"gdlfgt\",\"location\":\"y\",\"tags\":{\"amz\":\"quflqbctq\",\"qzeqyjleziunjxdf\":\"rwd\",\"qa\":\"antkwcegyamlbns\"},\"id\":\"jjvpilguooqja\",\"name\":\"m\",\"type\":\"itgueiookjbs\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .workbooks() - .list(CategoryType.WORKBOOK, Arrays.asList("coc"), true, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("y", response.iterator().next().location()); - Assertions.assertEquals("quflqbctq", response.iterator().next().tags().get("amz")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.iterator().next().kind()); - Assertions.assertEquals("gdlfgt", response.iterator().next().etag()); - Assertions.assertEquals("gt", response.iterator().next().displayName()); - Assertions.assertEquals("xrjvzuyturmlm", response.iterator().next().serializedData()); - Assertions.assertEquals("wolba", response.iterator().next().version()); - Assertions.assertEquals("opionszon", response.iterator().next().category()); - Assertions.assertEquals("gajinnixjawrtmj", response.iterator().next().tagsPropertiesTags().get(0)); - Assertions.assertEquals("slvyjtcvuwkasi", response.iterator().next().sourceId()); - Assertions.assertEquals("esfuught", response.iterator().next().storageUri()); - Assertions.assertEquals("fecjxeygtuhx", 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 deleted file mode 100644 index 9432d8617cb23..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListResultTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.applicationinsights.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\":\"lxprglyatddckcbc\",\"serializedData\":\"ejrjxgciqibrho\",\"version\":\"sdqrhzoymibmrq\",\"timeModified\":\"2021-07-29T17:32:56Z\",\"category\":\"ahwfluszdtmhrk\",\"tags\":[\"yyv\",\"qacpiex\"],\"userId\":\"tg\",\"sourceId\":\"bwoenwashrt\",\"storageUri\":\"kcnqxwbpo\",\"description\":\"lpiujwaa\",\"revision\":\"pqiiobyuqe\"},\"identity\":{\"principalId\":\"b568da33-96e4-49bf-b866-fd28fa17f530\",\"tenantId\":\"64131a35-36dc-44b7-a84d-412ba0f1fdf9\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"uqgbdbutauvfbt\":{\"principalId\":\"251f4150-6ca4-4224-89a6-9430ed2c1a33\",\"clientId\":\"8ada2840-0767-412c-b1b4-52295d21f691\"},\"hhmhykojoxa\":{\"principalId\":\"955aaa31-77a9-419a-9499-1d6f647d7f36\",\"clientId\":\"9803f7b0-3299-473c-9d37-5772b9ba45b1\"},\"dlpichkoymkcdyhb\":{\"principalId\":\"c7250d61-b2ad-4ba2-bf22-c046d20113d1\",\"clientId\":\"bffc5fd0-98fd-4e89-b4f1-a87516a93f40\"},\"pwdreqnovvqf\":{\"principalId\":\"f4d3abeb-8932-4658-8f13-9a49c01055ec\",\"clientId\":\"78db0b61-ddd8-4270-a366-e275de6beaee\"}}},\"kind\":\"shared\",\"etag\":\"xywsuws\",\"location\":\"rsndsytgadgvra\",\"tags\":{\"arrwlquu\":\"neqn\"},\"id\":\"jfqka\",\"name\":\"e\",\"type\":\"iipfpubj\"},{\"properties\":{\"displayName\":\"wwiftohqkvpuv\",\"serializedData\":\"sgplsakn\",\"version\":\"fsynljphuop\",\"timeModified\":\"2021-05-14T18:56:32Z\",\"category\":\"lqiyntorzihl\",\"tags\":[\"jswsrmslyz\",\"pzbchck\"],\"userId\":\"zqioxiysuii\",\"sourceId\":\"nkedyatrwyhqmib\",\"storageUri\":\"hwit\",\"description\":\"ypyynpcdpumnzg\",\"revision\":\"z\"},\"identity\":{\"principalId\":\"99904b08-6582-4bbd-b67e-9f56371e7a3f\",\"tenantId\":\"81b69643-0b74-444d-ae64-c76f483679b1\",\"type\":\"None\",\"userAssignedIdentities\":{\"gj\":{\"principalId\":\"354a5541-ece0-4fa4-abd8-0e1ac44b693c\",\"clientId\":\"5a551776-bb13-4426-8c3e-acf817e32722\"},\"ldtlwwr\":{\"principalId\":\"6120ed22-c8e3-4a32-b0dd-6913d89aaa70\",\"clientId\":\"48a664b6-0cf7-4b65-892e-41b121208ca7\"}}},\"kind\":\"shared\",\"etag\":\"tncvokot\",\"location\":\"lxdy\",\"tags\":{\"cogjltdtbn\":\"y\",\"cikhnv\":\"hadoocrk\",\"gxk\":\"amqgxqquezikyw\",\"melwuipiccjz\":\"lla\"},\"id\":\"z\",\"name\":\"v\",\"type\":\"vvcnayr\"},{\"properties\":{\"displayName\":\"rnxxmueed\",\"serializedData\":\"drd\",\"version\":\"tkwqqtchealm\",\"timeModified\":\"2021-09-27T23:43:44Z\",\"category\":\"d\",\"tags\":[\"gdv\",\"vgpiohgwxrt\"],\"userId\":\"dxepxgyq\",\"sourceId\":\"vrvmnpkukghim\",\"storageUri\":\"lxgwimfnjhf\",\"description\":\"wmszkk\",\"revision\":\"qreyfkzi\"},\"identity\":{\"principalId\":\"4da2c09b-213e-4fdb-81a7-659b4b5c24bf\",\"tenantId\":\"f8562579-6ea1-4505-bb77-75bf8263a961\",\"type\":\"None\",\"userAssignedIdentities\":{\"xwczelpcire\":{\"principalId\":\"fa93a833-3e39-470a-bcfe-0baf0b674e44\",\"clientId\":\"7836fff6-07cf-46b8-b499-9587bc2c68cd\"}}},\"kind\":\"shared\",\"etag\":\"aenwabf\",\"location\":\"tkl\",\"tags\":{\"zjosp\":\"bjhwuaan\",\"rvxaglrvimjwosy\":\"youlp\",\"kfcktqum\":\"xitc\",\"gqggebdunygae\":\"ekkezzikhlyfjh\"},\"id\":\"idb\",\"name\":\"fatpxllrxcyjmoa\",\"type\":\"su\"}],\"nextLink\":\"r\"}") - .toObject(WorkbooksListResult.class); - Assertions.assertEquals("r", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbooksListResult model = new WorkbooksListResult().withNextLink("r"); - model = BinaryData.fromObject(model).toObject(WorkbooksListResult.class); - Assertions.assertEquals("r", 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 c654573417ef7..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetWithResponseMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.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.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkbooksRevisionGetWithResponseMockTests { - @Test - public void testRevisionGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"dsxwefoh\",\"serializedData\":\"cbvopwndyqleallk\",\"version\":\"tkhlowkxxpvbr\",\"timeModified\":\"2021-03-26T11:09:49Z\",\"category\":\"mzsyzfhotl\",\"tags\":[\"cyychunsjlp\"],\"userId\":\"twszhvvuic\",\"sourceId\":\"vtrrmhwrbfdpyflu\",\"storageUri\":\"vjglrocuyzlwhhme\",\"description\":\"ooclutnp\",\"revision\":\"emc\"},\"identity\":{\"principalId\":\"6e6e7277-943e-4143-8df3-dfd70951ce29\",\"tenantId\":\"a94643a2-7018-4fd1-bc50-e01a19e1801c\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"xsglh\":{\"principalId\":\"33f53345-d27c-455e-85f7-17e4aeb06551\",\"clientId\":\"3b225e80-8ca3-4c4f-a95b-1002cd3a1886\"},\"rye\":{\"principalId\":\"c29df9f5-4dd1-416d-849d-a2dd08bdb4d3\",\"clientId\":\"b58a91e3-6f34-423f-8eb2-b090784a2393\"},\"m\":{\"principalId\":\"d569bcc3-5e2b-4656-8b32-d6941b91cd7c\",\"clientId\":\"77cade0d-1226-4d16-aee1-91d09c2ab50f\"},\"udnigrfihotj\":{\"principalId\":\"d8f8d51f-059c-41f9-9f1d-c2290c95826c\",\"clientId\":\"a815d0e9-e2e2-4b03-8b9a-368863a10a2d\"}}},\"kind\":\"shared\",\"etag\":\"xuzzjgnrefq\",\"location\":\"hqo\",\"tags\":{\"pzdqtvhcspod\":\"hiqakydiwfbrk\",\"lbmoichd\":\"qaxsipietgbebjf\",\"viqsowsaaelcattc\":\"pnfpubntnbat\"},\"id\":\"uhplrvkmjcwmjv\",\"name\":\"gfggcvkyylizrzbj\",\"type\":\"sfxsf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Workbook response = - manager - .workbooks() - .revisionGetWithResponse("saoafcluqvox", "ycjimryvwgcwwpbm", "gwe", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hqo", response.location()); - Assertions.assertEquals("hiqakydiwfbrk", response.tags().get("pzdqtvhcspod")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.kind()); - Assertions.assertEquals("xuzzjgnrefq", response.etag()); - Assertions.assertEquals("dsxwefoh", response.displayName()); - Assertions.assertEquals("cbvopwndyqleallk", response.serializedData()); - Assertions.assertEquals("tkhlowkxxpvbr", response.version()); - Assertions.assertEquals("mzsyzfhotl", response.category()); - Assertions.assertEquals("cyychunsjlp", response.tagsPropertiesTags().get(0)); - Assertions.assertEquals("vtrrmhwrbfdpyflu", response.sourceId()); - Assertions.assertEquals("vjglrocuyzlwhhme", response.storageUri()); - Assertions.assertEquals("ooclutnp", 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 70f798a88d8e2..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/test/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListMockTests.java +++ /dev/null @@ -1,83 +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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.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.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkbooksRevisionsListMockTests { - @Test - public void testRevisionsList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"xliohrdddt\",\"serializedData\":\"gxqbawpcb\",\"version\":\"zqcyknap\",\"timeModified\":\"2021-03-06T20:54:18Z\",\"category\":\"yuicdhzbdy\",\"tags\":[\"gbdvibidmhmwff\",\"lfmu\",\"apckccrrvw\",\"yoxoy\"],\"userId\":\"k\",\"sourceId\":\"aimmoiroqb\",\"storageUri\":\"hbragapyyr\",\"description\":\"svbpavbopfppdbwn\",\"revision\":\"gahxkumasjcaa\"},\"identity\":{\"principalId\":\"309383ee-2bb3-4418-b542-63d007bc897e\",\"tenantId\":\"23c476e1-58e3-4b8d-bb33-46156bb42f9d\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ehqepvufhbzehe\":{\"principalId\":\"90acda7f-c3df-4c9f-b77d-2c5f7b042717\",\"clientId\":\"1dd1a1db-eb1e-4677-81ea-35be43875456\"},\"qhnlbqnbld\":{\"principalId\":\"cf3d4815-4478-4f32-97a8-d3d8e8a99716\",\"clientId\":\"8990b680-3518-4848-92db-d4787b827853\"},\"clgsc\":{\"principalId\":\"452c11e6-8a5e-40d5-a644-0e248ad1a0a6\",\"clientId\":\"0e90ce32-5db5-4231-9e4d-1b8629919d75\"},\"imkrsrrmouc\":{\"principalId\":\"04547333-5a5c-4163-8e0d-77bf96a9f80c\",\"clientId\":\"b1876bfe-a654-4775-86fb-30822804f5db\"}}},\"kind\":\"shared\",\"etag\":\"dpuviyf\",\"location\":\"aabeolhbhlvbmxuq\",\"tags\":{\"siowlkjxnqpv\":\"xtkcudfbsfar\"},\"id\":\"gf\",\"name\":\"tmhqykiz\",\"type\":\"d\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ApplicationInsightsManager manager = - ApplicationInsightsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workbooks().revisionsList("lmv", "vfxzopjh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("aabeolhbhlvbmxuq", response.iterator().next().location()); - Assertions.assertEquals("xtkcudfbsfar", response.iterator().next().tags().get("siowlkjxnqpv")); - Assertions - .assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(WorkbookSharedTypeKind.SHARED, response.iterator().next().kind()); - Assertions.assertEquals("dpuviyf", response.iterator().next().etag()); - Assertions.assertEquals("xliohrdddt", response.iterator().next().displayName()); - Assertions.assertEquals("gxqbawpcb", response.iterator().next().serializedData()); - Assertions.assertEquals("zqcyknap", response.iterator().next().version()); - Assertions.assertEquals("yuicdhzbdy", response.iterator().next().category()); - Assertions.assertEquals("gbdvibidmhmwff", response.iterator().next().tagsPropertiesTags().get(0)); - Assertions.assertEquals("aimmoiroqb", response.iterator().next().sourceId()); - Assertions.assertEquals("hbragapyyr", response.iterator().next().storageUri()); - Assertions.assertEquals("svbpavbopfppdbwn", response.iterator().next().description()); - } -}