Skip to content

Commit

Permalink
CodeGen from PR 17099 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge f0c1930bf259016df91560f941a1094b6b7b74ff into af723f616d53476dff2867d1bd933b2f0c63e03c
  • Loading branch information
SDKAuto committed Dec 16, 2021
1 parent b91d9f2 commit 07b120c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
4 changes: 3 additions & 1 deletion sdk/logz/azure-resourcemanager-logz/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2021-12-16)

- Azure Resource Manager logz client library for Java. This package contains Microsoft Azure SDK for logz Management SDK. Package tag package-2020-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
2 changes: 1 addition & 1 deletion sdk/logz/azure-resourcemanager-logz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-logz</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -41,6 +42,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/** Entry point to LogzManager. */
public final class LogzManager {
Expand Down Expand Up @@ -217,11 +219,24 @@ public LogzManager authenticate(TokenCredential credential, AzureProfile profile
List<HttpPipelinePolicy> 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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ private PollerFlux<PollResult<LogzMonitorResourceInner>, LogzMonitorResourceInne
this.client.getHttpPipeline(),
LogzMonitorResourceInner.class,
LogzMonitorResourceInner.class,
Context.NONE);
this.client.getContext());
}

/**
Expand Down Expand Up @@ -1459,7 +1459,8 @@ private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroup
Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, monitorName);
return this
.client
.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
.<Void, Void>getLroResult(
mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(
this.client.getHttpPipeline(),
LogzSingleSignOnResourceInner.class,
LogzSingleSignOnResourceInner.class,
Context.NONE);
this.client.getContext());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ private PollerFlux<PollResult<LogzMonitorResourceInner>, LogzMonitorResourceInne
this.client.getHttpPipeline(),
LogzMonitorResourceInner.class,
LogzMonitorResourceInner.class,
Context.NONE);
this.client.getContext());
}

/**
Expand Down Expand Up @@ -1067,7 +1067,8 @@ private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(
Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, monitorName, subAccountName);
return this
.client
.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
.<Void, Void>getLroResult(
mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}

/**
Expand Down

0 comments on commit 07b120c

Please sign in to comment.