Skip to content

Commit 70ea426

Browse files
author
SDKAuto
committed
CodeGen from PR 16961 in Azure/azure-rest-api-specs
Merge 27b62ab4c6667006a92373d96c057f3644b9aa3f into b7ceedcb657cac760383b17627cd2c1f47dd1521
1 parent 830d468 commit 70ea426

File tree

114 files changed

+4209
-852
lines changed

Some content is hidden

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

114 files changed

+4209
-852
lines changed

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

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

3-
## 1.0.0-beta.3 (Unreleased)
3+
## 1.0.0-beta.1 (2022-02-15)
44

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

67
## 1.0.0-beta.2 (2021-07-29)
78

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager Batch client library for Java.
44

5-
This package contains Microsoft Azure SDK for Batch Management SDK. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -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-batch</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/batch/azure-resourcemanager-batch/SAMPLE.md

Lines changed: 2009 additions & 65 deletions
Large diffs are not rendered by default.

sdk/batch/azure-resourcemanager-batch/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<packaging>jar</packaging>
1414

1515
<name>Microsoft Azure SDK for Batch Management</name>
16-
<description>This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2021-06.</description>
16+
<description>This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Batch Client. Package tag package-2022-01.</description>
1717
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

1919
<licenses>

sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java

Lines changed: 24 additions & 9 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;
@@ -20,11 +21,11 @@
2021
import com.azure.core.management.profile.AzureProfile;
2122
import com.azure.core.util.Configuration;
2223
import com.azure.core.util.logging.ClientLogger;
23-
import com.azure.resourcemanager.batch.fluent.BatchManagement;
24+
import com.azure.resourcemanager.batch.fluent.BatchManagementClient;
2425
import com.azure.resourcemanager.batch.implementation.ApplicationPackagesImpl;
2526
import com.azure.resourcemanager.batch.implementation.ApplicationsImpl;
2627
import com.azure.resourcemanager.batch.implementation.BatchAccountsImpl;
27-
import com.azure.resourcemanager.batch.implementation.BatchManagementBuilder;
28+
import com.azure.resourcemanager.batch.implementation.BatchManagementClientBuilder;
2829
import com.azure.resourcemanager.batch.implementation.CertificatesImpl;
2930
import com.azure.resourcemanager.batch.implementation.LocationsImpl;
3031
import com.azure.resourcemanager.batch.implementation.OperationsImpl;
@@ -45,8 +46,9 @@
4546
import java.util.ArrayList;
4647
import java.util.List;
4748
import java.util.Objects;
49+
import java.util.stream.Collectors;
4850

49-
/** Entry point to BatchManager. */
51+
/** Entry point to BatchManager. Batch Client. */
5052
public final class BatchManager {
5153
private BatchAccounts batchAccounts;
5254

@@ -66,13 +68,13 @@ public final class BatchManager {
6668

6769
private Pools pools;
6870

69-
private final BatchManagement clientObject;
71+
private final BatchManagementClient clientObject;
7072

7173
private BatchManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
7274
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
7375
Objects.requireNonNull(profile, "'profile' cannot be null.");
7476
this.clientObject =
75-
new BatchManagementBuilder()
77+
new BatchManagementClientBuilder()
7678
.pipeline(httpPipeline)
7779
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
7880
.subscriptionId(profile.getSubscriptionId())
@@ -202,7 +204,7 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
202204
.append("-")
203205
.append("com.azure.resourcemanager.batch")
204206
.append("/")
205-
.append("1.0.0-beta.2");
207+
.append("1.0.0-beta.1");
206208
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
207209
userAgentBuilder
208210
.append(" (")
@@ -225,11 +227,24 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
225227
List<HttpPipelinePolicy> policies = new ArrayList<>();
226228
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
227229
policies.add(new RequestIdPolicy());
230+
policies
231+
.addAll(
232+
this
233+
.policies
234+
.stream()
235+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
236+
.collect(Collectors.toList()));
228237
HttpPolicyProviders.addBeforeRetryPolicies(policies);
229238
policies.add(retryPolicy);
230239
policies.add(new AddDatePolicy());
231240
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
232-
policies.addAll(this.policies);
241+
policies
242+
.addAll(
243+
this
244+
.policies
245+
.stream()
246+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
247+
.collect(Collectors.toList()));
233248
HttpPolicyProviders.addAfterRetryPolicies(policies);
234249
policies.add(new HttpLoggingPolicy(httpLogOptions));
235250
HttpPipeline httpPipeline =
@@ -315,10 +330,10 @@ public Pools pools() {
315330
}
316331

317332
/**
318-
* @return Wrapped service client BatchManagement providing direct access to the underlying auto-generated API
333+
* @return Wrapped service client BatchManagementClient providing direct access to the underlying auto-generated API
319334
* implementation, based on Azure REST API.
320335
*/
321-
public BatchManagement serviceClient() {
336+
public BatchManagementClient serviceClient() {
322337
return this.clientObject;
323338
}
324339
}

sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationPackagesClient.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ ApplicationPackageInner activate(
4949
* @throws IllegalArgumentException thrown if parameters fail the validation.
5050
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
5151
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
52-
* @return an application package which represents a particular version of an application.
52+
* @return an application package which represents a particular version of an application along with {@link
53+
* Response}.
5354
*/
5455
@ServiceMethod(returns = ReturnType.SINGLE)
5556
Response<ApplicationPackageInner> activateWithResponse(
@@ -92,7 +93,8 @@ ApplicationPackageInner create(
9293
* @throws IllegalArgumentException thrown if parameters fail the validation.
9394
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
9495
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
95-
* @return an application package which represents a particular version of an application.
96+
* @return an application package which represents a particular version of an application along with {@link
97+
* Response}.
9698
*/
9799
@ServiceMethod(returns = ReturnType.SINGLE)
98100
Response<ApplicationPackageInner> createWithResponse(
@@ -128,7 +130,7 @@ Response<ApplicationPackageInner> createWithResponse(
128130
* @throws IllegalArgumentException thrown if parameters fail the validation.
129131
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
130132
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
131-
* @return the response.
133+
* @return the {@link Response}.
132134
*/
133135
@ServiceMethod(returns = ReturnType.SINGLE)
134136
Response<Void> deleteWithResponse(
@@ -161,7 +163,7 @@ ApplicationPackageInner get(
161163
* @throws IllegalArgumentException thrown if parameters fail the validation.
162164
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
163165
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
164-
* @return information about the specified application package.
166+
* @return information about the specified application package along with {@link Response}.
165167
*/
166168
@ServiceMethod(returns = ReturnType.SINGLE)
167169
Response<ApplicationPackageInner> getWithResponse(
@@ -176,7 +178,7 @@ Response<ApplicationPackageInner> getWithResponse(
176178
* @throws IllegalArgumentException thrown if parameters fail the validation.
177179
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
178180
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
179-
* @return the result of performing list application packages.
181+
* @return the result of performing list application packages as paginated response with {@link PagedIterable}.
180182
*/
181183
@ServiceMethod(returns = ReturnType.COLLECTION)
182184
PagedIterable<ApplicationPackageInner> list(String resourceGroupName, String accountName, String applicationName);
@@ -192,7 +194,7 @@ Response<ApplicationPackageInner> getWithResponse(
192194
* @throws IllegalArgumentException thrown if parameters fail the validation.
193195
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
194196
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
195-
* @return the result of performing list application packages.
197+
* @return the result of performing list application packages as paginated response with {@link PagedIterable}.
196198
*/
197199
@ServiceMethod(returns = ReturnType.COLLECTION)
198200
PagedIterable<ApplicationPackageInner> list(

sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationsClient.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public interface ApplicationsClient {
3838
* @throws IllegalArgumentException thrown if parameters fail the validation.
3939
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4040
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
41-
* @return contains information about an application in a Batch account.
41+
* @return contains information about an application in a Batch account along with {@link Response}.
4242
*/
4343
@ServiceMethod(returns = ReturnType.SINGLE)
4444
Response<ApplicationInner> createWithResponse(
@@ -71,7 +71,7 @@ Response<ApplicationInner> createWithResponse(
7171
* @throws IllegalArgumentException thrown if parameters fail the validation.
7272
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
7373
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
74-
* @return the response.
74+
* @return the {@link Response}.
7575
*/
7676
@ServiceMethod(returns = ReturnType.SINGLE)
7777
Response<Void> deleteWithResponse(
@@ -101,7 +101,7 @@ Response<Void> deleteWithResponse(
101101
* @throws IllegalArgumentException thrown if parameters fail the validation.
102102
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
103103
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
104-
* @return information about the specified application.
104+
* @return information about the specified application along with {@link Response}.
105105
*/
106106
@ServiceMethod(returns = ReturnType.SINGLE)
107107
Response<ApplicationInner> getWithResponse(
@@ -134,7 +134,7 @@ ApplicationInner update(
134134
* @throws IllegalArgumentException thrown if parameters fail the validation.
135135
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
136136
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
137-
* @return contains information about an application in a Batch account.
137+
* @return contains information about an application in a Batch account along with {@link Response}.
138138
*/
139139
@ServiceMethod(returns = ReturnType.SINGLE)
140140
Response<ApplicationInner> updateWithResponse(
@@ -152,7 +152,7 @@ Response<ApplicationInner> updateWithResponse(
152152
* @throws IllegalArgumentException thrown if parameters fail the validation.
153153
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
154154
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
155-
* @return the result of performing list applications.
155+
* @return the result of performing list applications as paginated response with {@link PagedIterable}.
156156
*/
157157
@ServiceMethod(returns = ReturnType.COLLECTION)
158158
PagedIterable<ApplicationInner> list(String resourceGroupName, String accountName);
@@ -167,7 +167,7 @@ Response<ApplicationInner> updateWithResponse(
167167
* @throws IllegalArgumentException thrown if parameters fail the validation.
168168
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
169169
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
170-
* @return the result of performing list applications.
170+
* @return the result of performing list applications as paginated response with {@link PagedIterable}.
171171
*/
172172
@ServiceMethod(returns = ReturnType.COLLECTION)
173173
PagedIterable<ApplicationInner> list(

0 commit comments

Comments
 (0)