diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md
index 94b911834944..0c6f85c0ffa0 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 1575860a0fc5..c2eb8ee5509b 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.resourcemanagerazure-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 812aba3c7007..33081992ad74 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 724e46310ad0..1cf7529b339f 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml
@@ -13,7 +13,7 @@
jarMicrosoft 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 7e135e6b771c..4f9d20388f46 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 ac97d579c8f5..c419ad3f6f36 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 2091ccc49dca..ecbe65dfe056 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 05a0e5a8440b..d39916333157 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 c9a681fe2ede..70b6055c29ee 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 a5c1a292ee9c..bd95be1478e2 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 511e0d44f8be..ebe648faf1a1 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 e3c0b1f4af9e..7793c01cd415 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 6e30e46f207f..495810507dd5 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