Skip to content

Commit 5fcada5

Browse files
author
SDKAuto
committed
CodeGen from PR 18226 in Azure/azure-rest-api-specs
Merge fff802b21aed5e6a76413e02f67f6460e2c04980 into 2abe647120f14bb145968a5543ead8ed51394498
1 parent 48cb91c commit 5fcada5

File tree

88 files changed

+553
-696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+553
-696
lines changed

sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.3 (Unreleased)
3+
## 1.0.0-beta.1 (2022-03-15)
4+
5+
- Azure Resource Manager WebPubSub client library for Java. This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package tag package-2021-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
46

57
### Features Added
68

sdk/webpubsub/azure-resourcemanager-webpubsub/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-webpubsub</artifactId>
35-
<version>1.0.0-beta.2</version>
35+
<version>1.0.0-beta.3</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/WebPubSubManager.java

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.azure.core.http.HttpClient;
99
import com.azure.core.http.HttpPipeline;
1010
import com.azure.core.http.HttpPipelineBuilder;
11+
import com.azure.core.http.HttpPipelinePosition;
1112
import com.azure.core.http.policy.AddDatePolicy;
1213
import com.azure.core.http.policy.HttpLogOptions;
1314
import com.azure.core.http.policy.HttpLoggingPolicy;
@@ -41,6 +42,7 @@
4142
import java.util.ArrayList;
4243
import java.util.List;
4344
import java.util.Objects;
45+
import java.util.stream.Collectors;
4446

4547
/** Entry point to WebPubSubManager. REST API for Azure WebPubSub Service. */
4648
public final class WebPubSubManager {
@@ -96,7 +98,7 @@ public static Configurable configure() {
9698

9799
/** The Configurable allowing configurations to be set. */
98100
public static final class Configurable {
99-
private final ClientLogger logger = new ClientLogger(Configurable.class);
101+
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
100102

101103
private HttpClient httpClient;
102104
private HttpLogOptions httpLogOptions;
@@ -170,9 +172,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
170172
* @return the configurable object itself.
171173
*/
172174
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
173-
this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
175+
this.defaultPollInterval =
176+
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
174177
if (this.defaultPollInterval.isNegative()) {
175-
throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
178+
throw LOGGER
179+
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
176180
}
177181
return this;
178182
}
@@ -194,7 +198,7 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr
194198
.append("-")
195199
.append("com.azure.resourcemanager.webpubsub")
196200
.append("/")
197-
.append("1.0.0-beta.2");
201+
.append("1.0.0-beta.1");
198202
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
199203
userAgentBuilder
200204
.append(" (")
@@ -217,11 +221,24 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr
217221
List<HttpPipelinePolicy> policies = new ArrayList<>();
218222
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
219223
policies.add(new RequestIdPolicy());
224+
policies
225+
.addAll(
226+
this
227+
.policies
228+
.stream()
229+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
230+
.collect(Collectors.toList()));
220231
HttpPolicyProviders.addBeforeRetryPolicies(policies);
221232
policies.add(retryPolicy);
222233
policies.add(new AddDatePolicy());
223234
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
224-
policies.addAll(this.policies);
235+
policies
236+
.addAll(
237+
this
238+
.policies
239+
.stream()
240+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
241+
.collect(Collectors.toList()));
225242
HttpPolicyProviders.addAfterRetryPolicies(policies);
226243
policies.add(new HttpLoggingPolicy(httpLogOptions));
227244
HttpPipeline httpPipeline =

sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/OperationsClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public interface OperationsClient {
1717
*
1818
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
1919
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
20-
* @return result of the request to list REST API operations.
20+
* @return result of the request to list REST API operations as paginated response with {@link PagedIterable}.
2121
*/
2222
@ServiceMethod(returns = ReturnType.COLLECTION)
2323
PagedIterable<OperationInner> list();
@@ -29,7 +29,7 @@ public interface OperationsClient {
2929
* @throws IllegalArgumentException thrown if parameters fail the validation.
3030
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3131
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
32-
* @return result of the request to list REST API operations.
32+
* @return result of the request to list REST API operations as paginated response with {@link PagedIterable}.
3333
*/
3434
@ServiceMethod(returns = ReturnType.COLLECTION)
3535
PagedIterable<OperationInner> list(Context context);

sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/UsagesClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public interface UsagesClient {
1919
* @throws IllegalArgumentException thrown if parameters fail the validation.
2020
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2121
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
22-
* @return object that includes an array of the resource usages and a possible link for next set.
22+
* @return object that includes an array of the resource usages and a possible link for next set as paginated
23+
* response with {@link PagedIterable}.
2324
*/
2425
@ServiceMethod(returns = ReturnType.COLLECTION)
2526
PagedIterable<SignalRServiceUsageInner> list(String location);
@@ -32,7 +33,8 @@ public interface UsagesClient {
3233
* @throws IllegalArgumentException thrown if parameters fail the validation.
3334
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3435
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
35-
* @return object that includes an array of the resource usages and a possible link for next set.
36+
* @return object that includes an array of the resource usages and a possible link for next set as paginated
37+
* response with {@link PagedIterable}.
3638
*/
3739
@ServiceMethod(returns = ReturnType.COLLECTION)
3840
PagedIterable<SignalRServiceUsageInner> list(String location, Context context);

sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubHubsClient.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public interface WebPubSubHubsClient {
2424
* @throws IllegalArgumentException thrown if parameters fail the validation.
2525
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2626
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
27-
* @return hub setting list.
27+
* @return hub setting list as paginated response with {@link PagedIterable}.
2828
*/
2929
@ServiceMethod(returns = ReturnType.COLLECTION)
3030
PagedIterable<WebPubSubHubInner> list(String resourceGroupName, String resourceName);
@@ -39,7 +39,7 @@ public interface WebPubSubHubsClient {
3939
* @throws IllegalArgumentException thrown if parameters fail the validation.
4040
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4141
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
42-
* @return hub setting list.
42+
* @return hub setting list as paginated response with {@link PagedIterable}.
4343
*/
4444
@ServiceMethod(returns = ReturnType.COLLECTION)
4545
PagedIterable<WebPubSubHubInner> list(String resourceGroupName, String resourceName, Context context);
@@ -70,7 +70,7 @@ public interface WebPubSubHubsClient {
7070
* @throws IllegalArgumentException thrown if parameters fail the validation.
7171
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
7272
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
73-
* @return a hub setting.
73+
* @return a hub setting along with {@link Response}.
7474
*/
7575
@ServiceMethod(returns = ReturnType.SINGLE)
7676
Response<WebPubSubHubInner> getWithResponse(
@@ -87,7 +87,7 @@ Response<WebPubSubHubInner> getWithResponse(
8787
* @throws IllegalArgumentException thrown if parameters fail the validation.
8888
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
8989
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
90-
* @return a hub setting.
90+
* @return the {@link SyncPoller} for polling of a hub setting.
9191
*/
9292
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
9393
SyncPoller<PollResult<WebPubSubHubInner>, WebPubSubHubInner> beginCreateOrUpdate(
@@ -105,7 +105,7 @@ SyncPoller<PollResult<WebPubSubHubInner>, WebPubSubHubInner> beginCreateOrUpdate
105105
* @throws IllegalArgumentException thrown if parameters fail the validation.
106106
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
107107
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
108-
* @return a hub setting.
108+
* @return the {@link SyncPoller} for polling of a hub setting.
109109
*/
110110
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
111111
SyncPoller<PollResult<WebPubSubHubInner>, WebPubSubHubInner> beginCreateOrUpdate(
@@ -156,7 +156,7 @@ WebPubSubHubInner createOrUpdate(
156156
* @throws IllegalArgumentException thrown if parameters fail the validation.
157157
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
158158
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
159-
* @return the completion.
159+
* @return the {@link SyncPoller} for polling of long-running operation.
160160
*/
161161
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
162162
SyncPoller<PollResult<Void>, Void> beginDelete(String hubName, String resourceGroupName, String resourceName);
@@ -172,7 +172,7 @@ WebPubSubHubInner createOrUpdate(
172172
* @throws IllegalArgumentException thrown if parameters fail the validation.
173173
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
174174
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
175-
* @return the completion.
175+
* @return the {@link SyncPoller} for polling of long-running operation.
176176
*/
177177
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
178178
SyncPoller<PollResult<Void>, Void> beginDelete(

sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubPrivateEndpointConnectionsClient.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public interface WebPubSubPrivateEndpointConnectionsClient {
2626
* @throws IllegalArgumentException thrown if parameters fail the validation.
2727
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2828
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
29-
* @return a list of private endpoint connections.
29+
* @return a list of private endpoint connections as paginated response with {@link PagedIterable}.
3030
*/
3131
@ServiceMethod(returns = ReturnType.COLLECTION)
3232
PagedIterable<PrivateEndpointConnectionInner> list(String resourceGroupName, String resourceName);
@@ -41,7 +41,7 @@ public interface WebPubSubPrivateEndpointConnectionsClient {
4141
* @throws IllegalArgumentException thrown if parameters fail the validation.
4242
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4343
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
44-
* @return a list of private endpoint connections.
44+
* @return a list of private endpoint connections as paginated response with {@link PagedIterable}.
4545
*/
4646
@ServiceMethod(returns = ReturnType.COLLECTION)
4747
PagedIterable<PrivateEndpointConnectionInner> list(String resourceGroupName, String resourceName, Context context);
@@ -73,7 +73,7 @@ PrivateEndpointConnectionInner get(
7373
* @throws IllegalArgumentException thrown if parameters fail the validation.
7474
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
7575
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
76-
* @return the specified private endpoint connection.
76+
* @return the specified private endpoint connection along with {@link Response}.
7777
*/
7878
@ServiceMethod(returns = ReturnType.SINGLE)
7979
Response<PrivateEndpointConnectionInner> getWithResponse(
@@ -111,7 +111,7 @@ PrivateEndpointConnectionInner update(
111111
* @throws IllegalArgumentException thrown if parameters fail the validation.
112112
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
113113
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
114-
* @return a private endpoint connection to an azure resource.
114+
* @return a private endpoint connection to an azure resource along with {@link Response}.
115115
*/
116116
@ServiceMethod(returns = ReturnType.SINGLE)
117117
Response<PrivateEndpointConnectionInner> updateWithResponse(
@@ -131,7 +131,7 @@ Response<PrivateEndpointConnectionInner> updateWithResponse(
131131
* @throws IllegalArgumentException thrown if parameters fail the validation.
132132
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
133133
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
134-
* @return the completion.
134+
* @return the {@link SyncPoller} for polling of long-running operation.
135135
*/
136136
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
137137
SyncPoller<PollResult<Void>, Void> beginDelete(
@@ -148,7 +148,7 @@ SyncPoller<PollResult<Void>, Void> beginDelete(
148148
* @throws IllegalArgumentException thrown if parameters fail the validation.
149149
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
150150
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
151-
* @return the completion.
151+
* @return the {@link SyncPoller} for polling of long-running operation.
152152
*/
153153
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
154154
SyncPoller<PollResult<Void>, Void> beginDelete(

sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubPrivateLinkResourcesClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ public interface WebPubSubPrivateLinkResourcesClient {
2121
* @throws IllegalArgumentException thrown if parameters fail the validation.
2222
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2323
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
24-
* @return the private link resources that need to be created for a resource.
24+
* @return the private link resources that need to be created for a resource as paginated response with {@link
25+
* PagedIterable}.
2526
*/
2627
@ServiceMethod(returns = ReturnType.COLLECTION)
2728
PagedIterable<PrivateLinkResourceInner> list(String resourceGroupName, String resourceName);
@@ -36,7 +37,8 @@ public interface WebPubSubPrivateLinkResourcesClient {
3637
* @throws IllegalArgumentException thrown if parameters fail the validation.
3738
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3839
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
39-
* @return the private link resources that need to be created for a resource.
40+
* @return the private link resources that need to be created for a resource as paginated response with {@link
41+
* PagedIterable}.
4042
*/
4143
@ServiceMethod(returns = ReturnType.COLLECTION)
4244
PagedIterable<PrivateLinkResourceInner> list(String resourceGroupName, String resourceName, Context context);

0 commit comments

Comments
 (0)