From 0e27b0cbc6bde3eed584220341c807029f34042d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 24 Nov 2021 08:46:46 +0000 Subject: [PATCH] CodeGen from PR 16870 in Azure/azure-rest-api-specs Merge 060b8c0b612f9682ea4128bbd36a6d1827b1fdbc into 0b1507f211e830195c552b0e1d5ecb689e27a6d6 --- .../CHANGELOG.md | 4 +++- .../README.md | 2 +- .../BareMetalInfrastructureManager.java | 17 ++++++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/CHANGELOG.md b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/CHANGELOG.md index 0531b27aa8c1f..703f596f583c7 100644 --- a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/CHANGELOG.md +++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-11-24) + +- Azure Resource Manager BareMetalInfrastructure client library for Java. This package contains Microsoft Azure SDK for BareMetalInfrastructure Management SDK. The BareMetalInfrastructure Management client. Package tag package-2021-08-09. 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/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/README.md b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/README.md index 57a19116e2851..7a8f603e2d273 100644 --- a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/README.md +++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-baremetalinfrastructure - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/BareMetalInfrastructureManager.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/BareMetalInfrastructureManager.java index e8c313d7ec1e5..bfe4f693e271e 100644 --- a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/BareMetalInfrastructureManager.java +++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/BareMetalInfrastructureManager.java @@ -8,6 +8,7 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; 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.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; @@ -31,6 +32,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to BareMetalInfrastructureManager. The BareMetalInfrastructure Management client. */ public final class BareMetalInfrastructureManager { @@ -199,11 +201,24 @@ public BareMetalInfrastructureManager authenticate(TokenCredential credential, A List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline =