From 9366a4c3af94efc9b0dc314116099c7e3fb7ae2d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 26 May 2022 06:07:18 +0000 Subject: [PATCH] CodeGen from PR 18652 in Azure/azure-rest-api-specs update etag and kind type (#18652) * initial expected changes * remove additionalProperties from etag * rename property name --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 34 +-- .../pom.xml | 2 +- .../ApplicationInsightsManager.java | 159 +++++++++++++-- .../fluent/WorkbooksClient.java | 32 +-- .../fluent/models/WorkbookInner.java | 6 +- .../AnalyticsItemsClientImpl.java | 58 +----- .../implementation/AnnotationsClientImpl.java | 21 +- .../implementation/ApiKeysClientImpl.java | 27 +-- .../ApplicationInsightsComponentImpl.java | 4 + ...cationInsightsManagementClientBuilder.java | 34 ++- ...plicationInsightsManagementClientImpl.java | 7 +- .../ComponentAvailableFeaturesClientImpl.java | 10 +- ...onentCurrentBillingFeaturesClientImpl.java | 19 +- ...omponentFeatureCapabilitiesClientImpl.java | 10 +- .../ComponentLinkedStorageAccountsImpl.java | 4 + ...edStorageAccountsOperationsClientImpl.java | 30 +-- .../ComponentQuotaStatusClientImpl.java | 10 +- .../implementation/ComponentsClientImpl.java | 47 +---- .../ExportConfigurationsClientImpl.java | 46 +---- .../implementation/FavoritesClientImpl.java | 48 +---- .../implementation/LiveTokensClientImpl.java | 10 +- .../implementation/MyWorkbookImpl.java | 4 + .../implementation/MyWorkbooksClientImpl.java | 47 +---- ...tiveDetectionConfigurationsClientImpl.java | 28 +-- .../implementation/WebTestImpl.java | 4 + .../implementation/WebTestsClientImpl.java | 29 +-- .../WorkItemConfigurationsClientImpl.java | 38 +--- .../implementation/WorkbookImpl.java | 14 +- .../implementation/WorkbookTemplateImpl.java | 4 + .../WorkbookTemplatesClientImpl.java | 38 +--- .../implementation/WorkbooksClientImpl.java | 193 +++++++----------- .../models/ApplicationInsightsComponent.java | 7 + .../models/ApplicationType.java | 6 +- .../models/CategoryType.java | 6 +- .../ComponentLinkedStorageAccounts.java | 7 + .../models/FavoriteSourceType.java | 6 +- .../applicationinsights/models/FlowType.java | 6 +- .../models/IngestionMode.java | 6 +- .../applicationinsights/models/ItemScope.java | 6 +- .../models/ItemScopePath.java | 6 +- .../applicationinsights/models/ItemType.java | 6 +- .../models/ItemTypeParameter.java | 6 +- .../applicationinsights/models/Kind.java | 6 +- .../models/ManagedServiceIdentityType.java | 6 +- .../models/MyWorkbook.java | 7 + .../models/MyWorkbookManagedIdentityType.java | 6 +- .../models/PublicNetworkAccessType.java | 6 +- .../models/PurgeState.java | 6 +- .../models/RequestSource.java | 6 +- .../models/SharedTypeKind.java | 34 --- .../models/StorageType.java | 6 +- .../applicationinsights/models/WebTest.java | 7 + .../applicationinsights/models/Workbook.java | 13 +- .../models/WorkbookResource.java | 6 +- .../models/WorkbookSharedTypeKind.java | 35 ++++ .../models/WorkbookTemplate.java | 7 + .../models/WorkbookUpdateParameters.java | 6 +- .../models/WorkbookUpdateSharedTypeKind.java | 35 ++++ .../applicationinsights/models/Workbooks.java | 16 +- .../WorkbooksCreateOrUpdateSamples.java | 10 +- .../generated/WorkbooksDeleteSamples.java | 2 +- .../WorkbooksGetByResourceGroupSamples.java | 6 +- .../WorkbooksListByResourceGroupSamples.java | 4 +- .../generated/WorkbooksListSamples.java | 4 +- .../WorkbooksRevisionGetSamples.java | 2 +- .../WorkbooksRevisionsListSamples.java | 2 +- .../generated/WorkbooksUpdateSamples.java | 4 +- 69 files changed, 585 insertions(+), 750 deletions(-) delete mode 100644 sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/SharedTypeKind.java create mode 100644 sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java create mode 100644 sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md index 94b9118349444..0c6f85c0ffa06 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.1 (2022-05-26) + +- Azure Resource Manager ApplicationInsights client library for Java. This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2022-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md index 1575860a0fc57..c2eb8ee5509b5 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-02-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2022-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-applicationinsights - 1.0.0-beta.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md index 812aba3c70073..33081992ad747 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md @@ -2444,17 +2444,17 @@ public final class WorkbookTemplatesUpdateSamples { ### Workbooks_CreateOrUpdate ```java -import com.azure.resourcemanager.applicationinsights.models.Kind; import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType; import com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity; import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity; +import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; import java.util.HashMap; import java.util.Map; /** Samples for Workbooks CreateOrUpdate. */ public final class WorkbooksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookManagedAdd.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedAdd.json */ /** * Sample code: WorkbookManagedAdd. @@ -2475,7 +2475,7 @@ public final class WorkbooksCreateOrUpdateSamples { mapOf( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid", new UserAssignedIdentity()))) - .withKind(Kind.SHARED) + .withKind(WorkbookSharedTypeKind.SHARED) .withDisplayName("Sample workbook") .withSerializedData( "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text -" @@ -2491,7 +2491,7 @@ public final class WorkbooksCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookAdd.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookAdd.json */ /** * Sample code: WorkbookAdd. @@ -2505,7 +2505,7 @@ public final class WorkbooksCreateOrUpdateSamples { .withRegion("westus") .withExistingResourceGroup("my-resource-group") .withTags(mapOf("TagSample01", "sample01", "TagSample02", "sample02")) - .withKind(Kind.SHARED) + .withKind(WorkbookSharedTypeKind.SHARED) .withDisplayName("Sample workbook") .withSerializedData( "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r" @@ -2555,7 +2555,7 @@ import com.azure.core.util.Context; /** Samples for Workbooks Delete. */ public final class WorkbooksDeleteSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookDelete.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookDelete.json */ /** * Sample code: WorkbookDelete. @@ -2579,7 +2579,7 @@ import com.azure.core.util.Context; /** Samples for Workbooks GetByResourceGroup. */ public final class WorkbooksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookGet1.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet1.json */ /** * Sample code: WorkbookGet1. @@ -2594,7 +2594,7 @@ public final class WorkbooksGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookManagedGet.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedGet.json */ /** * Sample code: WorkbookManagedGet. @@ -2610,7 +2610,7 @@ public final class WorkbooksGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookGet.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet.json */ /** * Sample code: WorkbookGet. @@ -2635,7 +2635,7 @@ import com.azure.resourcemanager.applicationinsights.models.CategoryType; /** Samples for Workbooks List. */ public final class WorkbooksListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksListSub.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksListSub.json */ /** * Sample code: WorkbooksListSub. @@ -2648,7 +2648,7 @@ public final class WorkbooksListSamples { } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList2.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList2.json */ /** * Sample code: WorkbooksList2. @@ -2671,7 +2671,7 @@ import com.azure.resourcemanager.applicationinsights.models.CategoryType; /** Samples for Workbooks ListByResourceGroup. */ public final class WorkbooksListByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksManagedList.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksManagedList.json */ /** * Sample code: WorkbooksManagedList. @@ -2692,7 +2692,7 @@ public final class WorkbooksListByResourceGroupSamples { } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList.json */ /** * Sample code: WorkbooksList. @@ -2721,7 +2721,7 @@ import com.azure.core.util.Context; /** Samples for Workbooks RevisionGet. */ public final class WorkbooksRevisionGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookRevisionGet.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionGet.json */ /** * Sample code: WorkbookRevisionGet. @@ -2749,7 +2749,7 @@ import com.azure.core.util.Context; /** Samples for Workbooks RevisionsList. */ public final class WorkbooksRevisionsListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookRevisionsList.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionsList.json */ /** * Sample code: WorkbookRevisionsList. @@ -2772,7 +2772,7 @@ import com.azure.resourcemanager.applicationinsights.models.Workbook; /** Samples for Workbooks Update. */ public final class WorkbooksUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookUpdate.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookUpdate.json */ /** * Sample code: WorkbookUpdate. @@ -2795,7 +2795,7 @@ public final class WorkbooksUpdateSamples { } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookManagedUpdate.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedUpdate.json */ /** * Sample code: WorkbookManagedUpdate. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml index 724e46310ad06..1cf7529b339fb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for ApplicationInsights Management - This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Composite Swagger for Application Insights Management Client. Package tag package-2022-02-01. + This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Composite Swagger for Application Insights Management Client. Package tag package-2022-04-01. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java index 7e135e6b771c5..4f9d20388f46d 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 @@ -10,11 +10,13 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -139,6 +141,19 @@ public static ApplicationInsightsManager authenticate(TokenCredential credential return configure().authenticate(credential, profile); } + /** + * 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. + */ + public static ApplicationInsightsManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new ApplicationInsightsManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create ApplicationInsightsManager with optional configuration. * @@ -157,6 +172,7 @@ public static final class Configurable { private final List policies = new ArrayList<>(); private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -217,6 +233,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

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. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -250,7 +279,7 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure .append("-") .append("com.azure.resourcemanager.applicationinsights") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -268,10 +297,15 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); policies .addAll( @@ -302,7 +336,11 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure } } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); @@ -310,7 +348,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of Annotations. */ + /** + * Gets the resource collection API of Annotations. + * + * @return Resource collection API of Annotations. + */ public Annotations annotations() { if (this.annotations == null) { this.annotations = new AnnotationsImpl(clientObject.getAnnotations(), this); @@ -318,7 +360,11 @@ public Annotations annotations() { return annotations; } - /** @return Resource collection API of ApiKeys. */ + /** + * Gets the resource collection API of ApiKeys. + * + * @return Resource collection API of ApiKeys. + */ public ApiKeys apiKeys() { if (this.apiKeys == null) { this.apiKeys = new ApiKeysImpl(clientObject.getApiKeys(), this); @@ -326,7 +372,11 @@ public ApiKeys apiKeys() { return apiKeys; } - /** @return Resource collection API of ExportConfigurations. */ + /** + * Gets the resource collection API of ExportConfigurations. + * + * @return Resource collection API of ExportConfigurations. + */ public ExportConfigurations exportConfigurations() { if (this.exportConfigurations == null) { this.exportConfigurations = new ExportConfigurationsImpl(clientObject.getExportConfigurations(), this); @@ -334,7 +384,11 @@ public ExportConfigurations exportConfigurations() { return exportConfigurations; } - /** @return Resource collection API of ComponentCurrentBillingFeatures. */ + /** + * Gets the resource collection API of ComponentCurrentBillingFeatures. + * + * @return Resource collection API of ComponentCurrentBillingFeatures. + */ public ComponentCurrentBillingFeatures componentCurrentBillingFeatures() { if (this.componentCurrentBillingFeatures == null) { this.componentCurrentBillingFeatures = @@ -343,7 +397,11 @@ public ComponentCurrentBillingFeatures componentCurrentBillingFeatures() { return componentCurrentBillingFeatures; } - /** @return Resource collection API of ComponentQuotaStatus. */ + /** + * Gets the resource collection API of ComponentQuotaStatus. + * + * @return Resource collection API of ComponentQuotaStatus. + */ public ComponentQuotaStatus componentQuotaStatus() { if (this.componentQuotaStatus == null) { this.componentQuotaStatus = new ComponentQuotaStatusImpl(clientObject.getComponentQuotaStatus(), this); @@ -351,7 +409,11 @@ public ComponentQuotaStatus componentQuotaStatus() { return componentQuotaStatus; } - /** @return Resource collection API of ComponentFeatureCapabilities. */ + /** + * Gets the resource collection API of ComponentFeatureCapabilities. + * + * @return Resource collection API of ComponentFeatureCapabilities. + */ public ComponentFeatureCapabilities componentFeatureCapabilities() { if (this.componentFeatureCapabilities == null) { this.componentFeatureCapabilities = @@ -360,7 +422,11 @@ public ComponentFeatureCapabilities componentFeatureCapabilities() { return componentFeatureCapabilities; } - /** @return Resource collection API of ComponentAvailableFeatures. */ + /** + * Gets the resource collection API of ComponentAvailableFeatures. + * + * @return Resource collection API of ComponentAvailableFeatures. + */ public ComponentAvailableFeatures componentAvailableFeatures() { if (this.componentAvailableFeatures == null) { this.componentAvailableFeatures = @@ -369,7 +435,11 @@ public ComponentAvailableFeatures componentAvailableFeatures() { return componentAvailableFeatures; } - /** @return Resource collection API of ProactiveDetectionConfigurations. */ + /** + * Gets the resource collection API of ProactiveDetectionConfigurations. + * + * @return Resource collection API of ProactiveDetectionConfigurations. + */ public ProactiveDetectionConfigurations proactiveDetectionConfigurations() { if (this.proactiveDetectionConfigurations == null) { this.proactiveDetectionConfigurations = @@ -378,7 +448,11 @@ public ProactiveDetectionConfigurations proactiveDetectionConfigurations() { return proactiveDetectionConfigurations; } - /** @return Resource collection API of WorkItemConfigurations. */ + /** + * Gets the resource collection API of WorkItemConfigurations. + * + * @return Resource collection API of WorkItemConfigurations. + */ public WorkItemConfigurations workItemConfigurations() { if (this.workItemConfigurations == null) { this.workItemConfigurations = @@ -387,7 +461,11 @@ public WorkItemConfigurations workItemConfigurations() { return workItemConfigurations; } - /** @return Resource collection API of Favorites. */ + /** + * Gets the resource collection API of Favorites. + * + * @return Resource collection API of Favorites. + */ public Favorites favorites() { if (this.favorites == null) { this.favorites = new FavoritesImpl(clientObject.getFavorites(), this); @@ -395,7 +473,11 @@ public Favorites favorites() { return favorites; } - /** @return Resource collection API of WebTestLocations. */ + /** + * Gets the resource collection API of WebTestLocations. + * + * @return Resource collection API of WebTestLocations. + */ public WebTestLocations webTestLocations() { if (this.webTestLocations == null) { this.webTestLocations = new WebTestLocationsImpl(clientObject.getWebTestLocations(), this); @@ -403,7 +485,11 @@ public WebTestLocations webTestLocations() { return webTestLocations; } - /** @return Resource collection API of WebTests. */ + /** + * Gets the resource collection API of WebTests. It manages WebTest. + * + * @return Resource collection API of WebTests. + */ public WebTests webTests() { if (this.webTests == null) { this.webTests = new WebTestsImpl(clientObject.getWebTests(), this); @@ -411,7 +497,11 @@ public WebTests webTests() { return webTests; } - /** @return Resource collection API of AnalyticsItems. */ + /** + * Gets the resource collection API of AnalyticsItems. + * + * @return Resource collection API of AnalyticsItems. + */ public AnalyticsItems analyticsItems() { if (this.analyticsItems == null) { this.analyticsItems = new AnalyticsItemsImpl(clientObject.getAnalyticsItems(), this); @@ -419,7 +509,11 @@ public AnalyticsItems analyticsItems() { return analyticsItems; } - /** @return Resource collection API of WorkbookTemplates. */ + /** + * Gets the resource collection API of WorkbookTemplates. It manages WorkbookTemplate. + * + * @return Resource collection API of WorkbookTemplates. + */ public WorkbookTemplates workbookTemplates() { if (this.workbookTemplates == null) { this.workbookTemplates = new WorkbookTemplatesImpl(clientObject.getWorkbookTemplates(), this); @@ -427,7 +521,11 @@ public WorkbookTemplates workbookTemplates() { return workbookTemplates; } - /** @return Resource collection API of MyWorkbooks. */ + /** + * 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); @@ -435,7 +533,11 @@ public MyWorkbooks myWorkbooks() { return myWorkbooks; } - /** @return Resource collection API of Workbooks. */ + /** + * Gets the resource collection API of Workbooks. It manages Workbook. + * + * @return Resource collection API of Workbooks. + */ public Workbooks workbooks() { if (this.workbooks == null) { this.workbooks = new WorkbooksImpl(clientObject.getWorkbooks(), this); @@ -443,7 +545,11 @@ public Workbooks workbooks() { return workbooks; } - /** @return Resource collection API of Components. */ + /** + * Gets the resource collection API of Components. It manages ApplicationInsightsComponent. + * + * @return Resource collection API of Components. + */ public Components components() { if (this.components == null) { this.components = new ComponentsImpl(clientObject.getComponents(), this); @@ -451,7 +557,12 @@ public Components components() { return components; } - /** @return Resource collection API of ComponentLinkedStorageAccountsOperations. */ + /** + * 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 = @@ -461,7 +572,11 @@ public ComponentLinkedStorageAccountsOperations componentLinkedStorageAccountsOp return componentLinkedStorageAccountsOperations; } - /** @return Resource collection API of LiveTokens. */ + /** + * Gets the resource collection API of LiveTokens. + * + * @return Resource collection API of LiveTokens. + */ public LiveTokens liveTokens() { if (this.liveTokens == null) { this.liveTokens = new LiveTokensImpl(clientObject.getLiveTokens(), this); 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 ac97d579c8f58..c419ad3f6f36f 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 @@ -94,7 +94,7 @@ PagedIterable listByResourceGroup( * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. @@ -108,7 +108,7 @@ PagedIterable listByResourceGroup( * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If * false, only return summary content for workbooks. * @param context The context to associate with this operation. @@ -126,7 +126,7 @@ Response getByResourceGroupWithResponse( * Delete a 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 resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. @@ -139,7 +139,7 @@ Response getByResourceGroupWithResponse( * Delete a 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 resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the @@ -154,13 +154,13 @@ 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. + * @return a workbook definition. */ @ServiceMethod(returns = ReturnType.SINGLE) WorkbookInner createOrUpdate(String resourceGroupName, String resourceName, WorkbookInner workbookProperties); @@ -169,7 +169,7 @@ 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @param context The context to associate with this operation. @@ -177,7 +177,7 @@ Response getByResourceGroupWithResponse( * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition along with {@link Response}. + * @return a workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -191,12 +191,12 @@ 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 Application Insights component resource. + * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. + * @return a workbook definition. */ @ServiceMethod(returns = ReturnType.SINGLE) WorkbookInner update(String resourceGroupName, String resourceName); @@ -205,7 +205,7 @@ 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. * @param context The context to associate with this operation. @@ -213,7 +213,7 @@ Response createOrUpdateWithResponse( * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition along with {@link Response}. + * @return a workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -227,7 +227,7 @@ 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 Application Insights component resource. + * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. @@ -242,7 +242,7 @@ 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the @@ -258,7 +258,7 @@ Response updateWithResponse( * Get a single workbook revision defined by its revisionId. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @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 @@ -273,7 +273,7 @@ Response updateWithResponse( * Get a single workbook revision defined by its revisionId. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @param revisionId The id of the workbook's revision. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 2091ccc49dca5..ecbe65dfe056a 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 @@ -6,15 +6,15 @@ 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.WorkbookResource; import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity; +import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; -/** An Application Insights workbook definition. */ +/** A workbook definition. */ @Fluent public final class WorkbookInner extends WorkbookResource { /* @@ -56,7 +56,7 @@ public WorkbookInner withIdentity(WorkbookResourceIdentity identity) { /** {@inheritDoc} */ @Override - public WorkbookInner withKind(Kind kind) { + public WorkbookInner withKind(WorkbookSharedTypeKind kind) { super.withKind(kind); return this; } 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 05a0e5a8440b9..d399163331577 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 @@ -295,14 +295,7 @@ private Mono> listAsync( ItemTypeParameter type, Boolean includeContent) { return listWithResponseAsync(resourceGroupName, resourceName, scopePath, scope, type, includeContent) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -325,14 +318,7 @@ private Mono> listAsync( final ItemTypeParameter type = null; final Boolean includeContent = null; return listWithResponseAsync(resourceGroupName, resourceName, scopePath, scope, type, includeContent) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -529,14 +515,7 @@ private Mono> getWithRe private Mono getAsync( String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, String name) { return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -558,14 +537,7 @@ private Mono getAsync( final String id = null; final String name = null; return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -780,14 +752,7 @@ private Mono putAsync( ApplicationInsightsComponentAnalyticsItemInner itemProperties, Boolean overrideItem) { return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -813,14 +778,7 @@ private Mono putAsync( ApplicationInsightsComponentAnalyticsItemInner itemProperties) { final Boolean overrideItem = null; return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1012,7 +970,7 @@ private Mono> deleteWithResponseAsync( private Mono deleteAsync( String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, String name) { return deleteWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) - .flatMap((Response res) -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** @@ -1032,7 +990,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, It final String id = null; final String name = null; return deleteWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) - .flatMap((Response res) -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** 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 c9a681fe2ede2..70b6055c29ee7 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 @@ -460,14 +460,7 @@ private Mono>> createWithResponseAsync( private Mono> createAsync( String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { return createWithResponseAsync(resourceGroupName, resourceName, annotationProperties) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -622,8 +615,7 @@ private Mono> deleteWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName, String annotationId) { - return deleteWithResponseAsync(resourceGroupName, resourceName, annotationId) - .flatMap((Response res) -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, resourceName, annotationId).flatMap(ignored -> Mono.empty()); } /** @@ -779,14 +771,7 @@ private Mono>> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAsync(String resourceGroupName, String resourceName, String annotationId) { return getWithResponseAsync(resourceGroupName, resourceName, annotationId) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** 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 a5c1a292ee9c8..bd95be1478e2a 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 @@ -427,14 +427,7 @@ private Mono> createWithRespon private Mono createAsync( String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { return createWithResponseAsync(resourceGroupName, resourceName, apiKeyProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -598,14 +591,7 @@ private Mono> deleteWithRespon private Mono deleteAsync( String resourceGroupName, String resourceName, String keyId) { return deleteWithResponseAsync(resourceGroupName, resourceName, keyId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -763,14 +749,7 @@ private Mono> getWithResponseA private Mono getAsync( String resourceGroupName, String resourceName, String keyId) { return getWithResponseAsync(resourceGroupName, resourceName, keyId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** 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 511e0d44f8be3..ebe648faf1a13 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 @@ -177,6 +177,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ApplicationInsightsComponentInner innerModel() { return this.innerObject; } 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 e3c0b1f4af9ee..7793c01cd415a 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 @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public ApplicationInsightsManagementClientBuilder environment(AzureEnvironment e } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the ApplicationInsightsManagementClientBuilder. */ - public ApplicationInsightsManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public ApplicationInsightsManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the ApplicationInsightsManagementClientBuilder. */ - public ApplicationInsightsManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public ApplicationInsightsManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -126,15 +125,12 @@ public ApplicationInsightsManagementClientImpl buildClient() { if (environment == null) { this.environment = AzureEnvironment.AZURE; } + if (pipeline == null) { + this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + } if (defaultPollInterval == null) { this.defaultPollInterval = Duration.ofSeconds(30); } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } if (serializerAdapter == null) { this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); } 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 6e30e46f207f7..495810507dd56 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 @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -48,7 +49,6 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -415,10 +415,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** 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 73a94d1509b82..8861b6b28aebc 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 @@ -180,15 +180,7 @@ private Mono> getWi @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String resourceName) { - return getWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** 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 0abe0c386965e..65ebfc728d6b3 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 @@ -200,15 +200,7 @@ private Mono> getWith @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String resourceName) { - return getWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -386,14 +378,7 @@ private Mono updateAsync( String resourceName, ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { return updateWithResponseAsync(resourceGroupName, resourceName, billingFeaturesProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** 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 80d3a792dc7e3..83dddce2d67ff 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 @@ -180,15 +180,7 @@ private Mono> get @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String resourceName) { - return getWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java index 4c99cad4b0570..7dae74d425546 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsImpl.java @@ -34,6 +34,10 @@ public String linkedStorageAccount() { return this.innerModel().linkedStorageAccount(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ComponentLinkedStorageAccountsInner innerModel() { return this.innerObject; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java index d758b7332aea1..bb1ee40cbdb19 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java @@ -256,14 +256,7 @@ private Mono> getWithResponseAsync private Mono getAsync( String resourceGroupName, String resourceName, StorageType storageType) { return getWithResponseAsync(resourceGroupName, resourceName, storageType) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -459,14 +452,7 @@ private Mono createAndUpdateAsync( ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties) { return createAndUpdateWithResponseAsync( resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -675,14 +661,7 @@ private Mono updateAsync( StorageType storageType, ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties) { return updateWithResponseAsync(resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -852,8 +831,7 @@ private Mono> deleteWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName, StorageType storageType) { - return deleteWithResponseAsync(resourceGroupName, resourceName, storageType) - .flatMap((Response res) -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, resourceName, storageType).flatMap(ignored -> Mono.empty()); } /** 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 a2443241f5a26..9e6a71b5f26f2 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 @@ -178,15 +178,7 @@ private Mono> getWithResp */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String resourceName) { - return getWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** 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 dcf107aee8b06..b1cb815f3010b 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 @@ -624,7 +624,7 @@ private Mono> deleteWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap((Response res) -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); } /** @@ -769,14 +769,7 @@ private Mono> getByResourceGroupWith private Mono getByResourceGroupAsync( String resourceGroupName, String resourceName) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -946,14 +939,7 @@ private Mono> createOrUpdateWithResp private Mono createOrUpdateAsync( String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties) { return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, insightProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1123,14 +1109,7 @@ private Mono> updateTagsWithResponse private Mono updateTagsAsync( String resourceGroupName, String resourceName, TagsResource componentTags) { return updateTagsWithResponseAsync(resourceGroupName, resourceName, componentTags) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1310,14 +1289,7 @@ private Mono> purgeWithResponseAsync( private Mono purgeAsync( String resourceGroupName, String resourceName, ComponentPurgeBody body) { return purgeWithResponseAsync(resourceGroupName, resourceName, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1487,14 +1459,7 @@ private Mono> getPurgeStatusWithResp private Mono getPurgeStatusAsync( String resourceGroupName, String resourceName, String purgeId) { return getPurgeStatusWithResponseAsync(resourceGroupName, resourceName, purgeId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** 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 d060485f4dc02..07a9cfd6213fa 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 @@ -251,15 +251,7 @@ private Mono @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAsync( String resourceGroupName, String resourceName) { - return listWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -431,14 +423,7 @@ private Mono private Mono> createAsync( String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { return createWithResponseAsync(resourceGroupName, resourceName, exportProperties) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -604,14 +589,7 @@ private Mono> del private Mono deleteAsync( String resourceGroupName, String resourceName, String exportId) { return deleteWithResponseAsync(resourceGroupName, resourceName, exportId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -772,14 +750,7 @@ private Mono> get private Mono getAsync( String resourceGroupName, String resourceName, String exportId) { return getWithResponseAsync(resourceGroupName, resourceName, exportId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -967,14 +938,7 @@ private Mono updateAsync( String exportId, ApplicationInsightsComponentExportRequest exportProperties) { return updateWithResponseAsync(resourceGroupName, resourceName, exportId, exportProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** 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 53da02070f347..2f315dae742cf 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 @@ -304,14 +304,7 @@ private Mono> listAsync( Boolean canFetchContent, List tags) { return listWithResponseAsync(resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -333,14 +326,7 @@ private Mono> listAsync( final Boolean canFetchContent = null; final List tags = null; return listWithResponseAsync(resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -517,14 +503,7 @@ private Mono> getWithRespons private Mono getAsync( String resourceGroupName, String resourceName, String favoriteId) { return getWithResponseAsync(resourceGroupName, resourceName, favoriteId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -717,14 +696,7 @@ private Mono addAsync( String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { return addWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -925,14 +897,7 @@ private Mono updateAsync( String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { return updateWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1096,8 +1061,7 @@ private Mono> deleteWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName, String favoriteId) { - return deleteWithResponseAsync(resourceGroupName, resourceName, favoriteId) - .flatMap((Response res) -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, resourceName, favoriteId).flatMap(ignored -> Mono.empty()); } /** 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 5f386d88d0ef4..07592501abf7f 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 @@ -128,15 +128,7 @@ private Mono> getWithResponseAsync(String resou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceUri) { - return getWithResponseAsync(resourceUri) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(resourceUri).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java index 2ea5ac2dfba52..ade2881cdf6e8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java @@ -115,6 +115,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public MyWorkbookInner innerModel() { return this.innerObject; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java index 1d34767ba52a1..8018a37436466 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java @@ -770,14 +770,7 @@ private Mono> getByResourceGroupWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -919,7 +912,7 @@ private Mono> deleteWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap((Response res) -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); } /** @@ -1090,14 +1083,7 @@ private Mono> createOrUpdateWithResponseAsync( private Mono createOrUpdateAsync( String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties, String sourceId) { return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1116,14 +1102,7 @@ private Mono createOrUpdateAsync( String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { final String sourceId = null; return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1306,14 +1285,7 @@ private Mono> updateWithResponseAsync( private Mono updateAsync( String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties, String sourceId) { return updateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1332,14 +1304,7 @@ private Mono updateAsync( String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { final String sourceId = null; return updateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** 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 059445175c4f7..3265fad361953 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 @@ -222,15 +222,7 @@ Mono> @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAsync( String resourceGroupName, String resourceName) { - return listWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -395,14 +387,7 @@ private Mono getAsync( String resourceGroupName, String resourceName, String configurationId) { return getWithResponseAsync(resourceGroupName, resourceName, configurationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -604,14 +589,7 @@ private Mono u String configurationId, ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { return updateWithResponseAsync(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** 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 5ed4a1f18a054..73aa68849eb93 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 @@ -107,6 +107,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WebTestInner innerModel() { return this.innerObject; } 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 263784adaa09b..faa0d9358d4f5 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 @@ -472,14 +472,7 @@ private Mono> getByResourceGroupWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String webTestName) { return getByResourceGroupWithResponseAsync(resourceGroupName, webTestName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -646,14 +639,7 @@ private Mono> createOrUpdateWithResponseAsync( private Mono createOrUpdateAsync( String resourceGroupName, String webTestName, WebTestInner webTestDefinition) { return createOrUpdateWithResponseAsync(resourceGroupName, webTestName, webTestDefinition) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -818,14 +804,7 @@ private Mono> updateTagsWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateTagsAsync(String resourceGroupName, String webTestName, TagsResource webTestTags) { return updateTagsWithResponseAsync(resourceGroupName, webTestName, webTestTags) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -965,7 +944,7 @@ private Mono> deleteWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String webTestName) { - return deleteWithResponseAsync(resourceGroupName, webTestName).flatMap((Response res) -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, webTestName).flatMap(ignored -> Mono.empty()); } /** 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 71bd52aa322dc..9766e1f2e26d9 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 @@ -472,14 +472,7 @@ private Mono> createWithResponseAsync( private Mono createAsync( String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { return createWithResponseAsync(resourceGroupName, resourceName, workItemConfigurationProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -634,14 +627,7 @@ private Mono> getDefaultWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDefaultAsync(String resourceGroupName, String resourceName) { return getDefaultWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -797,7 +783,7 @@ private Mono> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName, String workItemConfigId) { return deleteWithResponseAsync(resourceGroupName, resourceName, workItemConfigId) - .flatMap((Response res) -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** @@ -964,14 +950,7 @@ private Mono> getItemWithResponseAsync( private Mono getItemAsync( String resourceGroupName, String resourceName, String workItemConfigId) { return getItemWithResponseAsync(resourceGroupName, resourceName, workItemConfigId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1174,14 +1153,7 @@ private Mono updateItemAsync( WorkItemCreateConfiguration workItemConfigurationProperties) { return updateItemWithResponseAsync( resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** 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 2995d2fcca490..f318681ab4479 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java @@ -8,11 +8,11 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.SharedTypeKind; import com.azure.resourcemanager.applicationinsights.models.Workbook; import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity; +import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; import com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateParameters; +import com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateSharedTypeKind; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; @@ -52,7 +52,7 @@ public WorkbookResourceIdentity identity() { return this.innerModel().identity(); } - public Kind kind() { + public WorkbookSharedTypeKind kind() { return this.innerModel().kind(); } @@ -121,6 +121,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WorkbookInner innerModel() { return this.innerObject; } @@ -256,7 +260,7 @@ public WorkbookImpl withIdentity(WorkbookResourceIdentity identity) { return this; } - public WorkbookImpl withKind(Kind kind) { + public WorkbookImpl withKind(WorkbookSharedTypeKind kind) { this.innerModel().withKind(kind); return this; } @@ -341,7 +345,7 @@ public WorkbookImpl withSourceIdParameter(String sourceId) { return this; } - public WorkbookImpl withKind(SharedTypeKind kind) { + public WorkbookImpl withKind(WorkbookUpdateSharedTypeKind kind) { this.updateWorkbookUpdateParameters.withKind(kind); 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 ec78274f15373..a0c284882ae91 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 @@ -84,6 +84,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WorkbookTemplateInner innerModel() { return this.innerObject; } 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 a7150680be0d4..98c605b35ddb9 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 @@ -406,14 +406,7 @@ private Mono> getByResourceGroupWithResponseAsyn @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -555,7 +548,7 @@ private Mono> deleteWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap((Response res) -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); } /** @@ -724,14 +717,7 @@ private Mono> createOrUpdateWithResponseAsync( private Mono createOrUpdateAsync( String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) { return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -903,14 +889,7 @@ private Mono updateAsync( String resourceName, WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters) { return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -927,14 +906,7 @@ private Mono updateAsync( private Mono updateAsync(String resourceGroupName, String resourceName) { final WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters = null; return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** 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 bde758be7c7e2..6c82ea7811d1f 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 @@ -254,7 +254,7 @@ private Mono> listSinglePageAsync( if (category == null) { return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; String tagsConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); @@ -315,7 +315,7 @@ private Mono> listSinglePageAsync( if (category == null) { return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; String tagsConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); @@ -476,7 +476,7 @@ private Mono> listByResourceGroupSinglePageAsync( if (category == null) { return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; String tagsConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); @@ -550,7 +550,7 @@ private Mono> listByResourceGroupSinglePageAsync( if (category == null) { return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; String tagsConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); @@ -705,7 +705,7 @@ public PagedIterable listByResourceGroup( * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If * false, only return summary content for workbooks. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -736,7 +736,7 @@ private Mono> getByResourceGroupWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -758,7 +758,7 @@ private Mono> getByResourceGroupWithResponseAsync( * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If * false, only return summary content for workbooks. * @param context The context to associate with this operation. @@ -790,7 +790,7 @@ private Mono> getByResourceGroupWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -809,7 +809,7 @@ private Mono> getByResourceGroupWithResponseAsync( * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If * false, only return summary content for workbooks. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -821,21 +821,14 @@ private Mono> getByResourceGroupWithResponseAsync( private Mono getByResourceGroupAsync( String resourceGroupName, String resourceName, Boolean canFetchContent) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, canFetchContent) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @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. @@ -845,21 +838,14 @@ private Mono getByResourceGroupAsync( private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { final Boolean canFetchContent = null; return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, canFetchContent) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @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. @@ -875,7 +861,7 @@ public WorkbookInner getByResourceGroup(String resourceGroupName, String resourc * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If * false, only return summary content for workbooks. * @param context The context to associate with this operation. @@ -894,7 +880,7 @@ public Response getByResourceGroupWithResponse( * Delete a 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 resourceName The name of the resource. * @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. @@ -921,7 +907,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -942,7 +928,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * Delete a 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 resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -971,7 +957,7 @@ private Mono> deleteWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -989,7 +975,7 @@ private Mono> deleteWithResponseAsync( * Delete a 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 resourceName The name of the resource. * @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. @@ -997,14 +983,14 @@ private Mono> deleteWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap((Response res) -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); } /** * Delete a 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 resourceName The name of the resource. * @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. @@ -1018,7 +1004,7 @@ public void delete(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 Application Insights component resource. + * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -1034,14 +1020,13 @@ public Response deleteWithResponse(String resourceGroupName, String resour * Create a new 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 resourceName The name of the resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -1071,7 +1056,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { workbookProperties.validate(); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1094,15 +1079,14 @@ private Mono> createOrUpdateWithResponseAsync( * Create a new 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 resourceName The name of the resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -1136,7 +1120,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { workbookProperties.validate(); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1156,64 +1140,50 @@ private Mono> createOrUpdateWithResponseAsync( * Create a new 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 resourceName The name of the resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition on successful completion of {@link Mono}. + * @return a workbook definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, String resourceName, WorkbookInner workbookProperties, String sourceId) { return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create a new 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 resourceName The name of the resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException 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 definition on successful completion of {@link Mono}. + * @return a workbook definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, String resourceName, WorkbookInner workbookProperties) { final String sourceId = null; return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create a new 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 resourceName The name of the resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException 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 definition. + * @return a workbook definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkbookInner createOrUpdate( @@ -1226,14 +1196,14 @@ public WorkbookInner createOrUpdate( * Create a new 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 resourceName The name of the resource. * @param workbookProperties Properties that need to be specified to create a new workbook. * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition along with {@link Response}. + * @return a workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -1250,14 +1220,13 @@ public 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1287,7 +1256,7 @@ private Mono> updateWithResponseAsync( if (workbookUpdateParameters != null) { workbookUpdateParameters.validate(); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1310,15 +1279,14 @@ private Mono> updateWithResponseAsync( * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return a workbook definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1349,7 +1317,7 @@ private Mono> updateWithResponseAsync( if (workbookUpdateParameters != null) { workbookUpdateParameters.validate(); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1369,13 +1337,13 @@ private Mono> updateWithResponseAsync( * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition on successful completion of {@link Mono}. + * @return a workbook definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1384,50 +1352,36 @@ private Mono updateAsync( String sourceId, WorkbookUpdateParameters workbookUpdateParameters) { return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @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 an Application Insights workbook definition on successful completion of {@link Mono}. + * @return a workbook definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String resourceName) { final String sourceId = null; final WorkbookUpdateParameters workbookUpdateParameters = null; return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @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 an Application Insights workbook definition. + * @return a workbook definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkbookInner update(String resourceGroupName, String resourceName) { @@ -1440,14 +1394,14 @@ public WorkbookInner update(String resourceGroupName, String resourceName) { * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition along with {@link Response}. + * @return a workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1464,7 +1418,7 @@ public 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 Application Insights component resource. + * @param resourceName The name of the resource. * @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. @@ -1493,7 +1447,7 @@ private Mono> revisionsListSinglePageAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1523,7 +1477,7 @@ private Mono> revisionsListSinglePageAsync( * Get the revisions for the workbook defined by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -1553,7 +1507,7 @@ private Mono> revisionsListSinglePageAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1580,7 +1534,7 @@ private Mono> revisionsListSinglePageAsync( * Get the revisions for the workbook defined by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @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. @@ -1597,7 +1551,7 @@ private PagedFlux revisionsListAsync(String resourceGroupName, St * Get the revisions for the workbook defined by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -1616,7 +1570,7 @@ private PagedFlux revisionsListAsync( * Get the revisions for the workbook defined by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @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. @@ -1632,7 +1586,7 @@ 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -1649,7 +1603,7 @@ 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 Application Insights component resource. + * @param resourceName The name of the resource. * @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. @@ -1682,7 +1636,7 @@ private Mono> revisionGetWithResponseAsync( if (revisionId == null) { return Mono.error(new IllegalArgumentException("Parameter revisionId is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1704,7 +1658,7 @@ private Mono> revisionGetWithResponseAsync( * Get a single workbook revision defined by its revisionId. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @param revisionId The id of the workbook's revision. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1738,7 +1692,7 @@ private Mono> revisionGetWithResponseAsync( if (revisionId == null) { return Mono.error(new IllegalArgumentException("Parameter revisionId is required and cannot be null.")); } - final String apiVersion = "2021-08-01"; + final String apiVersion = "2022-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1757,7 +1711,7 @@ private Mono> revisionGetWithResponseAsync( * Get a single workbook revision defined by its revisionId. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @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. @@ -1767,21 +1721,14 @@ private Mono> revisionGetWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono revisionGetAsync(String resourceGroupName, String resourceName, String revisionId) { return revisionGetWithResponseAsync(resourceGroupName, resourceName, revisionId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a single workbook revision defined by its revisionId. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @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. @@ -1797,7 +1744,7 @@ public WorkbookInner revisionGet(String resourceGroupName, String resourceName, * Get a single workbook revision defined by its revisionId. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @param revisionId The id of the workbook's revision. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 75d945a1cb4d1..d913f9869dfda 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 @@ -267,6 +267,13 @@ public interface ApplicationInsightsComponent { */ 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.ApplicationInsightsComponentInner * object. 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 a570db599b740..9a5454d142ac8 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 @@ -27,7 +27,11 @@ public static ApplicationType fromString(String name) { return fromString(name, ApplicationType.class); } - /** @return known ApplicationType values. */ + /** + * Gets known ApplicationType values. + * + * @return known ApplicationType values. + */ public static Collection values() { return values(ApplicationType.class); } 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 8b87e6b86e38a..4cb5c809355de 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 @@ -33,7 +33,11 @@ public static CategoryType fromString(String name) { return fromString(name, CategoryType.class); } - /** @return known CategoryType values. */ + /** + * Gets known CategoryType values. + * + * @return known CategoryType values. + */ public static Collection values() { return values(CategoryType.class); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccounts.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccounts.java index c4c2ff84a73cb..5b55adf69c7b3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccounts.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccounts.java @@ -37,6 +37,13 @@ public interface ComponentLinkedStorageAccounts { */ 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. 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 bdc88768bf48f..429f6f6a064be 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 @@ -45,7 +45,11 @@ public static FavoriteSourceType fromString(String name) { return fromString(name, FavoriteSourceType.class); } - /** @return known FavoriteSourceType values. */ + /** + * Gets known FavoriteSourceType values. + * + * @return known FavoriteSourceType values. + */ public static Collection values() { return values(FavoriteSourceType.class); } 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 b8afe895063b4..1a6bac2ec7ef5 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 @@ -24,7 +24,11 @@ public static FlowType fromString(String name) { return fromString(name, FlowType.class); } - /** @return known FlowType values. */ + /** + * Gets known FlowType values. + * + * @return known FlowType values. + */ public static Collection values() { return values(FlowType.class); } 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 bc0bb2a7c7fe4..45d4dc595bcc3 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 @@ -31,7 +31,11 @@ public static IngestionMode fromString(String name) { return fromString(name, IngestionMode.class); } - /** @return known IngestionMode values. */ + /** + * Gets known IngestionMode values. + * + * @return known IngestionMode values. + */ public static Collection values() { return values(IngestionMode.class); } 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 ba7af5c66cc78..b91e99b16cdea 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 @@ -27,7 +27,11 @@ public static ItemScope fromString(String name) { return fromString(name, ItemScope.class); } - /** @return known ItemScope values. */ + /** + * Gets known ItemScope values. + * + * @return known ItemScope values. + */ public static Collection values() { return values(ItemScope.class); } 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 c26c9e911a5e8..f65af78b041a7 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 @@ -27,7 +27,11 @@ public static ItemScopePath fromString(String name) { return fromString(name, ItemScopePath.class); } - /** @return known ItemScopePath values. */ + /** + * Gets known ItemScopePath values. + * + * @return known ItemScopePath values. + */ public static Collection values() { return values(ItemScopePath.class); } 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 64256a7bf3033..6783be5578055 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 @@ -33,7 +33,11 @@ public static ItemType fromString(String name) { return fromString(name, ItemType.class); } - /** @return known ItemType values. */ + /** + * Gets known ItemType values. + * + * @return known ItemType values. + */ public static Collection values() { return values(ItemType.class); } 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 18e0379a99d36..ed38ca20bb5ca 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 @@ -36,7 +36,11 @@ public static ItemTypeParameter fromString(String name) { return fromString(name, ItemTypeParameter.class); } - /** @return known ItemTypeParameter values. */ + /** + * Gets known ItemTypeParameter values. + * + * @return known ItemTypeParameter values. + */ public static Collection values() { return values(ItemTypeParameter.class); } 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 index b8c3649809be8..bf7f812e61783 100644 --- 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 @@ -27,7 +27,11 @@ public static Kind fromString(String name) { return fromString(name, Kind.class); } - /** @return known Kind values. */ + /** + * 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/ManagedServiceIdentityType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java index c59db1039d25d..da584f880cba8 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 @@ -34,7 +34,11 @@ public static ManagedServiceIdentityType fromString(String name) { return fromString(name, ManagedServiceIdentityType.class); } - /** @return known ManagedServiceIdentityType values. */ + /** + * Gets known ManagedServiceIdentityType values. + * + * @return known ManagedServiceIdentityType values. + */ public static Collection values() { return values(ManagedServiceIdentityType.class); } 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 index 5108843898f0b..163baef1876a3 100644 --- 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 @@ -157,6 +157,13 @@ public interface MyWorkbook { */ 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. * 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 index a6dcffcc97708..818949f415e82 100644 --- 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 @@ -27,7 +27,11 @@ public static MyWorkbookManagedIdentityType fromString(String name) { return fromString(name, MyWorkbookManagedIdentityType.class); } - /** @return known MyWorkbookManagedIdentityType values. */ + /** + * 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/PublicNetworkAccessType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PublicNetworkAccessType.java index 7fc35561feaeb..7f1d9cdb8188e 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 @@ -27,7 +27,11 @@ public static PublicNetworkAccessType fromString(String name) { return fromString(name, PublicNetworkAccessType.class); } - /** @return known PublicNetworkAccessType values. */ + /** + * Gets known PublicNetworkAccessType values. + * + * @return known PublicNetworkAccessType values. + */ public static Collection values() { return values(PublicNetworkAccessType.class); } 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 dd2e5cad39b1b..b3f01467e0da3 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 @@ -27,7 +27,11 @@ public static PurgeState fromString(String name) { return fromString(name, PurgeState.class); } - /** @return known PurgeState values. */ + /** + * Gets known PurgeState values. + * + * @return known PurgeState values. + */ public static Collection values() { return values(PurgeState.class); } 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 1e55a777e8557..76ee3c4e54a89 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 @@ -24,7 +24,11 @@ public static RequestSource fromString(String name) { return fromString(name, RequestSource.class); } - /** @return known RequestSource values. */ + /** + * Gets known RequestSource values. + * + * @return known RequestSource values. + */ public static Collection values() { return values(RequestSource.class); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/SharedTypeKind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/SharedTypeKind.java deleted file mode 100644 index 225f7c27c8606..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/SharedTypeKind.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SharedTypeKind. */ -public final class SharedTypeKind extends ExpandableStringEnum { - /** Static value user for SharedTypeKind. */ - public static final SharedTypeKind USER = fromString("user"); - - /** Static value shared for SharedTypeKind. */ - public static final SharedTypeKind SHARED = fromString("shared"); - - /** - * Creates or finds a SharedTypeKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding SharedTypeKind. - */ - @JsonCreator - public static SharedTypeKind fromString(String name) { - return fromString(name, SharedTypeKind.class); - } - - /** @return known SharedTypeKind values. */ - public static Collection values() { - return values(SharedTypeKind.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java index 6818dc2d3a1f5..6e109e0335ea8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java @@ -24,7 +24,11 @@ public static StorageType fromString(String name) { return fromString(name, StorageType.class); } - /** @return known StorageType values. */ + /** + * 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/WebTest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java index 44a1c496edf1a..4a02d8d12ea08 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 @@ -149,6 +149,13 @@ public interface WebTest { */ 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. * 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 213d2eedf4b80..21c76542afd0c 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 @@ -61,7 +61,7 @@ public interface Workbook { * * @return the kind value. */ - Kind kind(); + WorkbookSharedTypeKind kind(); /** * Gets the etag property: Resource etag. @@ -171,6 +171,13 @@ public interface Workbook { */ 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. * @@ -279,7 +286,7 @@ interface WithKind { * @param kind The kind of workbook. Only valid value is shared. * @return the next definition stage. */ - WithCreate withKind(Kind kind); + WithCreate withKind(WorkbookSharedTypeKind kind); } /** The stage of the Workbook definition allowing to specify etag. */ interface WithEtag { @@ -440,7 +447,7 @@ interface WithKind { * @param kind The kind of workbook. Only valid value is shared. * @return the next definition stage. */ - Update withKind(SharedTypeKind kind); + Update withKind(WorkbookUpdateSharedTypeKind kind); } /** The stage of the Workbook update allowing to specify displayName. */ interface WithDisplayName { 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 51f2b6575ce21..21517efa6d216 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 @@ -22,7 +22,7 @@ public class WorkbookResource extends Resource { * The kind of workbook. Only valid value is shared. */ @JsonProperty(value = "kind") - private Kind kind; + private WorkbookSharedTypeKind kind; /* * Resource etag @@ -55,7 +55,7 @@ public WorkbookResource withIdentity(WorkbookResourceIdentity identity) { * * @return the kind value. */ - public Kind kind() { + public WorkbookSharedTypeKind kind() { return this.kind; } @@ -65,7 +65,7 @@ public Kind kind() { * @param kind the kind value to set. * @return the WorkbookResource object itself. */ - public WorkbookResource withKind(Kind kind) { + public WorkbookResource withKind(WorkbookSharedTypeKind kind) { this.kind = kind; return this; } 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 new file mode 100644 index 0000000000000..fcf96bbaa0c2d --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java @@ -0,0 +1,35 @@ +// 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 WorkbookSharedTypeKind. */ +public final class WorkbookSharedTypeKind extends ExpandableStringEnum { + /** Static value shared for WorkbookSharedTypeKind. */ + public static final WorkbookSharedTypeKind SHARED = fromString("shared"); + + /** + * Creates or finds a WorkbookSharedTypeKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding WorkbookSharedTypeKind. + */ + @JsonCreator + public static WorkbookSharedTypeKind fromString(String name) { + return fromString(name, WorkbookSharedTypeKind.class); + } + + /** + * Gets known WorkbookSharedTypeKind values. + * + * @return known WorkbookSharedTypeKind values. + */ + public static Collection values() { + return values(WorkbookSharedTypeKind.class); + } +} 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 05e94ffdf1232..33495d4a2bf8d 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 @@ -98,6 +98,13 @@ public interface WorkbookTemplate { */ 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. * 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 232b5de032514..642f3b18d4078 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 @@ -18,7 +18,7 @@ public final class WorkbookUpdateParameters { * The kind of workbook. Only valid value is shared. */ @JsonProperty(value = "kind") - private SharedTypeKind kind; + private WorkbookUpdateSharedTypeKind kind; /* * Resource tags. @@ -38,7 +38,7 @@ public final class WorkbookUpdateParameters { * * @return the kind value. */ - public SharedTypeKind kind() { + public WorkbookUpdateSharedTypeKind kind() { return this.kind; } @@ -48,7 +48,7 @@ public SharedTypeKind kind() { * @param kind the kind value to set. * @return the WorkbookUpdateParameters object itself. */ - public WorkbookUpdateParameters withKind(SharedTypeKind kind) { + public WorkbookUpdateParameters withKind(WorkbookUpdateSharedTypeKind kind) { this.kind = kind; return this; } 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 new file mode 100644 index 0000000000000..0fb72a872b48b --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java @@ -0,0 +1,35 @@ +// 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 WorkbookUpdateSharedTypeKind. */ +public final class WorkbookUpdateSharedTypeKind extends ExpandableStringEnum { + /** Static value shared for WorkbookUpdateSharedTypeKind. */ + public static final WorkbookUpdateSharedTypeKind SHARED = fromString("shared"); + + /** + * Creates or finds a WorkbookUpdateSharedTypeKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding WorkbookUpdateSharedTypeKind. + */ + @JsonCreator + public static WorkbookUpdateSharedTypeKind fromString(String name) { + return fromString(name, WorkbookUpdateSharedTypeKind.class); + } + + /** + * Gets known WorkbookUpdateSharedTypeKind values. + * + * @return known WorkbookUpdateSharedTypeKind values. + */ + public static Collection values() { + return values(WorkbookUpdateSharedTypeKind.class); + } +} 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 71ca33e2a65f2..5a94bfc09af7a 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 @@ -84,7 +84,7 @@ PagedIterable listByResourceGroup( * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. @@ -97,7 +97,7 @@ PagedIterable listByResourceGroup( * 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 Application Insights component resource. + * @param resourceName The name of the resource. * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If * false, only return summary content for workbooks. * @param context The context to associate with this operation. @@ -114,7 +114,7 @@ Response getByResourceGroupWithResponse( * Delete a 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 resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. @@ -126,7 +126,7 @@ Response getByResourceGroupWithResponse( * Delete a 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 resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the @@ -140,7 +140,7 @@ Response getByResourceGroupWithResponse( * Get the revisions for the workbook defined by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. @@ -154,7 +154,7 @@ Response getByResourceGroupWithResponse( * Get the revisions for the workbook defined by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the @@ -169,7 +169,7 @@ Response getByResourceGroupWithResponse( * Get a single workbook revision defined by its revisionId. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @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 @@ -183,7 +183,7 @@ Response getByResourceGroupWithResponse( * Get a single workbook revision defined by its revisionId. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param resourceName The name of the resource. * @param revisionId The id of the workbook's revision. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 12282e979afb8..b16b37cfd3903 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 @@ -4,17 +4,17 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.resourcemanager.applicationinsights.models.Kind; import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType; import com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity; import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity; +import com.azure.resourcemanager.applicationinsights.models.WorkbookSharedTypeKind; import java.util.HashMap; import java.util.Map; /** Samples for Workbooks CreateOrUpdate. */ public final class WorkbooksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookManagedAdd.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedAdd.json */ /** * Sample code: WorkbookManagedAdd. @@ -35,7 +35,7 @@ public static void workbookManagedAdd( mapOf( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid", new UserAssignedIdentity()))) - .withKind(Kind.SHARED) + .withKind(WorkbookSharedTypeKind.SHARED) .withDisplayName("Sample workbook") .withSerializedData( "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text -" @@ -51,7 +51,7 @@ public static void workbookManagedAdd( } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookAdd.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookAdd.json */ /** * Sample code: WorkbookAdd. @@ -65,7 +65,7 @@ public static void workbookAdd(com.azure.resourcemanager.applicationinsights.App .withRegion("westus") .withExistingResourceGroup("my-resource-group") .withTags(mapOf("TagSample01", "sample01", "TagSample02", "sample02")) - .withKind(Kind.SHARED) + .withKind(WorkbookSharedTypeKind.SHARED) .withDisplayName("Sample workbook") .withSerializedData( "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r" 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 9a5884961842d..92bad304a1add 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 @@ -9,7 +9,7 @@ /** Samples for Workbooks Delete. */ public final class WorkbooksDeleteSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookDelete.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookDelete.json */ /** * Sample code: WorkbookDelete. 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 4b8d01faae5fb..8490f3181a4d4 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 @@ -9,7 +9,7 @@ /** Samples for Workbooks GetByResourceGroup. */ public final class WorkbooksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookGet1.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet1.json */ /** * Sample code: WorkbookGet1. @@ -24,7 +24,7 @@ public static void workbookGet1(com.azure.resourcemanager.applicationinsights.Ap } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookManagedGet.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedGet.json */ /** * Sample code: WorkbookManagedGet. @@ -40,7 +40,7 @@ public static void workbookManagedGet( } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookGet.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet.json */ /** * Sample code: WorkbookGet. 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 6617d9f700dff..95c3f07ea332e 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 @@ -10,7 +10,7 @@ /** Samples for Workbooks ListByResourceGroup. */ public final class WorkbooksListByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksManagedList.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksManagedList.json */ /** * Sample code: WorkbooksManagedList. @@ -31,7 +31,7 @@ public static void workbooksManagedList( } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList.json */ /** * Sample code: WorkbooksList. 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 869eeef16c4b5..59fce76f18c12 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 @@ -10,7 +10,7 @@ /** Samples for Workbooks List. */ public final class WorkbooksListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksListSub.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksListSub.json */ /** * Sample code: WorkbooksListSub. @@ -23,7 +23,7 @@ public static void workbooksListSub( } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList2.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList2.json */ /** * Sample code: WorkbooksList2. 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 7771d749c0f37..33503d19b2191 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 @@ -9,7 +9,7 @@ /** Samples for Workbooks RevisionGet. */ public final class WorkbooksRevisionGetSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookRevisionGet.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionGet.json */ /** * Sample code: WorkbookRevisionGet. 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 ca53ebcb47f0a..71ea909c6441b 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 @@ -9,7 +9,7 @@ /** Samples for Workbooks RevisionsList. */ public final class WorkbooksRevisionsListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookRevisionsList.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionsList.json */ /** * Sample code: WorkbookRevisionsList. 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 078aaeb4744ae..275f2fc5ab741 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 @@ -10,7 +10,7 @@ /** Samples for Workbooks Update. */ public final class WorkbooksUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookUpdate.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookUpdate.json */ /** * Sample code: WorkbookUpdate. @@ -33,7 +33,7 @@ public static void workbookUpdate( } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookManagedUpdate.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedUpdate.json */ /** * Sample code: WorkbookManagedUpdate.