Skip to content

Commit 1b22128

Browse files
author
SDKAuto
committed
CodeGen from PR 19589 in Azure/azure-rest-api-specs
Merge a22c5754ab0bbb26473710a3586c130fa7d97cba into f4e7a1c99eff175286c3313ec875f79e4142ac1a
1 parent 4e1a0ff commit 1b22128

File tree

110 files changed

+1535
-1007
lines changed

Some content is hidden

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

110 files changed

+1535
-1007
lines changed

sdk/batch/azure-resourcemanager-batch/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.1.0-beta.1 (Unreleased)
3+
## 1.0.0-beta.1 (2022-07-22)
4+
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-06. 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/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. 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).
5+
This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2022-06. 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</version>
35+
<version>1.1.0-beta.1</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

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

Lines changed: 97 additions & 69 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. Batch Client. Package tag package-2022-01.</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-06.</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: 81 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
import com.azure.core.http.HttpPipelineBuilder;
1111
import com.azure.core.http.HttpPipelinePosition;
1212
import com.azure.core.http.policy.AddDatePolicy;
13+
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
1314
import com.azure.core.http.policy.HttpLogOptions;
1415
import com.azure.core.http.policy.HttpLoggingPolicy;
1516
import com.azure.core.http.policy.HttpPipelinePolicy;
1617
import com.azure.core.http.policy.HttpPolicyProviders;
1718
import com.azure.core.http.policy.RequestIdPolicy;
19+
import com.azure.core.http.policy.RetryOptions;
1820
import com.azure.core.http.policy.RetryPolicy;
1921
import com.azure.core.http.policy.UserAgentPolicy;
2022
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
@@ -95,6 +97,19 @@ public static BatchManager authenticate(TokenCredential credential, AzureProfile
9597
return configure().authenticate(credential, profile);
9698
}
9799

100+
/**
101+
* Creates an instance of Batch service API entry point.
102+
*
103+
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
104+
* @param profile the Azure profile for client.
105+
* @return the Batch service API instance.
106+
*/
107+
public static BatchManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
108+
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
109+
Objects.requireNonNull(profile, "'profile' cannot be null.");
110+
return new BatchManager(httpPipeline, profile, null);
111+
}
112+
98113
/**
99114
* Gets a Configurable instance that can be used to create BatchManager with optional configuration.
100115
*
@@ -113,6 +128,7 @@ public static final class Configurable {
113128
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
114129
private final List<String> scopes = new ArrayList<>();
115130
private RetryPolicy retryPolicy;
131+
private RetryOptions retryOptions;
116132
private Duration defaultPollInterval;
117133

118134
private Configurable() {
@@ -173,6 +189,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
173189
return this;
174190
}
175191

192+
/**
193+
* Sets the retry options for the HTTP pipeline retry policy.
194+
*
195+
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
196+
*
197+
* @param retryOptions the retry options for the HTTP pipeline retry policy.
198+
* @return the configurable object itself.
199+
*/
200+
public Configurable withRetryOptions(RetryOptions retryOptions) {
201+
this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
202+
return this;
203+
}
204+
176205
/**
177206
* Sets the default poll interval, used when service does not provide "Retry-After" header.
178207
*
@@ -206,7 +235,7 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
206235
.append("-")
207236
.append("com.azure.resourcemanager.batch")
208237
.append("/")
209-
.append("1.0.0-beta.3");
238+
.append("1.0.0-beta.1");
210239
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
211240
userAgentBuilder
212241
.append(" (")
@@ -224,10 +253,15 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
224253
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
225254
}
226255
if (retryPolicy == null) {
227-
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
256+
if (retryOptions != null) {
257+
retryPolicy = new RetryPolicy(retryOptions);
258+
} else {
259+
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
260+
}
228261
}
229262
List<HttpPipelinePolicy> policies = new ArrayList<>();
230263
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
264+
policies.add(new AddHeadersFromContextPolicy());
231265
policies.add(new RequestIdPolicy());
232266
policies
233267
.addAll(
@@ -258,63 +292,95 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
258292
}
259293
}
260294

261-
/** @return Resource collection API of BatchAccounts. */
295+
/**
296+
* Gets the resource collection API of BatchAccounts. It manages BatchAccount.
297+
*
298+
* @return Resource collection API of BatchAccounts.
299+
*/
262300
public BatchAccounts batchAccounts() {
263301
if (this.batchAccounts == null) {
264302
this.batchAccounts = new BatchAccountsImpl(clientObject.getBatchAccounts(), this);
265303
}
266304
return batchAccounts;
267305
}
268306

269-
/** @return Resource collection API of ApplicationPackages. */
307+
/**
308+
* Gets the resource collection API of ApplicationPackages. It manages ApplicationPackage.
309+
*
310+
* @return Resource collection API of ApplicationPackages.
311+
*/
270312
public ApplicationPackages applicationPackages() {
271313
if (this.applicationPackages == null) {
272314
this.applicationPackages = new ApplicationPackagesImpl(clientObject.getApplicationPackages(), this);
273315
}
274316
return applicationPackages;
275317
}
276318

277-
/** @return Resource collection API of Applications. */
319+
/**
320+
* Gets the resource collection API of Applications. It manages Application.
321+
*
322+
* @return Resource collection API of Applications.
323+
*/
278324
public Applications applications() {
279325
if (this.applications == null) {
280326
this.applications = new ApplicationsImpl(clientObject.getApplications(), this);
281327
}
282328
return applications;
283329
}
284330

285-
/** @return Resource collection API of Locations. */
331+
/**
332+
* Gets the resource collection API of Locations.
333+
*
334+
* @return Resource collection API of Locations.
335+
*/
286336
public Locations locations() {
287337
if (this.locations == null) {
288338
this.locations = new LocationsImpl(clientObject.getLocations(), this);
289339
}
290340
return locations;
291341
}
292342

293-
/** @return Resource collection API of Operations. */
343+
/**
344+
* Gets the resource collection API of Operations.
345+
*
346+
* @return Resource collection API of Operations.
347+
*/
294348
public Operations operations() {
295349
if (this.operations == null) {
296350
this.operations = new OperationsImpl(clientObject.getOperations(), this);
297351
}
298352
return operations;
299353
}
300354

301-
/** @return Resource collection API of Certificates. */
355+
/**
356+
* Gets the resource collection API of Certificates. It manages Certificate.
357+
*
358+
* @return Resource collection API of Certificates.
359+
*/
302360
public Certificates certificates() {
303361
if (this.certificates == null) {
304362
this.certificates = new CertificatesImpl(clientObject.getCertificates(), this);
305363
}
306364
return certificates;
307365
}
308366

309-
/** @return Resource collection API of PrivateLinkResources. */
367+
/**
368+
* Gets the resource collection API of PrivateLinkResources.
369+
*
370+
* @return Resource collection API of PrivateLinkResources.
371+
*/
310372
public PrivateLinkResources privateLinkResources() {
311373
if (this.privateLinkResources == null) {
312374
this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
313375
}
314376
return privateLinkResources;
315377
}
316378

317-
/** @return Resource collection API of PrivateEndpointConnections. */
379+
/**
380+
* Gets the resource collection API of PrivateEndpointConnections.
381+
*
382+
* @return Resource collection API of PrivateEndpointConnections.
383+
*/
318384
public PrivateEndpointConnections privateEndpointConnections() {
319385
if (this.privateEndpointConnections == null) {
320386
this.privateEndpointConnections =
@@ -323,7 +389,11 @@ public PrivateEndpointConnections privateEndpointConnections() {
323389
return privateEndpointConnections;
324390
}
325391

326-
/** @return Resource collection API of Pools. */
392+
/**
393+
* Gets the resource collection API of Pools. It manages Pool.
394+
*
395+
* @return Resource collection API of Pools.
396+
*/
327397
public Pools pools() {
328398
if (this.pools == null) {
329399
this.pools = new PoolsImpl(clientObject.getPools(), this);

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

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,4 +197,66 @@ PrivateEndpointConnectionInner update(
197197
PrivateEndpointConnectionInner parameters,
198198
String ifMatch,
199199
Context context);
200+
201+
/**
202+
* Deletes the specified private endpoint connection.
203+
*
204+
* @param resourceGroupName The name of the resource group that contains the Batch account.
205+
* @param accountName The name of the Batch account.
206+
* @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the
207+
* account.
208+
* @throws IllegalArgumentException thrown if parameters fail the validation.
209+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
210+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
211+
* @return the {@link SyncPoller} for polling of long-running operation.
212+
*/
213+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
214+
SyncPoller<PollResult<Void>, Void> beginDelete(
215+
String resourceGroupName, String accountName, String privateEndpointConnectionName);
216+
217+
/**
218+
* Deletes the specified private endpoint connection.
219+
*
220+
* @param resourceGroupName The name of the resource group that contains the Batch account.
221+
* @param accountName The name of the Batch account.
222+
* @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the
223+
* account.
224+
* @param context The context to associate with this operation.
225+
* @throws IllegalArgumentException thrown if parameters fail the validation.
226+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
227+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
228+
* @return the {@link SyncPoller} for polling of long-running operation.
229+
*/
230+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
231+
SyncPoller<PollResult<Void>, Void> beginDelete(
232+
String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context);
233+
234+
/**
235+
* Deletes the specified private endpoint connection.
236+
*
237+
* @param resourceGroupName The name of the resource group that contains the Batch account.
238+
* @param accountName The name of the Batch account.
239+
* @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the
240+
* account.
241+
* @throws IllegalArgumentException thrown if parameters fail the validation.
242+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
243+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
244+
*/
245+
@ServiceMethod(returns = ReturnType.SINGLE)
246+
void delete(String resourceGroupName, String accountName, String privateEndpointConnectionName);
247+
248+
/**
249+
* Deletes the specified private endpoint connection.
250+
*
251+
* @param resourceGroupName The name of the resource group that contains the Batch account.
252+
* @param accountName The name of the Batch account.
253+
* @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the
254+
* account.
255+
* @param context The context to associate with this operation.
256+
* @throws IllegalArgumentException thrown if parameters fail the validation.
257+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
258+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
259+
*/
260+
@ServiceMethod(returns = ReturnType.SINGLE)
261+
void delete(String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context);
200262
}

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties;
1010
import com.azure.resourcemanager.batch.models.EncryptionProperties;
1111
import com.azure.resourcemanager.batch.models.KeyVaultReference;
12+
import com.azure.resourcemanager.batch.models.NetworkProfile;
1213
import com.azure.resourcemanager.batch.models.PoolAllocationMode;
1314
import com.azure.resourcemanager.batch.models.PublicNetworkAccessType;
1415
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -45,6 +46,13 @@ public final class BatchAccountCreateProperties {
4546
@JsonProperty(value = "publicNetworkAccess")
4647
private PublicNetworkAccessType publicNetworkAccess;
4748

49+
/*
50+
* The network profile only takes effect when publicNetworkAccess is
51+
* enabled.
52+
*/
53+
@JsonProperty(value = "networkProfile")
54+
private NetworkProfile networkProfile;
55+
4856
/*
4957
* Configures how customer data is encrypted inside the Batch account. By
5058
* default, accounts are encrypted using a Microsoft managed key. For
@@ -145,6 +153,26 @@ public BatchAccountCreateProperties withPublicNetworkAccess(PublicNetworkAccessT
145153
return this;
146154
}
147155

156+
/**
157+
* Get the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled.
158+
*
159+
* @return the networkProfile value.
160+
*/
161+
public NetworkProfile networkProfile() {
162+
return this.networkProfile;
163+
}
164+
165+
/**
166+
* Set the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled.
167+
*
168+
* @param networkProfile the networkProfile value to set.
169+
* @return the BatchAccountCreateProperties object itself.
170+
*/
171+
public BatchAccountCreateProperties withNetworkProfile(NetworkProfile networkProfile) {
172+
this.networkProfile = networkProfile;
173+
return this;
174+
}
175+
148176
/**
149177
* Get the encryption property: Configures how customer data is encrypted inside the Batch account. By default,
150178
* accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used
@@ -204,6 +232,9 @@ public void validate() {
204232
if (keyVaultReference() != null) {
205233
keyVaultReference().validate();
206234
}
235+
if (networkProfile() != null) {
236+
networkProfile().validate();
237+
}
207238
if (encryption() != null) {
208239
encryption().validate();
209240
}

0 commit comments

Comments
 (0)