Skip to content

Commit 5aba7c7

Browse files
author
SDKAuto
committed
CodeGen from PR 22622 in Azure/azure-rest-api-specs
Merge ffdb0a2d72b7f2c747d28c4f0b701535b97c1f33 into a60468a0c5e2beb054680ae488fb9f92699f0a0d
1 parent ddbad59 commit 5aba7c7

File tree

86 files changed

+142
-4066
lines changed

Some content is hidden

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

86 files changed

+142
-4066
lines changed

sdk/reservations/azure-resourcemanager-reservations/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 (2023-03-01)
4+
5+
- Azure Resource Manager reservations client library for Java. This package contains Microsoft Azure SDK for reservations Management SDK. This API describe Azure Reservation. Package tag package-2022-11. 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/reservations/azure-resourcemanager-reservations/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-reservations</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/reservations/azure-resourcemanager-reservations/pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
~ Copyright (c) Microsoft Corporation. All rights reserved.
3+
~ Licensed under the MIT License.
4+
~ Code generated by Microsoft (R) AutoRest Code Generator.
5+
-->
16
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
27
<modelVersion>4.0.0</modelVersion>
38
<parent>
@@ -38,7 +43,8 @@
3843
</developers>
3944
<properties>
4045
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41-
<jacoco.skip>true</jacoco.skip>
46+
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
47+
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
4248
</properties>
4349
<dependencies>
4450
<dependency>

sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/ReturnsClient.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.azure.core.management.polling.PollResult;
1010
import com.azure.core.util.Context;
1111
import com.azure.core.util.polling.SyncPoller;
12-
import com.azure.resourcemanager.reservations.fluent.models.RefundResponseInner;
12+
import com.azure.resourcemanager.reservations.fluent.models.ReservationOrderResponseInner;
1313
import com.azure.resourcemanager.reservations.models.RefundRequest;
1414

1515
/** An instance of this class provides access to all the operations defined in ReturnsClient. */
@@ -24,11 +24,10 @@ public interface ReturnsClient {
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 the {@link SyncPoller} for polling of the response of refund request containing refund information of
28-
* reservation.
27+
* @return the {@link SyncPoller} for polling of details of a reservation order being returned.
2928
*/
3029
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
31-
SyncPoller<PollResult<RefundResponseInner>, RefundResponseInner> beginPost(
30+
SyncPoller<PollResult<ReservationOrderResponseInner>, ReservationOrderResponseInner> beginPost(
3231
String reservationOrderId, RefundRequest body);
3332

3433
/**
@@ -42,11 +41,10 @@ SyncPoller<PollResult<RefundResponseInner>, RefundResponseInner> beginPost(
4241
* @throws IllegalArgumentException thrown if parameters fail the validation.
4342
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4443
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
45-
* @return the {@link SyncPoller} for polling of the response of refund request containing refund information of
46-
* reservation.
44+
* @return the {@link SyncPoller} for polling of details of a reservation order being returned.
4745
*/
4846
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
49-
SyncPoller<PollResult<RefundResponseInner>, RefundResponseInner> beginPost(
47+
SyncPoller<PollResult<ReservationOrderResponseInner>, ReservationOrderResponseInner> beginPost(
5048
String reservationOrderId, RefundRequest body, Context context);
5149

5250
/**
@@ -59,10 +57,10 @@ SyncPoller<PollResult<RefundResponseInner>, RefundResponseInner> beginPost(
5957
* @throws IllegalArgumentException thrown if parameters fail the validation.
6058
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
6159
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
62-
* @return the response of refund request containing refund information of reservation.
60+
* @return details of a reservation order being returned.
6361
*/
6462
@ServiceMethod(returns = ReturnType.SINGLE)
65-
RefundResponseInner post(String reservationOrderId, RefundRequest body);
63+
ReservationOrderResponseInner post(String reservationOrderId, RefundRequest body);
6664

6765
/**
6866
* Return a reservation.
@@ -75,8 +73,8 @@ SyncPoller<PollResult<RefundResponseInner>, RefundResponseInner> beginPost(
7573
* @throws IllegalArgumentException thrown if parameters fail the validation.
7674
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
7775
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
78-
* @return the response of refund request containing refund information of reservation.
76+
* @return details of a reservation order being returned.
7977
*/
8078
@ServiceMethod(returns = ReturnType.SINGLE)
81-
RefundResponseInner post(String reservationOrderId, RefundRequest body, Context context);
79+
ReservationOrderResponseInner post(String reservationOrderId, RefundRequest body, Context context);
8280
}

sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/models/PatchProperties.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public final class PatchProperties {
2323
private AppliedScopeType appliedScopeType;
2424

2525
/*
26-
* List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.
26+
* List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This
27+
* property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.
2728
*/
2829
@JsonProperty(value = "appliedScopes")
2930
private List<String> appliedScopes;
@@ -92,7 +93,8 @@ public PatchProperties withAppliedScopeType(AppliedScopeType appliedScopeType) {
9293

9394
/**
9495
* Get the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
95-
* AppliedScopeType is Shared.
96+
* AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
97+
* Single AppliedScopeType.
9698
*
9799
* @return the appliedScopes value.
98100
*/
@@ -102,7 +104,8 @@ public List<String> appliedScopes() {
102104

103105
/**
104106
* Set the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
105-
* AppliedScopeType is Shared.
107+
* AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
108+
* Single AppliedScopeType.
106109
*
107110
* @param appliedScopes the appliedScopes value to set.
108111
* @return the PatchProperties object itself.

sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/models/PurchaseRequestProperties.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public final class PurchaseRequestProperties {
6161
private AppliedScopeType appliedScopeType;
6262

6363
/*
64-
* List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.
64+
* List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This
65+
* property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.
6566
*/
6667
@JsonProperty(value = "appliedScopes")
6768
private List<String> appliedScopes;
@@ -237,7 +238,8 @@ public PurchaseRequestProperties withAppliedScopeType(AppliedScopeType appliedSc
237238

238239
/**
239240
* Get the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
240-
* AppliedScopeType is Shared.
241+
* AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
242+
* Single AppliedScopeType.
241243
*
242244
* @return the appliedScopes value.
243245
*/
@@ -247,7 +249,8 @@ public List<String> appliedScopes() {
247249

248250
/**
249251
* Set the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
250-
* AppliedScopeType is Shared.
252+
* AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
253+
* Single AppliedScopeType.
251254
*
252255
* @param appliedScopes the appliedScopes value to set.
253256
* @return the PurchaseRequestProperties object itself.

sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/implementation/ReturnsClientImpl.java

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import com.azure.core.util.polling.PollerFlux;
2727
import com.azure.core.util.polling.SyncPoller;
2828
import com.azure.resourcemanager.reservations.fluent.ReturnsClient;
29-
import com.azure.resourcemanager.reservations.fluent.models.RefundResponseInner;
29+
import com.azure.resourcemanager.reservations.fluent.models.ReservationOrderResponseInner;
3030
import com.azure.resourcemanager.reservations.models.RefundRequest;
3131
import java.nio.ByteBuffer;
3232
import reactor.core.publisher.Flux;
@@ -59,7 +59,7 @@ public final class ReturnsClientImpl implements ReturnsClient {
5959
public interface ReturnsService {
6060
@Headers({"Content-Type: application/json"})
6161
@Post("/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/return")
62-
@ExpectedResponses({202})
62+
@ExpectedResponses({200, 202})
6363
@UnexpectedResponseExceptionType(ManagementException.class)
6464
Mono<Response<Flux<ByteBuffer>>> post(
6565
@HostParam("$host") String endpoint,
@@ -80,8 +80,8 @@ Mono<Response<Flux<ByteBuffer>>> post(
8080
* @throws IllegalArgumentException thrown if parameters fail the validation.
8181
* @throws ManagementException thrown if the request is rejected by server.
8282
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
83-
* @return the response of refund request containing refund information of reservation along with {@link Response}
84-
* on successful completion of {@link Mono}.
83+
* @return details of a reservation order being returned along with {@link Response} on successful completion of
84+
* {@link Mono}.
8585
*/
8686
@ServiceMethod(returns = ReturnType.SINGLE)
8787
private Mono<Response<Flux<ByteBuffer>>> postWithResponseAsync(String reservationOrderId, RefundRequest body) {
@@ -120,8 +120,8 @@ private Mono<Response<Flux<ByteBuffer>>> postWithResponseAsync(String reservatio
120120
* @throws IllegalArgumentException thrown if parameters fail the validation.
121121
* @throws ManagementException thrown if the request is rejected by server.
122122
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
123-
* @return the response of refund request containing refund information of reservation along with {@link Response}
124-
* on successful completion of {@link Mono}.
123+
* @return details of a reservation order being returned along with {@link Response} on successful completion of
124+
* {@link Mono}.
125125
*/
126126
@ServiceMethod(returns = ReturnType.SINGLE)
127127
private Mono<Response<Flux<ByteBuffer>>> postWithResponseAsync(
@@ -157,20 +157,19 @@ private Mono<Response<Flux<ByteBuffer>>> postWithResponseAsync(
157157
* @throws IllegalArgumentException thrown if parameters fail the validation.
158158
* @throws ManagementException thrown if the request is rejected by server.
159159
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
160-
* @return the {@link PollerFlux} for polling of the response of refund request containing refund information of
161-
* reservation.
160+
* @return the {@link PollerFlux} for polling of details of a reservation order being returned.
162161
*/
163162
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
164-
private PollerFlux<PollResult<RefundResponseInner>, RefundResponseInner> beginPostAsync(
163+
private PollerFlux<PollResult<ReservationOrderResponseInner>, ReservationOrderResponseInner> beginPostAsync(
165164
String reservationOrderId, RefundRequest body) {
166165
Mono<Response<Flux<ByteBuffer>>> mono = postWithResponseAsync(reservationOrderId, body);
167166
return this
168167
.client
169-
.<RefundResponseInner, RefundResponseInner>getLroResult(
168+
.<ReservationOrderResponseInner, ReservationOrderResponseInner>getLroResult(
170169
mono,
171170
this.client.getHttpPipeline(),
172-
RefundResponseInner.class,
173-
RefundResponseInner.class,
171+
ReservationOrderResponseInner.class,
172+
ReservationOrderResponseInner.class,
174173
this.client.getContext());
175174
}
176175

@@ -185,18 +184,21 @@ private PollerFlux<PollResult<RefundResponseInner>, RefundResponseInner> beginPo
185184
* @throws IllegalArgumentException thrown if parameters fail the validation.
186185
* @throws ManagementException thrown if the request is rejected by server.
187186
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
188-
* @return the {@link PollerFlux} for polling of the response of refund request containing refund information of
189-
* reservation.
187+
* @return the {@link PollerFlux} for polling of details of a reservation order being returned.
190188
*/
191189
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
192-
private PollerFlux<PollResult<RefundResponseInner>, RefundResponseInner> beginPostAsync(
190+
private PollerFlux<PollResult<ReservationOrderResponseInner>, ReservationOrderResponseInner> beginPostAsync(
193191
String reservationOrderId, RefundRequest body, Context context) {
194192
context = this.client.mergeContext(context);
195193
Mono<Response<Flux<ByteBuffer>>> mono = postWithResponseAsync(reservationOrderId, body, context);
196194
return this
197195
.client
198-
.<RefundResponseInner, RefundResponseInner>getLroResult(
199-
mono, this.client.getHttpPipeline(), RefundResponseInner.class, RefundResponseInner.class, context);
196+
.<ReservationOrderResponseInner, ReservationOrderResponseInner>getLroResult(
197+
mono,
198+
this.client.getHttpPipeline(),
199+
ReservationOrderResponseInner.class,
200+
ReservationOrderResponseInner.class,
201+
context);
200202
}
201203

202204
/**
@@ -209,11 +211,10 @@ private PollerFlux<PollResult<RefundResponseInner>, RefundResponseInner> beginPo
209211
* @throws IllegalArgumentException thrown if parameters fail the validation.
210212
* @throws ManagementException thrown if the request is rejected by server.
211213
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
212-
* @return the {@link SyncPoller} for polling of the response of refund request containing refund information of
213-
* reservation.
214+
* @return the {@link SyncPoller} for polling of details of a reservation order being returned.
214215
*/
215216
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
216-
public SyncPoller<PollResult<RefundResponseInner>, RefundResponseInner> beginPost(
217+
public SyncPoller<PollResult<ReservationOrderResponseInner>, ReservationOrderResponseInner> beginPost(
217218
String reservationOrderId, RefundRequest body) {
218219
return this.beginPostAsync(reservationOrderId, body).getSyncPoller();
219220
}
@@ -229,11 +230,10 @@ public SyncPoller<PollResult<RefundResponseInner>, RefundResponseInner> beginPos
229230
* @throws IllegalArgumentException thrown if parameters fail the validation.
230231
* @throws ManagementException thrown if the request is rejected by server.
231232
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
232-
* @return the {@link SyncPoller} for polling of the response of refund request containing refund information of
233-
* reservation.
233+
* @return the {@link SyncPoller} for polling of details of a reservation order being returned.
234234
*/
235235
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
236-
public SyncPoller<PollResult<RefundResponseInner>, RefundResponseInner> beginPost(
236+
public SyncPoller<PollResult<ReservationOrderResponseInner>, ReservationOrderResponseInner> beginPost(
237237
String reservationOrderId, RefundRequest body, Context context) {
238238
return this.beginPostAsync(reservationOrderId, body, context).getSyncPoller();
239239
}
@@ -248,11 +248,10 @@ public SyncPoller<PollResult<RefundResponseInner>, RefundResponseInner> beginPos
248248
* @throws IllegalArgumentException thrown if parameters fail the validation.
249249
* @throws ManagementException thrown if the request is rejected by server.
250250
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
251-
* @return the response of refund request containing refund information of reservation on successful completion of
252-
* {@link Mono}.
251+
* @return details of a reservation order being returned on successful completion of {@link Mono}.
253252
*/
254253
@ServiceMethod(returns = ReturnType.SINGLE)
255-
private Mono<RefundResponseInner> postAsync(String reservationOrderId, RefundRequest body) {
254+
private Mono<ReservationOrderResponseInner> postAsync(String reservationOrderId, RefundRequest body) {
256255
return beginPostAsync(reservationOrderId, body).last().flatMap(this.client::getLroFinalResultOrError);
257256
}
258257

@@ -267,11 +266,11 @@ private Mono<RefundResponseInner> postAsync(String reservationOrderId, RefundReq
267266
* @throws IllegalArgumentException thrown if parameters fail the validation.
268267
* @throws ManagementException thrown if the request is rejected by server.
269268
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
270-
* @return the response of refund request containing refund information of reservation on successful completion of
271-
* {@link Mono}.
269+
* @return details of a reservation order being returned on successful completion of {@link Mono}.
272270
*/
273271
@ServiceMethod(returns = ReturnType.SINGLE)
274-
private Mono<RefundResponseInner> postAsync(String reservationOrderId, RefundRequest body, Context context) {
272+
private Mono<ReservationOrderResponseInner> postAsync(
273+
String reservationOrderId, RefundRequest body, Context context) {
275274
return beginPostAsync(reservationOrderId, body, context).last().flatMap(this.client::getLroFinalResultOrError);
276275
}
277276

@@ -285,10 +284,10 @@ private Mono<RefundResponseInner> postAsync(String reservationOrderId, RefundReq
285284
* @throws IllegalArgumentException thrown if parameters fail the validation.
286285
* @throws ManagementException thrown if the request is rejected by server.
287286
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
288-
* @return the response of refund request containing refund information of reservation.
287+
* @return details of a reservation order being returned.
289288
*/
290289
@ServiceMethod(returns = ReturnType.SINGLE)
291-
public RefundResponseInner post(String reservationOrderId, RefundRequest body) {
290+
public ReservationOrderResponseInner post(String reservationOrderId, RefundRequest body) {
292291
return postAsync(reservationOrderId, body).block();
293292
}
294293

@@ -303,10 +302,10 @@ public RefundResponseInner post(String reservationOrderId, RefundRequest body) {
303302
* @throws IllegalArgumentException thrown if parameters fail the validation.
304303
* @throws ManagementException thrown if the request is rejected by server.
305304
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
306-
* @return the response of refund request containing refund information of reservation.
305+
* @return details of a reservation order being returned.
307306
*/
308307
@ServiceMethod(returns = ReturnType.SINGLE)
309-
public RefundResponseInner post(String reservationOrderId, RefundRequest body, Context context) {
308+
public ReservationOrderResponseInner post(String reservationOrderId, RefundRequest body, Context context) {
310309
return postAsync(reservationOrderId, body, context).block();
311310
}
312311
}

0 commit comments

Comments
 (0)