Skip to content

Commit c3b5ed2

Browse files
author
SDKAuto
committed
CodeGen from PR 18996 in Azure/azure-rest-api-specs
Merge 2a781ad77e4b5072d3c6a1f5ba5462f9539fb989 into ac286e05bedd69d301e1dc94ec70f66e8536686b
1 parent f5adfe2 commit c3b5ed2

File tree

248 files changed

+2161
-1240
lines changed

Some content is hidden

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

248 files changed

+2161
-1240
lines changed

sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/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.2 (Unreleased)
3+
## 1.0.0-beta.1 (2022-05-11)
4+
5+
- Azure Resource Manager DesktopVirtualization client library for Java. This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. Package tag package-preview-2022-02. 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/desktopvirtualization/azure-resourcemanager-desktopvirtualization/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 DesktopVirtualization client library for Java.
44

5-
This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. Package tag package-preview-2021-09. 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 DesktopVirtualization Management SDK. Package tag package-preview-2022-02. 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-desktopvirtualization</artifactId>
35-
<version>1.0.0-beta.1</version>
35+
<version>1.0.0-beta.2</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

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

Lines changed: 100 additions & 69 deletions
Large diffs are not rendered by default.

sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/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 DesktopVirtualization Management</name>
16-
<description>This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-preview-2021-09.</description>
16+
<description>This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-preview-2022-02.</description>
1717
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

1919
<licenses>

sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/DesktopVirtualizationManager.java

Lines changed: 110 additions & 18 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;
@@ -116,6 +118,19 @@ public static DesktopVirtualizationManager authenticate(TokenCredential credenti
116118
return configure().authenticate(credential, profile);
117119
}
118120

121+
/**
122+
* Creates an instance of DesktopVirtualization service API entry point.
123+
*
124+
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
125+
* @param profile the Azure profile for client.
126+
* @return the DesktopVirtualization service API instance.
127+
*/
128+
public static DesktopVirtualizationManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
129+
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
130+
Objects.requireNonNull(profile, "'profile' cannot be null.");
131+
return new DesktopVirtualizationManager(httpPipeline, profile, null);
132+
}
133+
119134
/**
120135
* Gets a Configurable instance that can be used to create DesktopVirtualizationManager with optional configuration.
121136
*
@@ -127,13 +142,14 @@ public static Configurable configure() {
127142

128143
/** The Configurable allowing configurations to be set. */
129144
public static final class Configurable {
130-
private final ClientLogger logger = new ClientLogger(Configurable.class);
145+
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
131146

132147
private HttpClient httpClient;
133148
private HttpLogOptions httpLogOptions;
134149
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
135150
private final List<String> scopes = new ArrayList<>();
136151
private RetryPolicy retryPolicy;
152+
private RetryOptions retryOptions;
137153
private Duration defaultPollInterval;
138154

139155
private Configurable() {
@@ -194,16 +210,31 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
194210
return this;
195211
}
196212

213+
/**
214+
* Sets the retry options for the HTTP pipeline retry policy.
215+
*
216+
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
217+
*
218+
* @param retryOptions the retry options for the HTTP pipeline retry policy.
219+
* @return the configurable object itself.
220+
*/
221+
public Configurable withRetryOptions(RetryOptions retryOptions) {
222+
this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
223+
return this;
224+
}
225+
197226
/**
198227
* Sets the default poll interval, used when service does not provide "Retry-After" header.
199228
*
200229
* @param defaultPollInterval the default poll interval.
201230
* @return the configurable object itself.
202231
*/
203232
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
204-
this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
233+
this.defaultPollInterval =
234+
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
205235
if (this.defaultPollInterval.isNegative()) {
206-
throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
236+
throw LOGGER
237+
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
207238
}
208239
return this;
209240
}
@@ -243,10 +274,15 @@ public DesktopVirtualizationManager authenticate(TokenCredential credential, Azu
243274
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
244275
}
245276
if (retryPolicy == null) {
246-
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
277+
if (retryOptions != null) {
278+
retryPolicy = new RetryPolicy(retryOptions);
279+
} else {
280+
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
281+
}
247282
}
248283
List<HttpPipelinePolicy> policies = new ArrayList<>();
249284
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
285+
policies.add(new AddHeadersFromContextPolicy());
250286
policies.add(new RequestIdPolicy());
251287
policies
252288
.addAll(
@@ -277,103 +313,155 @@ public DesktopVirtualizationManager authenticate(TokenCredential credential, Azu
277313
}
278314
}
279315

280-
/** @return Resource collection API of Operations. */
316+
/**
317+
* Gets the resource collection API of Operations.
318+
*
319+
* @return Resource collection API of Operations.
320+
*/
281321
public Operations operations() {
282322
if (this.operations == null) {
283323
this.operations = new OperationsImpl(clientObject.getOperations(), this);
284324
}
285325
return operations;
286326
}
287327

288-
/** @return Resource collection API of Workspaces. */
328+
/**
329+
* Gets the resource collection API of Workspaces.
330+
*
331+
* @return Resource collection API of Workspaces.
332+
*/
289333
public Workspaces workspaces() {
290334
if (this.workspaces == null) {
291335
this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this);
292336
}
293337
return workspaces;
294338
}
295339

296-
/** @return Resource collection API of ScalingPlans. */
340+
/**
341+
* Gets the resource collection API of ScalingPlans.
342+
*
343+
* @return Resource collection API of ScalingPlans.
344+
*/
297345
public ScalingPlans scalingPlans() {
298346
if (this.scalingPlans == null) {
299347
this.scalingPlans = new ScalingPlansImpl(clientObject.getScalingPlans(), this);
300348
}
301349
return scalingPlans;
302350
}
303351

304-
/** @return Resource collection API of ApplicationGroups. */
352+
/**
353+
* Gets the resource collection API of ApplicationGroups.
354+
*
355+
* @return Resource collection API of ApplicationGroups.
356+
*/
305357
public ApplicationGroups applicationGroups() {
306358
if (this.applicationGroups == null) {
307359
this.applicationGroups = new ApplicationGroupsImpl(clientObject.getApplicationGroups(), this);
308360
}
309361
return applicationGroups;
310362
}
311363

312-
/** @return Resource collection API of StartMenuItems. */
364+
/**
365+
* Gets the resource collection API of StartMenuItems.
366+
*
367+
* @return Resource collection API of StartMenuItems.
368+
*/
313369
public StartMenuItems startMenuItems() {
314370
if (this.startMenuItems == null) {
315371
this.startMenuItems = new StartMenuItemsImpl(clientObject.getStartMenuItems(), this);
316372
}
317373
return startMenuItems;
318374
}
319375

320-
/** @return Resource collection API of Applications. */
376+
/**
377+
* Gets the resource collection API of Applications.
378+
*
379+
* @return Resource collection API of Applications.
380+
*/
321381
public Applications applications() {
322382
if (this.applications == null) {
323383
this.applications = new ApplicationsImpl(clientObject.getApplications(), this);
324384
}
325385
return applications;
326386
}
327387

328-
/** @return Resource collection API of Desktops. */
388+
/**
389+
* Gets the resource collection API of Desktops.
390+
*
391+
* @return Resource collection API of Desktops.
392+
*/
329393
public Desktops desktops() {
330394
if (this.desktops == null) {
331395
this.desktops = new DesktopsImpl(clientObject.getDesktops(), this);
332396
}
333397
return desktops;
334398
}
335399

336-
/** @return Resource collection API of HostPools. */
400+
/**
401+
* Gets the resource collection API of HostPools.
402+
*
403+
* @return Resource collection API of HostPools.
404+
*/
337405
public HostPools hostPools() {
338406
if (this.hostPools == null) {
339407
this.hostPools = new HostPoolsImpl(clientObject.getHostPools(), this);
340408
}
341409
return hostPools;
342410
}
343411

344-
/** @return Resource collection API of UserSessions. */
412+
/**
413+
* Gets the resource collection API of UserSessions.
414+
*
415+
* @return Resource collection API of UserSessions.
416+
*/
345417
public UserSessions userSessions() {
346418
if (this.userSessions == null) {
347419
this.userSessions = new UserSessionsImpl(clientObject.getUserSessions(), this);
348420
}
349421
return userSessions;
350422
}
351423

352-
/** @return Resource collection API of SessionHosts. */
424+
/**
425+
* Gets the resource collection API of SessionHosts.
426+
*
427+
* @return Resource collection API of SessionHosts.
428+
*/
353429
public SessionHosts sessionHosts() {
354430
if (this.sessionHosts == null) {
355431
this.sessionHosts = new SessionHostsImpl(clientObject.getSessionHosts(), this);
356432
}
357433
return sessionHosts;
358434
}
359435

360-
/** @return Resource collection API of MsixPackages. */
436+
/**
437+
* Gets the resource collection API of MsixPackages.
438+
*
439+
* @return Resource collection API of MsixPackages.
440+
*/
361441
public MsixPackages msixPackages() {
362442
if (this.msixPackages == null) {
363443
this.msixPackages = new MsixPackagesImpl(clientObject.getMsixPackages(), this);
364444
}
365445
return msixPackages;
366446
}
367447

368-
/** @return Resource collection API of MsixImages. */
448+
/**
449+
* Gets the resource collection API of MsixImages.
450+
*
451+
* @return Resource collection API of MsixImages.
452+
*/
369453
public MsixImages msixImages() {
370454
if (this.msixImages == null) {
371455
this.msixImages = new MsixImagesImpl(clientObject.getMsixImages(), this);
372456
}
373457
return msixImages;
374458
}
375459

376-
/** @return Resource collection API of PrivateEndpointConnections. */
460+
/**
461+
* Gets the resource collection API of PrivateEndpointConnections.
462+
*
463+
* @return Resource collection API of PrivateEndpointConnections.
464+
*/
377465
public PrivateEndpointConnections privateEndpointConnections() {
378466
if (this.privateEndpointConnections == null) {
379467
this.privateEndpointConnections =
@@ -382,7 +470,11 @@ public PrivateEndpointConnections privateEndpointConnections() {
382470
return privateEndpointConnections;
383471
}
384472

385-
/** @return Resource collection API of PrivateLinkResources. */
473+
/**
474+
* Gets the resource collection API of PrivateLinkResources.
475+
*
476+
* @return Resource collection API of PrivateLinkResources.
477+
*/
386478
public PrivateLinkResources privateLinkResources() {
387479
if (this.privateLinkResources == null) {
388480
this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);

sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationGroupsClient.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public interface ApplicationGroupsClient {
3636
* @throws IllegalArgumentException thrown if parameters fail the validation.
3737
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3838
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
39-
* @return an application group.
39+
* @return an application group along with {@link Response}.
4040
*/
4141
@ServiceMethod(returns = ReturnType.SINGLE)
4242
Response<ApplicationGroupInner> getByResourceGroupWithResponse(
@@ -67,7 +67,7 @@ ApplicationGroupInner createOrUpdate(
6767
* @throws IllegalArgumentException thrown if parameters fail the validation.
6868
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
6969
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
70-
* @return represents a ApplicationGroup definition.
70+
* @return represents a ApplicationGroup definition along with {@link Response}.
7171
*/
7272
@ServiceMethod(returns = ReturnType.SINGLE)
7373
Response<ApplicationGroupInner> createOrUpdateWithResponse(
@@ -94,7 +94,7 @@ Response<ApplicationGroupInner> createOrUpdateWithResponse(
9494
* @throws IllegalArgumentException thrown if parameters fail the validation.
9595
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
9696
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
97-
* @return the response.
97+
* @return the {@link Response}.
9898
*/
9999
@ServiceMethod(returns = ReturnType.SINGLE)
100100
Response<Void> deleteWithResponse(String resourceGroupName, String applicationGroupName, Context context);
@@ -122,7 +122,7 @@ Response<ApplicationGroupInner> createOrUpdateWithResponse(
122122
* @throws IllegalArgumentException thrown if parameters fail the validation.
123123
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
124124
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
125-
* @return represents a ApplicationGroup definition.
125+
* @return represents a ApplicationGroup definition along with {@link Response}.
126126
*/
127127
@ServiceMethod(returns = ReturnType.SINGLE)
128128
Response<ApplicationGroupInner> updateWithResponse(
@@ -135,7 +135,7 @@ Response<ApplicationGroupInner> updateWithResponse(
135135
* @throws IllegalArgumentException thrown if parameters fail the validation.
136136
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
137137
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
138-
* @return applicationGroupList.
138+
* @return applicationGroupList as paginated response with {@link PagedIterable}.
139139
*/
140140
@ServiceMethod(returns = ReturnType.COLLECTION)
141141
PagedIterable<ApplicationGroupInner> listByResourceGroup(String resourceGroupName);
@@ -149,7 +149,7 @@ Response<ApplicationGroupInner> updateWithResponse(
149149
* @throws IllegalArgumentException thrown if parameters fail the validation.
150150
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
151151
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
152-
* @return applicationGroupList.
152+
* @return applicationGroupList as paginated response with {@link PagedIterable}.
153153
*/
154154
@ServiceMethod(returns = ReturnType.COLLECTION)
155155
PagedIterable<ApplicationGroupInner> listByResourceGroup(String resourceGroupName, String filter, Context context);
@@ -159,7 +159,7 @@ Response<ApplicationGroupInner> updateWithResponse(
159159
*
160160
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
161161
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
162-
* @return applicationGroupList.
162+
* @return applicationGroupList as paginated response with {@link PagedIterable}.
163163
*/
164164
@ServiceMethod(returns = ReturnType.COLLECTION)
165165
PagedIterable<ApplicationGroupInner> list();
@@ -172,7 +172,7 @@ Response<ApplicationGroupInner> updateWithResponse(
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 applicationGroupList.
175+
* @return applicationGroupList as paginated response with {@link PagedIterable}.
176176
*/
177177
@ServiceMethod(returns = ReturnType.COLLECTION)
178178
PagedIterable<ApplicationGroupInner> list(String filter, Context context);

0 commit comments

Comments
 (0)