diff --git a/sdk/reservations/azure-resourcemanager-reservations/CHANGELOG.md b/sdk/reservations/azure-resourcemanager-reservations/CHANGELOG.md
index 2ab0d27c7dc8..528cbf0a2ee4 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/CHANGELOG.md
+++ b/sdk/reservations/azure-resourcemanager-reservations/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2023-03-01)
+
+- 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).
### Features Added
diff --git a/sdk/reservations/azure-resourcemanager-reservations/README.md b/sdk/reservations/azure-resourcemanager-reservations/README.md
index d8356602e28f..80ac9a4845e9 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/README.md
+++ b/sdk/reservations/azure-resourcemanager-reservations/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-reservations
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
diff --git a/sdk/reservations/azure-resourcemanager-reservations/pom.xml b/sdk/reservations/azure-resourcemanager-reservations/pom.xml
index 626dfb8cf4c2..c33d1cba9da9 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/pom.xml
+++ b/sdk/reservations/azure-resourcemanager-reservations/pom.xml
@@ -1,3 +1,8 @@
+
4.0.0
@@ -38,7 +43,8 @@
UTF-8
- true
+ 0
+ 0
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/ReturnsClient.java b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/ReturnsClient.java
index bd3506601b40..42ac6317e6f0 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/ReturnsClient.java
+++ b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/ReturnsClient.java
@@ -9,7 +9,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
-import com.azure.resourcemanager.reservations.fluent.models.RefundResponseInner;
+import com.azure.resourcemanager.reservations.fluent.models.ReservationOrderResponseInner;
import com.azure.resourcemanager.reservations.models.RefundRequest;
/** An instance of this class provides access to all the operations defined in ReturnsClient. */
@@ -24,11 +24,10 @@ public interface ReturnsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of the response of refund request containing refund information of
- * reservation.
+ * @return the {@link SyncPoller} for polling of details of a reservation order being returned.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, RefundResponseInner> beginPost(
+ SyncPoller, ReservationOrderResponseInner> beginPost(
String reservationOrderId, RefundRequest body);
/**
@@ -42,11 +41,10 @@ SyncPoller, RefundResponseInner> beginPost(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of the response of refund request containing refund information of
- * reservation.
+ * @return the {@link SyncPoller} for polling of details of a reservation order being returned.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, RefundResponseInner> beginPost(
+ SyncPoller, ReservationOrderResponseInner> beginPost(
String reservationOrderId, RefundRequest body, Context context);
/**
@@ -59,10 +57,10 @@ SyncPoller, RefundResponseInner> beginPost(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of refund request containing refund information of reservation.
+ * @return details of a reservation order being returned.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- RefundResponseInner post(String reservationOrderId, RefundRequest body);
+ ReservationOrderResponseInner post(String reservationOrderId, RefundRequest body);
/**
* Return a reservation.
@@ -75,8 +73,8 @@ SyncPoller, RefundResponseInner> beginPost(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of refund request containing refund information of reservation.
+ * @return details of a reservation order being returned.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- RefundResponseInner post(String reservationOrderId, RefundRequest body, Context context);
+ ReservationOrderResponseInner post(String reservationOrderId, RefundRequest body, Context context);
}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/models/PatchProperties.java b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/models/PatchProperties.java
index cbebe5aaff01..b8364b308c1b 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/models/PatchProperties.java
+++ b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/models/PatchProperties.java
@@ -23,7 +23,8 @@ public final class PatchProperties {
private AppliedScopeType appliedScopeType;
/*
- * List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.
+ * List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This
+ * property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.
*/
@JsonProperty(value = "appliedScopes")
private List appliedScopes;
@@ -92,7 +93,8 @@ public PatchProperties withAppliedScopeType(AppliedScopeType appliedScopeType) {
/**
* Get the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
- * AppliedScopeType is Shared.
+ * AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
+ * Single AppliedScopeType.
*
* @return the appliedScopes value.
*/
@@ -102,7 +104,8 @@ public List appliedScopes() {
/**
* Set the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
- * AppliedScopeType is Shared.
+ * AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
+ * Single AppliedScopeType.
*
* @param appliedScopes the appliedScopes value to set.
* @return the PatchProperties object itself.
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/models/PurchaseRequestProperties.java b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/models/PurchaseRequestProperties.java
index eba384e25b62..a159cae4c8cd 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/models/PurchaseRequestProperties.java
+++ b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/fluent/models/PurchaseRequestProperties.java
@@ -61,7 +61,8 @@ public final class PurchaseRequestProperties {
private AppliedScopeType appliedScopeType;
/*
- * List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.
+ * List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This
+ * property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.
*/
@JsonProperty(value = "appliedScopes")
private List appliedScopes;
@@ -237,7 +238,8 @@ public PurchaseRequestProperties withAppliedScopeType(AppliedScopeType appliedSc
/**
* Get the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
- * AppliedScopeType is Shared.
+ * AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
+ * Single AppliedScopeType.
*
* @return the appliedScopes value.
*/
@@ -247,7 +249,8 @@ public List appliedScopes() {
/**
* Set the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
- * AppliedScopeType is Shared.
+ * AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
+ * Single AppliedScopeType.
*
* @param appliedScopes the appliedScopes value to set.
* @return the PurchaseRequestProperties object itself.
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/implementation/ReturnsClientImpl.java b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/implementation/ReturnsClientImpl.java
index 7b0ac768c453..903dfe4f897a 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/implementation/ReturnsClientImpl.java
+++ b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/implementation/ReturnsClientImpl.java
@@ -26,7 +26,7 @@
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.reservations.fluent.ReturnsClient;
-import com.azure.resourcemanager.reservations.fluent.models.RefundResponseInner;
+import com.azure.resourcemanager.reservations.fluent.models.ReservationOrderResponseInner;
import com.azure.resourcemanager.reservations.models.RefundRequest;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
@@ -59,7 +59,7 @@ public final class ReturnsClientImpl implements ReturnsClient {
public interface ReturnsService {
@Headers({"Content-Type: application/json"})
@Post("/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/return")
- @ExpectedResponses({202})
+ @ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> post(
@HostParam("$host") String endpoint,
@@ -80,8 +80,8 @@ Mono>> post(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of refund request containing refund information of reservation along with {@link Response}
- * on successful completion of {@link Mono}.
+ * @return details of a reservation order being returned along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> postWithResponseAsync(String reservationOrderId, RefundRequest body) {
@@ -120,8 +120,8 @@ private Mono>> postWithResponseAsync(String reservatio
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of refund request containing refund information of reservation along with {@link Response}
- * on successful completion of {@link Mono}.
+ * @return details of a reservation order being returned along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> postWithResponseAsync(
@@ -157,20 +157,19 @@ private Mono>> postWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of the response of refund request containing refund information of
- * reservation.
+ * @return the {@link PollerFlux} for polling of details of a reservation order being returned.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, RefundResponseInner> beginPostAsync(
+ private PollerFlux, ReservationOrderResponseInner> beginPostAsync(
String reservationOrderId, RefundRequest body) {
Mono>> mono = postWithResponseAsync(reservationOrderId, body);
return this
.client
- .getLroResult(
+ .getLroResult(
mono,
this.client.getHttpPipeline(),
- RefundResponseInner.class,
- RefundResponseInner.class,
+ ReservationOrderResponseInner.class,
+ ReservationOrderResponseInner.class,
this.client.getContext());
}
@@ -185,18 +184,21 @@ private PollerFlux, RefundResponseInner> beginPo
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of the response of refund request containing refund information of
- * reservation.
+ * @return the {@link PollerFlux} for polling of details of a reservation order being returned.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, RefundResponseInner> beginPostAsync(
+ private PollerFlux, ReservationOrderResponseInner> beginPostAsync(
String reservationOrderId, RefundRequest body, Context context) {
context = this.client.mergeContext(context);
Mono>> mono = postWithResponseAsync(reservationOrderId, body, context);
return this
.client
- .getLroResult(
- mono, this.client.getHttpPipeline(), RefundResponseInner.class, RefundResponseInner.class, context);
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ReservationOrderResponseInner.class,
+ ReservationOrderResponseInner.class,
+ context);
}
/**
@@ -209,11 +211,10 @@ private PollerFlux, RefundResponseInner> beginPo
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of the response of refund request containing refund information of
- * reservation.
+ * @return the {@link SyncPoller} for polling of details of a reservation order being returned.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, RefundResponseInner> beginPost(
+ public SyncPoller, ReservationOrderResponseInner> beginPost(
String reservationOrderId, RefundRequest body) {
return this.beginPostAsync(reservationOrderId, body).getSyncPoller();
}
@@ -229,11 +230,10 @@ public SyncPoller, RefundResponseInner> beginPos
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of the response of refund request containing refund information of
- * reservation.
+ * @return the {@link SyncPoller} for polling of details of a reservation order being returned.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, RefundResponseInner> beginPost(
+ public SyncPoller, ReservationOrderResponseInner> beginPost(
String reservationOrderId, RefundRequest body, Context context) {
return this.beginPostAsync(reservationOrderId, body, context).getSyncPoller();
}
@@ -248,11 +248,10 @@ public SyncPoller, RefundResponseInner> beginPos
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of refund request containing refund information of reservation on successful completion of
- * {@link Mono}.
+ * @return details of a reservation order being returned on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono postAsync(String reservationOrderId, RefundRequest body) {
+ private Mono postAsync(String reservationOrderId, RefundRequest body) {
return beginPostAsync(reservationOrderId, body).last().flatMap(this.client::getLroFinalResultOrError);
}
@@ -267,11 +266,11 @@ private Mono postAsync(String reservationOrderId, RefundReq
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of refund request containing refund information of reservation on successful completion of
- * {@link Mono}.
+ * @return details of a reservation order being returned on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono postAsync(String reservationOrderId, RefundRequest body, Context context) {
+ private Mono postAsync(
+ String reservationOrderId, RefundRequest body, Context context) {
return beginPostAsync(reservationOrderId, body, context).last().flatMap(this.client::getLroFinalResultOrError);
}
@@ -285,10 +284,10 @@ private Mono postAsync(String reservationOrderId, RefundReq
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of refund request containing refund information of reservation.
+ * @return details of a reservation order being returned.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public RefundResponseInner post(String reservationOrderId, RefundRequest body) {
+ public ReservationOrderResponseInner post(String reservationOrderId, RefundRequest body) {
return postAsync(reservationOrderId, body).block();
}
@@ -303,10 +302,10 @@ public RefundResponseInner post(String reservationOrderId, RefundRequest body) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of refund request containing refund information of reservation.
+ * @return details of a reservation order being returned.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public RefundResponseInner post(String reservationOrderId, RefundRequest body, Context context) {
+ public ReservationOrderResponseInner post(String reservationOrderId, RefundRequest body, Context context) {
return postAsync(reservationOrderId, body, context).block();
}
}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/implementation/ReturnsImpl.java b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/implementation/ReturnsImpl.java
index bef8a306fb47..19a320ee5178 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/implementation/ReturnsImpl.java
+++ b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/implementation/ReturnsImpl.java
@@ -7,9 +7,9 @@
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.reservations.fluent.ReturnsClient;
-import com.azure.resourcemanager.reservations.fluent.models.RefundResponseInner;
+import com.azure.resourcemanager.reservations.fluent.models.ReservationOrderResponseInner;
import com.azure.resourcemanager.reservations.models.RefundRequest;
-import com.azure.resourcemanager.reservations.models.RefundResponse;
+import com.azure.resourcemanager.reservations.models.ReservationOrderResponse;
import com.azure.resourcemanager.reservations.models.Returns;
public final class ReturnsImpl implements Returns {
@@ -25,19 +25,19 @@ public ReturnsImpl(
this.serviceManager = serviceManager;
}
- public RefundResponse post(String reservationOrderId, RefundRequest body) {
- RefundResponseInner inner = this.serviceClient().post(reservationOrderId, body);
+ public ReservationOrderResponse post(String reservationOrderId, RefundRequest body) {
+ ReservationOrderResponseInner inner = this.serviceClient().post(reservationOrderId, body);
if (inner != null) {
- return new RefundResponseImpl(inner, this.manager());
+ return new ReservationOrderResponseImpl(inner, this.manager());
} else {
return null;
}
}
- public RefundResponse post(String reservationOrderId, RefundRequest body, Context context) {
- RefundResponseInner inner = this.serviceClient().post(reservationOrderId, body, context);
+ public ReservationOrderResponse post(String reservationOrderId, RefundRequest body, Context context) {
+ ReservationOrderResponseInner inner = this.serviceClient().post(reservationOrderId, body, context);
if (inner != null) {
- return new RefundResponseImpl(inner, this.manager());
+ return new ReservationOrderResponseImpl(inner, this.manager());
} else {
return null;
}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/CatalogMsrp.java b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/CatalogMsrp.java
index ad52bd3c3b1e..2329f5893f1f 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/CatalogMsrp.java
+++ b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/CatalogMsrp.java
@@ -16,6 +16,18 @@ public final class CatalogMsrp {
@JsonProperty(value = "p1Y")
private Price p1Y;
+ /*
+ * Amount in pricing currency. Tax not included.
+ */
+ @JsonProperty(value = "p3Y")
+ private Price p3Y;
+
+ /*
+ * Amount in pricing currency. Tax not included.
+ */
+ @JsonProperty(value = "p5Y")
+ private Price p5Y;
+
/** Creates an instance of CatalogMsrp class. */
public CatalogMsrp() {
}
@@ -40,6 +52,46 @@ public CatalogMsrp withP1Y(Price p1Y) {
return this;
}
+ /**
+ * Get the p3Y property: Amount in pricing currency. Tax not included.
+ *
+ * @return the p3Y value.
+ */
+ public Price p3Y() {
+ return this.p3Y;
+ }
+
+ /**
+ * Set the p3Y property: Amount in pricing currency. Tax not included.
+ *
+ * @param p3Y the p3Y value to set.
+ * @return the CatalogMsrp object itself.
+ */
+ public CatalogMsrp withP3Y(Price p3Y) {
+ this.p3Y = p3Y;
+ return this;
+ }
+
+ /**
+ * Get the p5Y property: Amount in pricing currency. Tax not included.
+ *
+ * @return the p5Y value.
+ */
+ public Price p5Y() {
+ return this.p5Y;
+ }
+
+ /**
+ * Set the p5Y property: Amount in pricing currency. Tax not included.
+ *
+ * @param p5Y the p5Y value to set.
+ * @return the CatalogMsrp object itself.
+ */
+ public CatalogMsrp withP5Y(Price p5Y) {
+ this.p5Y = p5Y;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -49,5 +101,11 @@ public void validate() {
if (p1Y() != null) {
p1Y().validate();
}
+ if (p3Y() != null) {
+ p3Y().validate();
+ }
+ if (p5Y() != null) {
+ p5Y().validate();
+ }
}
}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/PatchModel.java b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/PatchModel.java
index a05db42b72b2..a7834b7ca28a 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/PatchModel.java
+++ b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/PatchModel.java
@@ -57,7 +57,8 @@ public PatchModel withAppliedScopeType(AppliedScopeType appliedScopeType) {
/**
* Get the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
- * AppliedScopeType is Shared.
+ * AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
+ * Single AppliedScopeType.
*
* @return the appliedScopes value.
*/
@@ -67,7 +68,8 @@ public List appliedScopes() {
/**
* Set the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
- * AppliedScopeType is Shared.
+ * AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
+ * Single AppliedScopeType.
*
* @param appliedScopes the appliedScopes value to set.
* @return the PatchModel object itself.
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/PurchaseRequest.java b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/PurchaseRequest.java
index 589b5247c8f8..5c9656dba270 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/PurchaseRequest.java
+++ b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/PurchaseRequest.java
@@ -247,7 +247,8 @@ public PurchaseRequest withAppliedScopeType(AppliedScopeType appliedScopeType) {
/**
* Get the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
- * AppliedScopeType is Shared.
+ * AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
+ * Single AppliedScopeType.
*
* @return the appliedScopes value.
*/
@@ -257,7 +258,8 @@ public List appliedScopes() {
/**
* Set the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if
- * AppliedScopeType is Shared.
+ * AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for
+ * Single AppliedScopeType.
*
* @param appliedScopes the appliedScopes value to set.
* @return the PurchaseRequest object itself.
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/Returns.java b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/Returns.java
index 1f913eba9a63..fc75d2e99e9a 100644
--- a/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/Returns.java
+++ b/sdk/reservations/azure-resourcemanager-reservations/src/main/java/com/azure/resourcemanager/reservations/models/Returns.java
@@ -18,9 +18,9 @@ public interface Returns {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of refund request containing refund information of reservation.
+ * @return details of a reservation order being returned.
*/
- RefundResponse post(String reservationOrderId, RefundRequest body);
+ ReservationOrderResponse post(String reservationOrderId, RefundRequest body);
/**
* Return a reservation.
@@ -33,7 +33,7 @@ public interface Returns {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of refund request containing refund information of reservation.
+ * @return details of a reservation order being returned.
*/
- RefundResponse post(String reservationOrderId, RefundRequest body, Context context);
+ ReservationOrderResponse post(String reservationOrderId, RefundRequest body, Context context);
}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationListTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationListTests.java
deleted file mode 100644
index 2673cdb00a4f..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationListTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.AppliedReservationList;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AppliedReservationListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AppliedReservationList model =
- BinaryData
- .fromString(
- "{\"value\":[\"smjqulngsntnbyb\",\"zgcwrw\",\"lxxwrljdouskc\",\"vkocrcjdkwtn\"],\"nextLink\":\"bnjbiksqrglssain\"}")
- .toObject(AppliedReservationList.class);
- Assertions.assertEquals("smjqulngsntnbyb", model.value().get(0));
- Assertions.assertEquals("bnjbiksqrglssain", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AppliedReservationList model =
- new AppliedReservationList()
- .withValue(Arrays.asList("smjqulngsntnbyb", "zgcwrw", "lxxwrljdouskc", "vkocrcjdkwtn"))
- .withNextLink("bnjbiksqrglssain");
- model = BinaryData.fromObject(model).toObject(AppliedReservationList.class);
- Assertions.assertEquals("smjqulngsntnbyb", model.value().get(0));
- Assertions.assertEquals("bnjbiksqrglssain", model.nextLink());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationsInnerTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationsInnerTests.java
deleted file mode 100644
index 65b7cd180485..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationsInnerTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.AppliedReservationsInner;
-import com.azure.resourcemanager.reservations.models.AppliedReservationList;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AppliedReservationsInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AppliedReservationsInner model =
- BinaryData
- .fromString(
- "{\"id\":\"fxxypininmayhuy\",\"name\":\"kpode\",\"type\":\"oginuvamiheognar\",\"properties\":{\"reservationOrderIds\":{\"value\":[\"eotusivyevc\",\"iqihn\"],\"nextLink\":\"ngbwjz\"}}}")
- .toObject(AppliedReservationsInner.class);
- Assertions.assertEquals("eotusivyevc", model.reservationOrderIds().value().get(0));
- Assertions.assertEquals("ngbwjz", model.reservationOrderIds().nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AppliedReservationsInner model =
- new AppliedReservationsInner()
- .withReservationOrderIds(
- new AppliedReservationList()
- .withValue(Arrays.asList("eotusivyevc", "iqihn"))
- .withNextLink("ngbwjz"));
- model = BinaryData.fromObject(model).toObject(AppliedReservationsInner.class);
- Assertions.assertEquals("eotusivyevc", model.reservationOrderIds().value().get(0));
- Assertions.assertEquals("ngbwjz", model.reservationOrderIds().nextLink());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationsPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationsPropertiesTests.java
deleted file mode 100644
index 182bf79a6fd5..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedReservationsPropertiesTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.AppliedReservationsProperties;
-import com.azure.resourcemanager.reservations.models.AppliedReservationList;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AppliedReservationsPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AppliedReservationsProperties model =
- BinaryData
- .fromString(
- "{\"reservationOrderIds\":{\"value\":[\"gxg\",\"spemvtzfk\",\"fublj\"],\"nextLink\":\"xqeofjaeqjhqjba\"}}")
- .toObject(AppliedReservationsProperties.class);
- Assertions.assertEquals("gxg", model.reservationOrderIds().value().get(0));
- Assertions.assertEquals("xqeofjaeqjhqjba", model.reservationOrderIds().nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AppliedReservationsProperties model =
- new AppliedReservationsProperties()
- .withReservationOrderIds(
- new AppliedReservationList()
- .withValue(Arrays.asList("gxg", "spemvtzfk", "fublj"))
- .withNextLink("xqeofjaeqjhqjba"));
- model = BinaryData.fromObject(model).toObject(AppliedReservationsProperties.class);
- Assertions.assertEquals("gxg", model.reservationOrderIds().value().get(0));
- Assertions.assertEquals("xqeofjaeqjhqjba", model.reservationOrderIds().nextLink());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedScopePropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedScopePropertiesTests.java
deleted file mode 100644
index c52d029a968d..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AppliedScopePropertiesTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.AppliedScopeProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class AppliedScopePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AppliedScopeProperties model =
- BinaryData
- .fromString(
- "{\"tenantId\":\"ktapspwgcuertu\",\"managementGroupId\":\"dosvqwhbmdgbbjf\",\"subscriptionId\":\"gmbmbexppbh\",\"resourceGroupId\":\"qrolfpf\",\"displayName\":\"algbquxigjyjg\"}")
- .toObject(AppliedScopeProperties.class);
- Assertions.assertEquals("ktapspwgcuertu", model.tenantId());
- Assertions.assertEquals("dosvqwhbmdgbbjf", model.managementGroupId());
- Assertions.assertEquals("gmbmbexppbh", model.subscriptionId());
- Assertions.assertEquals("qrolfpf", model.resourceGroupId());
- Assertions.assertEquals("algbquxigjyjg", model.displayName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AppliedScopeProperties model =
- new AppliedScopeProperties()
- .withTenantId("ktapspwgcuertu")
- .withManagementGroupId("dosvqwhbmdgbbjf")
- .withSubscriptionId("gmbmbexppbh")
- .withResourceGroupId("qrolfpf")
- .withDisplayName("algbquxigjyjg");
- model = BinaryData.fromObject(model).toObject(AppliedScopeProperties.class);
- Assertions.assertEquals("ktapspwgcuertu", model.tenantId());
- Assertions.assertEquals("dosvqwhbmdgbbjf", model.managementGroupId());
- Assertions.assertEquals("gmbmbexppbh", model.subscriptionId());
- Assertions.assertEquals("qrolfpf", model.resourceGroupId());
- Assertions.assertEquals("algbquxigjyjg", model.displayName());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AvailableScopePropertiesInnerTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AvailableScopePropertiesInnerTests.java
deleted file mode 100644
index c62e591050fa..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AvailableScopePropertiesInnerTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.AvailableScopePropertiesInner;
-import com.azure.resourcemanager.reservations.models.ScopeProperties;
-import com.azure.resourcemanager.reservations.models.SubscriptionScopeProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AvailableScopePropertiesInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AvailableScopePropertiesInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"scopes\":[{\"scope\":\"xbmtqioqjz\",\"valid\":false},{\"scope\":\"muf\",\"valid\":false},{\"scope\":\"oizh\",\"valid\":false}]}}")
- .toObject(AvailableScopePropertiesInner.class);
- Assertions.assertEquals("xbmtqioqjz", model.properties().scopes().get(0).scope());
- Assertions.assertEquals(false, model.properties().scopes().get(0).valid());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AvailableScopePropertiesInner model =
- new AvailableScopePropertiesInner()
- .withProperties(
- new SubscriptionScopeProperties()
- .withScopes(
- Arrays
- .asList(
- new ScopeProperties().withScope("xbmtqioqjz").withValid(false),
- new ScopeProperties().withScope("muf").withValid(false),
- new ScopeProperties().withScope("oizh").withValid(false))));
- model = BinaryData.fromObject(model).toObject(AvailableScopePropertiesInner.class);
- Assertions.assertEquals("xbmtqioqjz", model.properties().scopes().get(0).scope());
- Assertions.assertEquals(false, model.properties().scopes().get(0).valid());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AvailableScopeRequestPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AvailableScopeRequestPropertiesTests.java
deleted file mode 100644
index c6893f3f056f..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AvailableScopeRequestPropertiesTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.AvailableScopeRequestProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AvailableScopeRequestPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AvailableScopeRequestProperties model =
- BinaryData
- .fromString("{\"scopes\":[\"zopbsphrupidgs\",\"bb\",\"jhphoyc\",\"sx\"]}")
- .toObject(AvailableScopeRequestProperties.class);
- Assertions.assertEquals("zopbsphrupidgs", model.scopes().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AvailableScopeRequestProperties model =
- new AvailableScopeRequestProperties().withScopes(Arrays.asList("zopbsphrupidgs", "bb", "jhphoyc", "sx"));
- model = BinaryData.fromObject(model).toObject(AvailableScopeRequestProperties.class);
- Assertions.assertEquals("zopbsphrupidgs", model.scopes().get(0));
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AvailableScopeRequestTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AvailableScopeRequestTests.java
deleted file mode 100644
index b4cc0ee5aa24..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/AvailableScopeRequestTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.AvailableScopeRequest;
-import com.azure.resourcemanager.reservations.models.AvailableScopeRequestProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AvailableScopeRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AvailableScopeRequest model =
- BinaryData
- .fromString("{\"properties\":{\"scopes\":[\"quvgjxpybczme\"]}}")
- .toObject(AvailableScopeRequest.class);
- Assertions.assertEquals("quvgjxpybczme", model.properties().scopes().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AvailableScopeRequest model =
- new AvailableScopeRequest()
- .withProperties(new AvailableScopeRequestProperties().withScopes(Arrays.asList("quvgjxpybczme")));
- model = BinaryData.fromObject(model).toObject(AvailableScopeRequest.class);
- Assertions.assertEquals("quvgjxpybczme", model.properties().scopes().get(0));
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateExchangeRequestPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateExchangeRequestPropertiesTests.java
deleted file mode 100644
index b88163440cbf..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateExchangeRequestPropertiesTests.java
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.AppliedScopeType;
-import com.azure.resourcemanager.reservations.models.BillingPlan;
-import com.azure.resourcemanager.reservations.models.CalculateExchangeRequestProperties;
-import com.azure.resourcemanager.reservations.models.PurchaseRequest;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import com.azure.resourcemanager.reservations.models.ReservationToReturn;
-import com.azure.resourcemanager.reservations.models.ReservedResourceType;
-import com.azure.resourcemanager.reservations.models.SavingsPlanPurchaseRequest;
-import com.azure.resourcemanager.reservations.models.SavingsPlanTerm;
-import com.azure.resourcemanager.reservations.models.SkuName;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class CalculateExchangeRequestPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CalculateExchangeRequestProperties model =
- BinaryData
- .fromString(
- "{\"reservationsToPurchase\":[{\"sku\":{\"name\":\"ofmxagkvtmelmqkr\"},\"location\":\"hvljuahaquh\",\"properties\":{\"reservedResourceType\":\"RedHatOsa\",\"billingScopeId\":\"ualaexqpvfadmw\",\"term\":\"P3Y\",\"billingPlan\":\"Upfront\",\"quantity\":1259983494,\"displayName\":\"vgomz\",\"appliedScopeType\":\"Single\",\"appliedScopes\":[],\"renew\":false,\"reviewDateTime\":\"2021-11-20T05:31:55Z\"}},{\"sku\":{\"name\":\"ldawkzbaliourqha\"},\"location\":\"uhashsfwx\",\"properties\":{\"reservedResourceType\":\"MySql\",\"billingScopeId\":\"xcug\",\"term\":\"P3Y\",\"billingPlan\":\"Monthly\",\"quantity\":834529223,\"displayName\":\"ebwpucwwfvo\",\"appliedScopeType\":\"ManagementGroup\",\"appliedScopes\":[],\"renew\":false,\"reviewDateTime\":\"2021-12-04T00:10:18Z\"}},{\"sku\":{\"name\":\"zceuojgjrw\"},\"location\":\"eiotwmcdytdx\",\"properties\":{\"reservedResourceType\":\"SqlAzureHybridBenefit\",\"billingScopeId\":\"rjaw\",\"term\":\"P3Y\",\"billingPlan\":\"Monthly\",\"quantity\":369820426,\"displayName\":\"skxfbk\",\"appliedScopeType\":\"Single\",\"appliedScopes\":[],\"renew\":false,\"reviewDateTime\":\"2021-09-10T20:03:07Z\"}}],\"savingsPlansToPurchase\":[{\"sku\":{\"name\":\"uwhvylwzbtdhxujz\"},\"properties\":{\"displayName\":\"pow\",\"billingScopeId\":\"przqlveu\",\"term\":\"P1Y\",\"billingPlan\":\"P1M\",\"appliedScopeType\":\"Single\"}},{\"sku\":{\"name\":\"bbcswsrtjri\"},\"properties\":{\"displayName\":\"bpbewtghfgb\",\"billingScopeId\":\"gw\",\"term\":\"P3Y\",\"billingPlan\":\"P1M\",\"appliedScopeType\":\"Shared\"}}],\"reservationsToExchange\":[{\"reservationId\":\"ibtnmxiebwwaloay\",\"quantity\":1665079577},{\"reservationId\":\"rtzju\",\"quantity\":47396428},{\"reservationId\":\"zmh\",\"quantity\":1672254683},{\"reservationId\":\"gmtsavjcbpwxqpsr\",\"quantity\":1220568259}]}")
- .toObject(CalculateExchangeRequestProperties.class);
- Assertions.assertEquals("ofmxagkvtmelmqkr", model.reservationsToPurchase().get(0).sku().name());
- Assertions.assertEquals("hvljuahaquh", model.reservationsToPurchase().get(0).location());
- Assertions
- .assertEquals(
- ReservedResourceType.RED_HAT_OSA, model.reservationsToPurchase().get(0).reservedResourceType());
- Assertions.assertEquals("ualaexqpvfadmw", model.reservationsToPurchase().get(0).billingScopeId());
- Assertions.assertEquals(ReservationTerm.P3Y, model.reservationsToPurchase().get(0).term());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, model.reservationsToPurchase().get(0).billingPlan());
- Assertions.assertEquals(1259983494, model.reservationsToPurchase().get(0).quantity());
- Assertions.assertEquals("vgomz", model.reservationsToPurchase().get(0).displayName());
- Assertions.assertEquals(AppliedScopeType.SINGLE, model.reservationsToPurchase().get(0).appliedScopeType());
- Assertions.assertEquals(false, model.reservationsToPurchase().get(0).renew());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-11-20T05:31:55Z"), model.reservationsToPurchase().get(0).reviewDateTime());
- Assertions.assertEquals("uwhvylwzbtdhxujz", model.savingsPlansToPurchase().get(0).sku().name());
- Assertions.assertEquals("pow", model.savingsPlansToPurchase().get(0).displayName());
- Assertions.assertEquals("przqlveu", model.savingsPlansToPurchase().get(0).billingScopeId());
- Assertions.assertEquals(SavingsPlanTerm.P1Y, model.savingsPlansToPurchase().get(0).term());
- Assertions.assertEquals(BillingPlan.P1M, model.savingsPlansToPurchase().get(0).billingPlan());
- Assertions.assertEquals(AppliedScopeType.SINGLE, model.savingsPlansToPurchase().get(0).appliedScopeType());
- Assertions.assertEquals("ibtnmxiebwwaloay", model.reservationsToExchange().get(0).reservationId());
- Assertions.assertEquals(1665079577, model.reservationsToExchange().get(0).quantity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CalculateExchangeRequestProperties model =
- new CalculateExchangeRequestProperties()
- .withReservationsToPurchase(
- Arrays
- .asList(
- new PurchaseRequest()
- .withSku(new SkuName().withName("ofmxagkvtmelmqkr"))
- .withLocation("hvljuahaquh")
- .withReservedResourceType(ReservedResourceType.RED_HAT_OSA)
- .withBillingScopeId("ualaexqpvfadmw")
- .withTerm(ReservationTerm.P3Y)
- .withBillingPlan(ReservationBillingPlan.UPFRONT)
- .withQuantity(1259983494)
- .withDisplayName("vgomz")
- .withAppliedScopeType(AppliedScopeType.SINGLE)
- .withAppliedScopes(Arrays.asList())
- .withRenew(false)
- .withReviewDateTime(OffsetDateTime.parse("2021-11-20T05:31:55Z")),
- new PurchaseRequest()
- .withSku(new SkuName().withName("ldawkzbaliourqha"))
- .withLocation("uhashsfwx")
- .withReservedResourceType(ReservedResourceType.MY_SQL)
- .withBillingScopeId("xcug")
- .withTerm(ReservationTerm.P3Y)
- .withBillingPlan(ReservationBillingPlan.MONTHLY)
- .withQuantity(834529223)
- .withDisplayName("ebwpucwwfvo")
- .withAppliedScopeType(AppliedScopeType.MANAGEMENT_GROUP)
- .withAppliedScopes(Arrays.asList())
- .withRenew(false)
- .withReviewDateTime(OffsetDateTime.parse("2021-12-04T00:10:18Z")),
- new PurchaseRequest()
- .withSku(new SkuName().withName("zceuojgjrw"))
- .withLocation("eiotwmcdytdx")
- .withReservedResourceType(ReservedResourceType.SQL_AZURE_HYBRID_BENEFIT)
- .withBillingScopeId("rjaw")
- .withTerm(ReservationTerm.P3Y)
- .withBillingPlan(ReservationBillingPlan.MONTHLY)
- .withQuantity(369820426)
- .withDisplayName("skxfbk")
- .withAppliedScopeType(AppliedScopeType.SINGLE)
- .withAppliedScopes(Arrays.asList())
- .withRenew(false)
- .withReviewDateTime(OffsetDateTime.parse("2021-09-10T20:03:07Z"))))
- .withSavingsPlansToPurchase(
- Arrays
- .asList(
- new SavingsPlanPurchaseRequest()
- .withSku(new SkuName().withName("uwhvylwzbtdhxujz"))
- .withDisplayName("pow")
- .withBillingScopeId("przqlveu")
- .withTerm(SavingsPlanTerm.P1Y)
- .withBillingPlan(BillingPlan.P1M)
- .withAppliedScopeType(AppliedScopeType.SINGLE),
- new SavingsPlanPurchaseRequest()
- .withSku(new SkuName().withName("bbcswsrtjri"))
- .withDisplayName("bpbewtghfgb")
- .withBillingScopeId("gw")
- .withTerm(SavingsPlanTerm.P3Y)
- .withBillingPlan(BillingPlan.P1M)
- .withAppliedScopeType(AppliedScopeType.SHARED)))
- .withReservationsToExchange(
- Arrays
- .asList(
- new ReservationToReturn().withReservationId("ibtnmxiebwwaloay").withQuantity(1665079577),
- new ReservationToReturn().withReservationId("rtzju").withQuantity(47396428),
- new ReservationToReturn().withReservationId("zmh").withQuantity(1672254683),
- new ReservationToReturn().withReservationId("gmtsavjcbpwxqpsr").withQuantity(1220568259)));
- model = BinaryData.fromObject(model).toObject(CalculateExchangeRequestProperties.class);
- Assertions.assertEquals("ofmxagkvtmelmqkr", model.reservationsToPurchase().get(0).sku().name());
- Assertions.assertEquals("hvljuahaquh", model.reservationsToPurchase().get(0).location());
- Assertions
- .assertEquals(
- ReservedResourceType.RED_HAT_OSA, model.reservationsToPurchase().get(0).reservedResourceType());
- Assertions.assertEquals("ualaexqpvfadmw", model.reservationsToPurchase().get(0).billingScopeId());
- Assertions.assertEquals(ReservationTerm.P3Y, model.reservationsToPurchase().get(0).term());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, model.reservationsToPurchase().get(0).billingPlan());
- Assertions.assertEquals(1259983494, model.reservationsToPurchase().get(0).quantity());
- Assertions.assertEquals("vgomz", model.reservationsToPurchase().get(0).displayName());
- Assertions.assertEquals(AppliedScopeType.SINGLE, model.reservationsToPurchase().get(0).appliedScopeType());
- Assertions.assertEquals(false, model.reservationsToPurchase().get(0).renew());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-11-20T05:31:55Z"), model.reservationsToPurchase().get(0).reviewDateTime());
- Assertions.assertEquals("uwhvylwzbtdhxujz", model.savingsPlansToPurchase().get(0).sku().name());
- Assertions.assertEquals("pow", model.savingsPlansToPurchase().get(0).displayName());
- Assertions.assertEquals("przqlveu", model.savingsPlansToPurchase().get(0).billingScopeId());
- Assertions.assertEquals(SavingsPlanTerm.P1Y, model.savingsPlansToPurchase().get(0).term());
- Assertions.assertEquals(BillingPlan.P1M, model.savingsPlansToPurchase().get(0).billingPlan());
- Assertions.assertEquals(AppliedScopeType.SINGLE, model.savingsPlansToPurchase().get(0).appliedScopeType());
- Assertions.assertEquals("ibtnmxiebwwaloay", model.reservationsToExchange().get(0).reservationId());
- Assertions.assertEquals(1665079577, model.reservationsToExchange().get(0).quantity());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateExchangeRequestTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateExchangeRequestTests.java
deleted file mode 100644
index 3c5402d97af3..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateExchangeRequestTests.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.CalculateExchangeRequest;
-import com.azure.resourcemanager.reservations.models.CalculateExchangeRequestProperties;
-import com.azure.resourcemanager.reservations.models.PurchaseRequest;
-import com.azure.resourcemanager.reservations.models.ReservationToReturn;
-import com.azure.resourcemanager.reservations.models.SavingsPlanPurchaseRequest;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class CalculateExchangeRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CalculateExchangeRequest model =
- BinaryData
- .fromString(
- "{\"properties\":{\"reservationsToPurchase\":[{\"location\":\"bmehh\"}],\"savingsPlansToPurchase\":[{}],\"reservationsToExchange\":[{\"reservationId\":\"slhs\",\"quantity\":1559568264}]}}")
- .toObject(CalculateExchangeRequest.class);
- Assertions.assertEquals("bmehh", model.properties().reservationsToPurchase().get(0).location());
- Assertions.assertEquals("slhs", model.properties().reservationsToExchange().get(0).reservationId());
- Assertions.assertEquals(1559568264, model.properties().reservationsToExchange().get(0).quantity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CalculateExchangeRequest model =
- new CalculateExchangeRequest()
- .withProperties(
- new CalculateExchangeRequestProperties()
- .withReservationsToPurchase(Arrays.asList(new PurchaseRequest().withLocation("bmehh")))
- .withSavingsPlansToPurchase(Arrays.asList(new SavingsPlanPurchaseRequest()))
- .withReservationsToExchange(
- Arrays
- .asList(new ReservationToReturn().withReservationId("slhs").withQuantity(1559568264))));
- model = BinaryData.fromObject(model).toObject(CalculateExchangeRequest.class);
- Assertions.assertEquals("bmehh", model.properties().reservationsToPurchase().get(0).location());
- Assertions.assertEquals("slhs", model.properties().reservationsToExchange().get(0).reservationId());
- Assertions.assertEquals(1559568264, model.properties().reservationsToExchange().get(0).quantity());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateRefundRequestPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateRefundRequestPropertiesTests.java
deleted file mode 100644
index 29b525737d6b..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateRefundRequestPropertiesTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.CalculateRefundRequestProperties;
-import com.azure.resourcemanager.reservations.models.ReservationToReturn;
-import org.junit.jupiter.api.Assertions;
-
-public final class CalculateRefundRequestPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CalculateRefundRequestProperties model =
- BinaryData
- .fromString(
- "{\"scope\":\"deoj\",\"reservationToReturn\":{\"reservationId\":\"ckhsmtxpsieb\",\"quantity\":1146165631}}")
- .toObject(CalculateRefundRequestProperties.class);
- Assertions.assertEquals("deoj", model.scope());
- Assertions.assertEquals("ckhsmtxpsieb", model.reservationToReturn().reservationId());
- Assertions.assertEquals(1146165631, model.reservationToReturn().quantity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CalculateRefundRequestProperties model =
- new CalculateRefundRequestProperties()
- .withScope("deoj")
- .withReservationToReturn(
- new ReservationToReturn().withReservationId("ckhsmtxpsieb").withQuantity(1146165631));
- model = BinaryData.fromObject(model).toObject(CalculateRefundRequestProperties.class);
- Assertions.assertEquals("deoj", model.scope());
- Assertions.assertEquals("ckhsmtxpsieb", model.reservationToReturn().reservationId());
- Assertions.assertEquals(1146165631, model.reservationToReturn().quantity());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateRefundRequestTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateRefundRequestTests.java
deleted file mode 100644
index 101f439334a0..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CalculateRefundRequestTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.CalculateRefundRequest;
-import com.azure.resourcemanager.reservations.models.CalculateRefundRequestProperties;
-import com.azure.resourcemanager.reservations.models.ReservationToReturn;
-import org.junit.jupiter.api.Assertions;
-
-public final class CalculateRefundRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CalculateRefundRequest model =
- BinaryData
- .fromString(
- "{\"id\":\"gsxnkjzkdeslpv\",\"properties\":{\"scope\":\"wiyighxpkdw\",\"reservationToReturn\":{\"reservationId\":\"iuebbaumny\",\"quantity\":624396177}}}")
- .toObject(CalculateRefundRequest.class);
- Assertions.assertEquals("gsxnkjzkdeslpv", model.id());
- Assertions.assertEquals("wiyighxpkdw", model.properties().scope());
- Assertions.assertEquals("iuebbaumny", model.properties().reservationToReturn().reservationId());
- Assertions.assertEquals(624396177, model.properties().reservationToReturn().quantity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CalculateRefundRequest model =
- new CalculateRefundRequest()
- .withId("gsxnkjzkdeslpv")
- .withProperties(
- new CalculateRefundRequestProperties()
- .withScope("wiyighxpkdw")
- .withReservationToReturn(
- new ReservationToReturn().withReservationId("iuebbaumny").withQuantity(624396177)));
- model = BinaryData.fromObject(model).toObject(CalculateRefundRequest.class);
- Assertions.assertEquals("gsxnkjzkdeslpv", model.id());
- Assertions.assertEquals("wiyighxpkdw", model.properties().scope());
- Assertions.assertEquals("iuebbaumny", model.properties().reservationToReturn().reservationId());
- Assertions.assertEquals(624396177, model.properties().reservationToReturn().quantity());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CatalogsResultTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CatalogsResultTests.java
deleted file mode 100644
index 65cecc2ebfe6..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CatalogsResultTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.CatalogsResult;
-import org.junit.jupiter.api.Assertions;
-
-public final class CatalogsResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CatalogsResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"resourceType\":\"ufo\",\"name\":\"jywif\",\"billingPlans\":{\"gdf\":[\"Upfront\",\"Monthly\"],\"j\":[\"Upfront\",\"Monthly\",\"Upfront\",\"Upfront\"]},\"terms\":[\"P3Y\",\"P1Y\",\"P5Y\",\"P1Y\"],\"locations\":[\"ktsizntocipaou\",\"jpsq\",\"cmpoyfdkfogkny\",\"jofjd\"],\"skuProperties\":[],\"msrp\":{},\"restrictions\":[],\"tier\":\"pewnw\",\"size\":\"itjz\",\"capabilities\":[]},{\"resourceType\":\"sarhmofc\",\"name\":\"smy\",\"billingPlans\":{\"he\":[\"Monthly\",\"Monthly\",\"Upfront\",\"Monthly\"],\"txukcdmp\":[\"Upfront\",\"Monthly\",\"Upfront\"],\"anzwuxzdxta\":[\"Upfront\",\"Monthly\",\"Upfront\",\"Monthly\"]},\"terms\":[\"P5Y\",\"P1Y\",\"P3Y\",\"P1Y\"],\"locations\":[\"mrqobmtukknr\",\"rtihfxtijbpz\"],\"skuProperties\":[],\"msrp\":{},\"restrictions\":[],\"tier\":\"glzufc\",\"size\":\"kohdbiha\",\"capabilities\":[]}],\"nextLink\":\"fcbjysagithxqha\",\"totalItems\":581861231239656930}")
- .toObject(CatalogsResult.class);
- Assertions.assertEquals(581861231239656930L, model.totalItems());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CatalogsResult model = new CatalogsResult().withTotalItems(581861231239656930L);
- model = BinaryData.fromObject(model).toObject(CatalogsResult.class);
- Assertions.assertEquals(581861231239656930L, model.totalItems());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ChangeDirectoryRequestTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ChangeDirectoryRequestTests.java
deleted file mode 100644
index 5f935547f5e4..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ChangeDirectoryRequestTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ChangeDirectoryRequest;
-import org.junit.jupiter.api.Assertions;
-
-public final class ChangeDirectoryRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ChangeDirectoryRequest model =
- BinaryData.fromString("{\"destinationTenantId\":\"nsorgjhxbldt\"}").toObject(ChangeDirectoryRequest.class);
- Assertions.assertEquals("nsorgjhxbldt", model.destinationTenantId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ChangeDirectoryRequest model = new ChangeDirectoryRequest().withDestinationTenantId("nsorgjhxbldt");
- model = BinaryData.fromObject(model).toObject(ChangeDirectoryRequest.class);
- Assertions.assertEquals("nsorgjhxbldt", model.destinationTenantId());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ChangeDirectoryResponseInnerTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ChangeDirectoryResponseInnerTests.java
deleted file mode 100644
index f6509d2cb47a..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ChangeDirectoryResponseInnerTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.ChangeDirectoryResponseInner;
-import com.azure.resourcemanager.reservations.models.ChangeDirectoryResult;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ChangeDirectoryResponseInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ChangeDirectoryResponseInner model =
- BinaryData
- .fromString(
- "{\"reservationOrder\":{\"id\":\"rlkdmtncvokotl\",\"name\":\"d\",\"isSucceeded\":false,\"error\":\"y\"},\"reservations\":[{\"id\":\"jlt\",\"name\":\"bnnhadoocrkvcik\",\"isSucceeded\":false,\"error\":\"amqgxqquezikyw\"},{\"id\":\"xkalla\",\"name\":\"elwuipi\",\"isSucceeded\":false,\"error\":\"kzivgvvcnayrh\"},{\"id\":\"nxxmueedndrdv\",\"name\":\"kwqqtchealmf\",\"isSucceeded\":false,\"error\":\"aygdvwvgpioh\"},{\"id\":\"xrtfudxep\",\"name\":\"yqagvrvm\",\"isSucceeded\":false,\"error\":\"kghimdblxgwimfnj\"}]}")
- .toObject(ChangeDirectoryResponseInner.class);
- Assertions.assertEquals("rlkdmtncvokotl", model.reservationOrder().id());
- Assertions.assertEquals("d", model.reservationOrder().name());
- Assertions.assertEquals(false, model.reservationOrder().isSucceeded());
- Assertions.assertEquals("y", model.reservationOrder().error());
- Assertions.assertEquals("jlt", model.reservations().get(0).id());
- Assertions.assertEquals("bnnhadoocrkvcik", model.reservations().get(0).name());
- Assertions.assertEquals(false, model.reservations().get(0).isSucceeded());
- Assertions.assertEquals("amqgxqquezikyw", model.reservations().get(0).error());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ChangeDirectoryResponseInner model =
- new ChangeDirectoryResponseInner()
- .withReservationOrder(
- new ChangeDirectoryResult()
- .withId("rlkdmtncvokotl")
- .withName("d")
- .withIsSucceeded(false)
- .withError("y"))
- .withReservations(
- Arrays
- .asList(
- new ChangeDirectoryResult()
- .withId("jlt")
- .withName("bnnhadoocrkvcik")
- .withIsSucceeded(false)
- .withError("amqgxqquezikyw"),
- new ChangeDirectoryResult()
- .withId("xkalla")
- .withName("elwuipi")
- .withIsSucceeded(false)
- .withError("kzivgvvcnayrh"),
- new ChangeDirectoryResult()
- .withId("nxxmueedndrdv")
- .withName("kwqqtchealmf")
- .withIsSucceeded(false)
- .withError("aygdvwvgpioh"),
- new ChangeDirectoryResult()
- .withId("xrtfudxep")
- .withName("yqagvrvm")
- .withIsSucceeded(false)
- .withError("kghimdblxgwimfnj")));
- model = BinaryData.fromObject(model).toObject(ChangeDirectoryResponseInner.class);
- Assertions.assertEquals("rlkdmtncvokotl", model.reservationOrder().id());
- Assertions.assertEquals("d", model.reservationOrder().name());
- Assertions.assertEquals(false, model.reservationOrder().isSucceeded());
- Assertions.assertEquals("y", model.reservationOrder().error());
- Assertions.assertEquals("jlt", model.reservations().get(0).id());
- Assertions.assertEquals("bnnhadoocrkvcik", model.reservations().get(0).name());
- Assertions.assertEquals(false, model.reservations().get(0).isSucceeded());
- Assertions.assertEquals("amqgxqquezikyw", model.reservations().get(0).error());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ChangeDirectoryResultTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ChangeDirectoryResultTests.java
deleted file mode 100644
index b4c00d5fcebe..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ChangeDirectoryResultTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ChangeDirectoryResult;
-import org.junit.jupiter.api.Assertions;
-
-public final class ChangeDirectoryResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ChangeDirectoryResult model =
- BinaryData
- .fromString("{\"id\":\"j\",\"name\":\"mszkkfo\",\"isSucceeded\":true,\"error\":\"fkzikfj\"}")
- .toObject(ChangeDirectoryResult.class);
- Assertions.assertEquals("j", model.id());
- Assertions.assertEquals("mszkkfo", model.name());
- Assertions.assertEquals(true, model.isSucceeded());
- Assertions.assertEquals("fkzikfj", model.error());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ChangeDirectoryResult model =
- new ChangeDirectoryResult().withId("j").withName("mszkkfo").withIsSucceeded(true).withError("fkzikfj");
- model = BinaryData.fromObject(model).toObject(ChangeDirectoryResult.class);
- Assertions.assertEquals("j", model.id());
- Assertions.assertEquals("mszkkfo", model.name());
- Assertions.assertEquals(true, model.isSucceeded());
- Assertions.assertEquals("fkzikfj", model.error());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CurrentQuotaLimitBaseInnerTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CurrentQuotaLimitBaseInnerTests.java
deleted file mode 100644
index e67293f39657..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/CurrentQuotaLimitBaseInnerTests.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.CurrentQuotaLimitBaseInner;
-import com.azure.resourcemanager.reservations.models.QuotaProperties;
-import com.azure.resourcemanager.reservations.models.ResourceName;
-import com.azure.resourcemanager.reservations.models.ResourceType;
-import org.junit.jupiter.api.Assertions;
-
-public final class CurrentQuotaLimitBaseInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CurrentQuotaLimitBaseInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"limit\":398738394,\"currentValue\":693357808,\"unit\":\"xwczelpcire\",\"name\":{\"value\":\"eae\",\"localizedValue\":\"abfatkl\"},\"resourceType\":\"dedicated\",\"quotaPeriod\":\"jhwuaanozjos\",\"properties\":\"datayoulp\"},\"id\":\"rvxaglrvimjwosy\",\"name\":\"xitc\",\"type\":\"kfcktqum\"}")
- .toObject(CurrentQuotaLimitBaseInner.class);
- Assertions.assertEquals(398738394, model.properties().limit());
- Assertions.assertEquals("xwczelpcire", model.properties().unit());
- Assertions.assertEquals("eae", model.properties().name().value());
- Assertions.assertEquals(ResourceType.DEDICATED, model.properties().resourceType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CurrentQuotaLimitBaseInner model =
- new CurrentQuotaLimitBaseInner()
- .withProperties(
- new QuotaProperties()
- .withLimit(398738394)
- .withUnit("xwczelpcire")
- .withName(new ResourceName().withValue("eae"))
- .withResourceType(ResourceType.DEDICATED)
- .withProperties("datayoulp"));
- model = BinaryData.fromObject(model).toObject(CurrentQuotaLimitBaseInner.class);
- Assertions.assertEquals(398738394, model.properties().limit());
- Assertions.assertEquals("xwczelpcire", model.properties().unit());
- Assertions.assertEquals("eae", model.properties().name().value());
- Assertions.assertEquals(ResourceType.DEDICATED, model.properties().resourceType());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ExchangeRequestPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ExchangeRequestPropertiesTests.java
deleted file mode 100644
index c2df5ce5399f..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ExchangeRequestPropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ExchangeRequestProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class ExchangeRequestPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExchangeRequestProperties model =
- BinaryData.fromString("{\"sessionId\":\"jbi\"}").toObject(ExchangeRequestProperties.class);
- Assertions.assertEquals("jbi", model.sessionId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExchangeRequestProperties model = new ExchangeRequestProperties().withSessionId("jbi");
- model = BinaryData.fromObject(model).toObject(ExchangeRequestProperties.class);
- Assertions.assertEquals("jbi", model.sessionId());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ExchangeRequestTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ExchangeRequestTests.java
deleted file mode 100644
index a230181383a6..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ExchangeRequestTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ExchangeRequest;
-import com.azure.resourcemanager.reservations.models.ExchangeRequestProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class ExchangeRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExchangeRequest model =
- BinaryData.fromString("{\"properties\":{\"sessionId\":\"wbhsqfsub\"}}").toObject(ExchangeRequest.class);
- Assertions.assertEquals("wbhsqfsub", model.properties().sessionId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExchangeRequest model =
- new ExchangeRequest().withProperties(new ExchangeRequestProperties().withSessionId("wbhsqfsub"));
- model = BinaryData.fromObject(model).toObject(ExchangeRequest.class);
- Assertions.assertEquals("wbhsqfsub", model.properties().sessionId());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/MergePropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/MergePropertiesTests.java
deleted file mode 100644
index 2a0de5345095..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/MergePropertiesTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.MergeProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class MergePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- MergeProperties model =
- BinaryData
- .fromString("{\"sources\":[\"dwxdndnv\",\"w\",\"ujjugwdkcglh\",\"lazjdyggdtjixhbk\"]}")
- .toObject(MergeProperties.class);
- Assertions.assertEquals("dwxdndnv", model.sources().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- MergeProperties model =
- new MergeProperties().withSources(Arrays.asList("dwxdndnv", "w", "ujjugwdkcglh", "lazjdyggdtjixhbk"));
- model = BinaryData.fromObject(model).toObject(MergeProperties.class);
- Assertions.assertEquals("dwxdndnv", model.sources().get(0));
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/MergeRequestTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/MergeRequestTests.java
deleted file mode 100644
index bdaa814076bb..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/MergeRequestTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.MergeRequest;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class MergeRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- MergeRequest model =
- BinaryData.fromString("{\"properties\":{\"sources\":[\"mohctb\"]}}").toObject(MergeRequest.class);
- Assertions.assertEquals("mohctb", model.sources().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- MergeRequest model = new MergeRequest().withSources(Arrays.asList("mohctb"));
- model = BinaryData.fromObject(model).toObject(MergeRequest.class);
- Assertions.assertEquals("mohctb", model.sources().get(0));
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationDisplayTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationDisplayTests.java
deleted file mode 100644
index b82b9a85700e..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationDisplayTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.OperationDisplay;
-import org.junit.jupiter.api.Assertions;
-
-public final class OperationDisplayTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationDisplay model =
- BinaryData
- .fromString(
- "{\"provider\":\"klbb\",\"resource\":\"plwzbhvgyugu\",\"operation\":\"vmkfssxqu\",\"description\":\"fpl\"}")
- .toObject(OperationDisplay.class);
- Assertions.assertEquals("klbb", model.provider());
- Assertions.assertEquals("plwzbhvgyugu", model.resource());
- Assertions.assertEquals("vmkfssxqu", model.operation());
- Assertions.assertEquals("fpl", model.description());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationDisplay model =
- new OperationDisplay()
- .withProvider("klbb")
- .withResource("plwzbhvgyugu")
- .withOperation("vmkfssxqu")
- .withDescription("fpl");
- model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
- Assertions.assertEquals("klbb", model.provider());
- Assertions.assertEquals("plwzbhvgyugu", model.resource());
- Assertions.assertEquals("vmkfssxqu", model.operation());
- Assertions.assertEquals("fpl", model.description());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationListTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationListTests.java
deleted file mode 100644
index 7e1a5634daef..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationListTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.OperationResponseInner;
-import com.azure.resourcemanager.reservations.models.OperationDisplay;
-import com.azure.resourcemanager.reservations.models.OperationList;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class OperationListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"name\":\"jggmebfsiarbu\",\"isDataAction\":true,\"display\":{\"provider\":\"na\",\"resource\":\"mhjrunmpxttdbhr\",\"operation\":\"l\",\"description\":\"kx\"},\"origin\":\"skpbhenbtkcxywn\",\"properties\":\"datanrs\"},{\"name\":\"lqidyby\",\"isDataAction\":false,\"display\":{\"provider\":\"lhaaxdbabp\",\"resource\":\"wrqlfktsthsuco\",\"operation\":\"nyyazttbtwwrqpue\",\"description\":\"kzywbiex\"},\"origin\":\"eyueaxibxujwb\",\"properties\":\"datawalm\"}],\"nextLink\":\"yoxa\"}")
- .toObject(OperationList.class);
- Assertions.assertEquals("jggmebfsiarbu", model.value().get(0).name());
- Assertions.assertEquals(true, model.value().get(0).isDataAction());
- Assertions.assertEquals("na", model.value().get(0).display().provider());
- Assertions.assertEquals("mhjrunmpxttdbhr", model.value().get(0).display().resource());
- Assertions.assertEquals("l", model.value().get(0).display().operation());
- Assertions.assertEquals("kx", model.value().get(0).display().description());
- Assertions.assertEquals("skpbhenbtkcxywn", model.value().get(0).origin());
- Assertions.assertEquals("yoxa", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationList model =
- new OperationList()
- .withValue(
- Arrays
- .asList(
- new OperationResponseInner()
- .withName("jggmebfsiarbu")
- .withIsDataAction(true)
- .withDisplay(
- new OperationDisplay()
- .withProvider("na")
- .withResource("mhjrunmpxttdbhr")
- .withOperation("l")
- .withDescription("kx"))
- .withOrigin("skpbhenbtkcxywn")
- .withProperties("datanrs"),
- new OperationResponseInner()
- .withName("lqidyby")
- .withIsDataAction(false)
- .withDisplay(
- new OperationDisplay()
- .withProvider("lhaaxdbabp")
- .withResource("wrqlfktsthsuco")
- .withOperation("nyyazttbtwwrqpue")
- .withDescription("kzywbiex"))
- .withOrigin("eyueaxibxujwb")
- .withProperties("datawalm")))
- .withNextLink("yoxa");
- model = BinaryData.fromObject(model).toObject(OperationList.class);
- Assertions.assertEquals("jggmebfsiarbu", model.value().get(0).name());
- Assertions.assertEquals(true, model.value().get(0).isDataAction());
- Assertions.assertEquals("na", model.value().get(0).display().provider());
- Assertions.assertEquals("mhjrunmpxttdbhr", model.value().get(0).display().resource());
- Assertions.assertEquals("l", model.value().get(0).display().operation());
- Assertions.assertEquals("kx", model.value().get(0).display().description());
- Assertions.assertEquals("skpbhenbtkcxywn", model.value().get(0).origin());
- Assertions.assertEquals("yoxa", model.nextLink());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationResponseInnerTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationResponseInnerTests.java
deleted file mode 100644
index eb548dcce684..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationResponseInnerTests.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.OperationResponseInner;
-import com.azure.resourcemanager.reservations.models.OperationDisplay;
-import org.junit.jupiter.api.Assertions;
-
-public final class OperationResponseInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationResponseInner model =
- BinaryData
- .fromString(
- "{\"name\":\"dkzjancuxrh\",\"isDataAction\":true,\"display\":{\"provider\":\"xbniwdjs\",\"resource\":\"tsdbpgn\",\"operation\":\"txhp\",\"description\":\"bzpfzab\"},\"origin\":\"cuh\",\"properties\":\"datatcty\"}")
- .toObject(OperationResponseInner.class);
- Assertions.assertEquals("dkzjancuxrh", model.name());
- Assertions.assertEquals(true, model.isDataAction());
- Assertions.assertEquals("xbniwdjs", model.display().provider());
- Assertions.assertEquals("tsdbpgn", model.display().resource());
- Assertions.assertEquals("txhp", model.display().operation());
- Assertions.assertEquals("bzpfzab", model.display().description());
- Assertions.assertEquals("cuh", model.origin());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationResponseInner model =
- new OperationResponseInner()
- .withName("dkzjancuxrh")
- .withIsDataAction(true)
- .withDisplay(
- new OperationDisplay()
- .withProvider("xbniwdjs")
- .withResource("tsdbpgn")
- .withOperation("txhp")
- .withDescription("bzpfzab"))
- .withOrigin("cuh")
- .withProperties("datatcty");
- model = BinaryData.fromObject(model).toObject(OperationResponseInner.class);
- Assertions.assertEquals("dkzjancuxrh", model.name());
- Assertions.assertEquals(true, model.isDataAction());
- Assertions.assertEquals("xbniwdjs", model.display().provider());
- Assertions.assertEquals("tsdbpgn", model.display().resource());
- Assertions.assertEquals("txhp", model.display().operation());
- Assertions.assertEquals("bzpfzab", model.display().description());
- Assertions.assertEquals("cuh", model.origin());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationsListMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationsListMockTests.java
deleted file mode 100644
index c6337c761ff5..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/OperationsListMockTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.OperationResponse;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OperationsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"name\":\"slbi\",\"isDataAction\":false,\"display\":{\"provider\":\"cyztsfmznbaeqp\",\"resource\":\"hqnrn\",\"operation\":\"x\",\"description\":\"uwrykqgaifmvikl\"},\"origin\":\"dvk\",\"properties\":\"dataejd\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("slbi", response.iterator().next().name());
- Assertions.assertEquals(false, response.iterator().next().isDataAction());
- Assertions.assertEquals("cyztsfmznbaeqp", response.iterator().next().display().provider());
- Assertions.assertEquals("hqnrn", response.iterator().next().display().resource());
- Assertions.assertEquals("x", response.iterator().next().display().operation());
- Assertions.assertEquals("uwrykqgaifmvikl", response.iterator().next().display().description());
- Assertions.assertEquals("dvk", response.iterator().next().origin());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PatchModelTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PatchModelTests.java
deleted file mode 100644
index d1db96b6d5b0..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PatchModelTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.AppliedScopeProperties;
-import com.azure.resourcemanager.reservations.models.AppliedScopeType;
-import com.azure.resourcemanager.reservations.models.InstanceFlexibility;
-import com.azure.resourcemanager.reservations.models.PatchModel;
-import com.azure.resourcemanager.reservations.models.PatchPropertiesRenewProperties;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class PatchModelTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PatchModel model =
- BinaryData
- .fromString(
- "{\"properties\":{\"appliedScopeType\":\"ManagementGroup\",\"appliedScopes\":[\"xzko\"],\"appliedScopeProperties\":{\"tenantId\":\"uko\",\"managementGroupId\":\"yaxuconuqszfkb\",\"subscriptionId\":\"pewr\",\"resourceGroupId\":\"mwvvjektcxsenhw\",\"displayName\":\"s\"},\"instanceFlexibility\":\"Off\",\"name\":\"pwvlqdq\",\"renew\":true,\"renewProperties\":{},\"reviewDateTime\":\"2021-02-23T11:21:53Z\"}}")
- .toObject(PatchModel.class);
- Assertions.assertEquals(AppliedScopeType.MANAGEMENT_GROUP, model.appliedScopeType());
- Assertions.assertEquals("xzko", model.appliedScopes().get(0));
- Assertions.assertEquals("uko", model.appliedScopeProperties().tenantId());
- Assertions.assertEquals("yaxuconuqszfkb", model.appliedScopeProperties().managementGroupId());
- Assertions.assertEquals("pewr", model.appliedScopeProperties().subscriptionId());
- Assertions.assertEquals("mwvvjektcxsenhw", model.appliedScopeProperties().resourceGroupId());
- Assertions.assertEquals("s", model.appliedScopeProperties().displayName());
- Assertions.assertEquals(InstanceFlexibility.OFF, model.instanceFlexibility());
- Assertions.assertEquals("pwvlqdq", model.name());
- Assertions.assertEquals(true, model.renew());
- Assertions.assertEquals(OffsetDateTime.parse("2021-02-23T11:21:53Z"), model.reviewDateTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PatchModel model =
- new PatchModel()
- .withAppliedScopeType(AppliedScopeType.MANAGEMENT_GROUP)
- .withAppliedScopes(Arrays.asList("xzko"))
- .withAppliedScopeProperties(
- new AppliedScopeProperties()
- .withTenantId("uko")
- .withManagementGroupId("yaxuconuqszfkb")
- .withSubscriptionId("pewr")
- .withResourceGroupId("mwvvjektcxsenhw")
- .withDisplayName("s"))
- .withInstanceFlexibility(InstanceFlexibility.OFF)
- .withName("pwvlqdq")
- .withRenew(true)
- .withRenewProperties(new PatchPropertiesRenewProperties())
- .withReviewDateTime(OffsetDateTime.parse("2021-02-23T11:21:53Z"));
- model = BinaryData.fromObject(model).toObject(PatchModel.class);
- Assertions.assertEquals(AppliedScopeType.MANAGEMENT_GROUP, model.appliedScopeType());
- Assertions.assertEquals("xzko", model.appliedScopes().get(0));
- Assertions.assertEquals("uko", model.appliedScopeProperties().tenantId());
- Assertions.assertEquals("yaxuconuqszfkb", model.appliedScopeProperties().managementGroupId());
- Assertions.assertEquals("pewr", model.appliedScopeProperties().subscriptionId());
- Assertions.assertEquals("mwvvjektcxsenhw", model.appliedScopeProperties().resourceGroupId());
- Assertions.assertEquals("s", model.appliedScopeProperties().displayName());
- Assertions.assertEquals(InstanceFlexibility.OFF, model.instanceFlexibility());
- Assertions.assertEquals("pwvlqdq", model.name());
- Assertions.assertEquals(true, model.renew());
- Assertions.assertEquals(OffsetDateTime.parse("2021-02-23T11:21:53Z"), model.reviewDateTime());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PatchPropertiesRenewPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PatchPropertiesRenewPropertiesTests.java
deleted file mode 100644
index b4f3edcfd253..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PatchPropertiesRenewPropertiesTests.java
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.AppliedScopeType;
-import com.azure.resourcemanager.reservations.models.PatchPropertiesRenewProperties;
-import com.azure.resourcemanager.reservations.models.PurchaseRequest;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import com.azure.resourcemanager.reservations.models.ReservedResourceType;
-import com.azure.resourcemanager.reservations.models.SkuName;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class PatchPropertiesRenewPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PatchPropertiesRenewProperties model =
- BinaryData
- .fromString(
- "{\"purchaseProperties\":{\"sku\":{\"name\":\"pvecxgodeb\"},\"location\":\"kk\",\"properties\":{\"reservedResourceType\":\"RedisCache\",\"billingScopeId\":\"kgriwflzlfbx\",\"term\":\"P5Y\",\"billingPlan\":\"Monthly\",\"quantity\":1610498845,\"displayName\":\"pnq\",\"appliedScopeType\":\"ManagementGroup\",\"appliedScopes\":[\"kbrpyydhibnuq\",\"kpikadrgvt\"],\"renew\":false,\"reviewDateTime\":\"2021-11-05T12:10:44Z\"}}}")
- .toObject(PatchPropertiesRenewProperties.class);
- Assertions.assertEquals("pvecxgodeb", model.purchaseProperties().sku().name());
- Assertions.assertEquals("kk", model.purchaseProperties().location());
- Assertions.assertEquals(ReservedResourceType.REDIS_CACHE, model.purchaseProperties().reservedResourceType());
- Assertions.assertEquals("kgriwflzlfbx", model.purchaseProperties().billingScopeId());
- Assertions.assertEquals(ReservationTerm.P5Y, model.purchaseProperties().term());
- Assertions.assertEquals(ReservationBillingPlan.MONTHLY, model.purchaseProperties().billingPlan());
- Assertions.assertEquals(1610498845, model.purchaseProperties().quantity());
- Assertions.assertEquals("pnq", model.purchaseProperties().displayName());
- Assertions.assertEquals(AppliedScopeType.MANAGEMENT_GROUP, model.purchaseProperties().appliedScopeType());
- Assertions.assertEquals("kbrpyydhibnuq", model.purchaseProperties().appliedScopes().get(0));
- Assertions.assertEquals(false, model.purchaseProperties().renew());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-11-05T12:10:44Z"), model.purchaseProperties().reviewDateTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PatchPropertiesRenewProperties model =
- new PatchPropertiesRenewProperties()
- .withPurchaseProperties(
- new PurchaseRequest()
- .withSku(new SkuName().withName("pvecxgodeb"))
- .withLocation("kk")
- .withReservedResourceType(ReservedResourceType.REDIS_CACHE)
- .withBillingScopeId("kgriwflzlfbx")
- .withTerm(ReservationTerm.P5Y)
- .withBillingPlan(ReservationBillingPlan.MONTHLY)
- .withQuantity(1610498845)
- .withDisplayName("pnq")
- .withAppliedScopeType(AppliedScopeType.MANAGEMENT_GROUP)
- .withAppliedScopes(Arrays.asList("kbrpyydhibnuq", "kpikadrgvt"))
- .withRenew(false)
- .withReviewDateTime(OffsetDateTime.parse("2021-11-05T12:10:44Z")));
- model = BinaryData.fromObject(model).toObject(PatchPropertiesRenewProperties.class);
- Assertions.assertEquals("pvecxgodeb", model.purchaseProperties().sku().name());
- Assertions.assertEquals("kk", model.purchaseProperties().location());
- Assertions.assertEquals(ReservedResourceType.REDIS_CACHE, model.purchaseProperties().reservedResourceType());
- Assertions.assertEquals("kgriwflzlfbx", model.purchaseProperties().billingScopeId());
- Assertions.assertEquals(ReservationTerm.P5Y, model.purchaseProperties().term());
- Assertions.assertEquals(ReservationBillingPlan.MONTHLY, model.purchaseProperties().billingPlan());
- Assertions.assertEquals(1610498845, model.purchaseProperties().quantity());
- Assertions.assertEquals("pnq", model.purchaseProperties().displayName());
- Assertions.assertEquals(AppliedScopeType.MANAGEMENT_GROUP, model.purchaseProperties().appliedScopeType());
- Assertions.assertEquals("kbrpyydhibnuq", model.purchaseProperties().appliedScopes().get(0));
- Assertions.assertEquals(false, model.purchaseProperties().renew());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-11-05T12:10:44Z"), model.purchaseProperties().reviewDateTime());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PatchPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PatchPropertiesTests.java
deleted file mode 100644
index 68e959ed0280..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PatchPropertiesTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.PatchProperties;
-import com.azure.resourcemanager.reservations.models.AppliedScopeProperties;
-import com.azure.resourcemanager.reservations.models.AppliedScopeType;
-import com.azure.resourcemanager.reservations.models.InstanceFlexibility;
-import com.azure.resourcemanager.reservations.models.PatchPropertiesRenewProperties;
-import com.azure.resourcemanager.reservations.models.PurchaseRequest;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class PatchPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PatchProperties model =
- BinaryData
- .fromString(
- "{\"appliedScopeType\":\"ManagementGroup\",\"appliedScopes\":[\"tcktvfcivfsnky\",\"uctqhjfbe\",\"rjcxerfuwu\",\"ttxfvjr\"],\"appliedScopeProperties\":{\"tenantId\":\"phxepcyvahf\",\"managementGroupId\":\"jky\",\"subscriptionId\":\"j\",\"resourceGroupId\":\"ujqgidok\",\"displayName\":\"ljyoxgvcltb\"},\"instanceFlexibility\":\"On\",\"name\":\"ghkjeszzhbi\",\"renew\":false,\"renewProperties\":{\"purchaseProperties\":{\"location\":\"xbf\"}},\"reviewDateTime\":\"2021-05-15T12:37:03Z\"}")
- .toObject(PatchProperties.class);
- Assertions.assertEquals(AppliedScopeType.MANAGEMENT_GROUP, model.appliedScopeType());
- Assertions.assertEquals("tcktvfcivfsnky", model.appliedScopes().get(0));
- Assertions.assertEquals("phxepcyvahf", model.appliedScopeProperties().tenantId());
- Assertions.assertEquals("jky", model.appliedScopeProperties().managementGroupId());
- Assertions.assertEquals("j", model.appliedScopeProperties().subscriptionId());
- Assertions.assertEquals("ujqgidok", model.appliedScopeProperties().resourceGroupId());
- Assertions.assertEquals("ljyoxgvcltb", model.appliedScopeProperties().displayName());
- Assertions.assertEquals(InstanceFlexibility.ON, model.instanceFlexibility());
- Assertions.assertEquals("ghkjeszzhbi", model.name());
- Assertions.assertEquals(false, model.renew());
- Assertions.assertEquals("xbf", model.renewProperties().purchaseProperties().location());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T12:37:03Z"), model.reviewDateTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PatchProperties model =
- new PatchProperties()
- .withAppliedScopeType(AppliedScopeType.MANAGEMENT_GROUP)
- .withAppliedScopes(Arrays.asList("tcktvfcivfsnky", "uctqhjfbe", "rjcxerfuwu", "ttxfvjr"))
- .withAppliedScopeProperties(
- new AppliedScopeProperties()
- .withTenantId("phxepcyvahf")
- .withManagementGroupId("jky")
- .withSubscriptionId("j")
- .withResourceGroupId("ujqgidok")
- .withDisplayName("ljyoxgvcltb"))
- .withInstanceFlexibility(InstanceFlexibility.ON)
- .withName("ghkjeszzhbi")
- .withRenew(false)
- .withRenewProperties(
- new PatchPropertiesRenewProperties()
- .withPurchaseProperties(new PurchaseRequest().withLocation("xbf")))
- .withReviewDateTime(OffsetDateTime.parse("2021-05-15T12:37:03Z"));
- model = BinaryData.fromObject(model).toObject(PatchProperties.class);
- Assertions.assertEquals(AppliedScopeType.MANAGEMENT_GROUP, model.appliedScopeType());
- Assertions.assertEquals("tcktvfcivfsnky", model.appliedScopes().get(0));
- Assertions.assertEquals("phxepcyvahf", model.appliedScopeProperties().tenantId());
- Assertions.assertEquals("jky", model.appliedScopeProperties().managementGroupId());
- Assertions.assertEquals("j", model.appliedScopeProperties().subscriptionId());
- Assertions.assertEquals("ujqgidok", model.appliedScopeProperties().resourceGroupId());
- Assertions.assertEquals("ljyoxgvcltb", model.appliedScopeProperties().displayName());
- Assertions.assertEquals(InstanceFlexibility.ON, model.instanceFlexibility());
- Assertions.assertEquals("ghkjeszzhbi", model.name());
- Assertions.assertEquals(false, model.renew());
- Assertions.assertEquals("xbf", model.renewProperties().purchaseProperties().location());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T12:37:03Z"), model.reviewDateTime());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PurchaseRequestPropertiesReservedResourcePropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PurchaseRequestPropertiesReservedResourcePropertiesTests.java
deleted file mode 100644
index cb5acc6bb290..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PurchaseRequestPropertiesReservedResourcePropertiesTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.InstanceFlexibility;
-import com.azure.resourcemanager.reservations.models.PurchaseRequestPropertiesReservedResourceProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class PurchaseRequestPropertiesReservedResourcePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PurchaseRequestPropertiesReservedResourceProperties model =
- BinaryData
- .fromString("{\"instanceFlexibility\":\"Off\"}")
- .toObject(PurchaseRequestPropertiesReservedResourceProperties.class);
- Assertions.assertEquals(InstanceFlexibility.OFF, model.instanceFlexibility());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PurchaseRequestPropertiesReservedResourceProperties model =
- new PurchaseRequestPropertiesReservedResourceProperties().withInstanceFlexibility(InstanceFlexibility.OFF);
- model = BinaryData.fromObject(model).toObject(PurchaseRequestPropertiesReservedResourceProperties.class);
- Assertions.assertEquals(InstanceFlexibility.OFF, model.instanceFlexibility());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PurchaseRequestPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PurchaseRequestPropertiesTests.java
deleted file mode 100644
index 0c309a276aa9..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PurchaseRequestPropertiesTests.java
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.PurchaseRequestProperties;
-import com.azure.resourcemanager.reservations.models.AppliedScopeProperties;
-import com.azure.resourcemanager.reservations.models.AppliedScopeType;
-import com.azure.resourcemanager.reservations.models.InstanceFlexibility;
-import com.azure.resourcemanager.reservations.models.PurchaseRequestPropertiesReservedResourceProperties;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import com.azure.resourcemanager.reservations.models.ReservedResourceType;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class PurchaseRequestPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PurchaseRequestProperties model =
- BinaryData
- .fromString(
- "{\"reservedResourceType\":\"SqlEdge\",\"billingScopeId\":\"wckbasyypnd\",\"term\":\"P3Y\",\"billingPlan\":\"Monthly\",\"quantity\":531743918,\"displayName\":\"phejkotynqgoulz\",\"appliedScopeType\":\"Shared\",\"appliedScopes\":[\"wyqkgfgibm\"],\"appliedScopeProperties\":{\"tenantId\":\"akeqs\",\"managementGroupId\":\"yb\",\"subscriptionId\":\"qedqytbciqfoufl\",\"resourceGroupId\":\"nkzsmodmglou\",\"displayName\":\"b\"},\"renew\":false,\"reservedResourceProperties\":{\"instanceFlexibility\":\"Off\"},\"reviewDateTime\":\"2021-12-01T15:01:53Z\"}")
- .toObject(PurchaseRequestProperties.class);
- Assertions.assertEquals(ReservedResourceType.SQL_EDGE, model.reservedResourceType());
- Assertions.assertEquals("wckbasyypnd", model.billingScopeId());
- Assertions.assertEquals(ReservationTerm.P3Y, model.term());
- Assertions.assertEquals(ReservationBillingPlan.MONTHLY, model.billingPlan());
- Assertions.assertEquals(531743918, model.quantity());
- Assertions.assertEquals("phejkotynqgoulz", model.displayName());
- Assertions.assertEquals(AppliedScopeType.SHARED, model.appliedScopeType());
- Assertions.assertEquals("wyqkgfgibm", model.appliedScopes().get(0));
- Assertions.assertEquals("akeqs", model.appliedScopeProperties().tenantId());
- Assertions.assertEquals("yb", model.appliedScopeProperties().managementGroupId());
- Assertions.assertEquals("qedqytbciqfoufl", model.appliedScopeProperties().subscriptionId());
- Assertions.assertEquals("nkzsmodmglou", model.appliedScopeProperties().resourceGroupId());
- Assertions.assertEquals("b", model.appliedScopeProperties().displayName());
- Assertions.assertEquals(false, model.renew());
- Assertions.assertEquals(InstanceFlexibility.OFF, model.reservedResourceProperties().instanceFlexibility());
- Assertions.assertEquals(OffsetDateTime.parse("2021-12-01T15:01:53Z"), model.reviewDateTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PurchaseRequestProperties model =
- new PurchaseRequestProperties()
- .withReservedResourceType(ReservedResourceType.SQL_EDGE)
- .withBillingScopeId("wckbasyypnd")
- .withTerm(ReservationTerm.P3Y)
- .withBillingPlan(ReservationBillingPlan.MONTHLY)
- .withQuantity(531743918)
- .withDisplayName("phejkotynqgoulz")
- .withAppliedScopeType(AppliedScopeType.SHARED)
- .withAppliedScopes(Arrays.asList("wyqkgfgibm"))
- .withAppliedScopeProperties(
- new AppliedScopeProperties()
- .withTenantId("akeqs")
- .withManagementGroupId("yb")
- .withSubscriptionId("qedqytbciqfoufl")
- .withResourceGroupId("nkzsmodmglou")
- .withDisplayName("b"))
- .withRenew(false)
- .withReservedResourceProperties(
- new PurchaseRequestPropertiesReservedResourceProperties()
- .withInstanceFlexibility(InstanceFlexibility.OFF))
- .withReviewDateTime(OffsetDateTime.parse("2021-12-01T15:01:53Z"));
- model = BinaryData.fromObject(model).toObject(PurchaseRequestProperties.class);
- Assertions.assertEquals(ReservedResourceType.SQL_EDGE, model.reservedResourceType());
- Assertions.assertEquals("wckbasyypnd", model.billingScopeId());
- Assertions.assertEquals(ReservationTerm.P3Y, model.term());
- Assertions.assertEquals(ReservationBillingPlan.MONTHLY, model.billingPlan());
- Assertions.assertEquals(531743918, model.quantity());
- Assertions.assertEquals("phejkotynqgoulz", model.displayName());
- Assertions.assertEquals(AppliedScopeType.SHARED, model.appliedScopeType());
- Assertions.assertEquals("wyqkgfgibm", model.appliedScopes().get(0));
- Assertions.assertEquals("akeqs", model.appliedScopeProperties().tenantId());
- Assertions.assertEquals("yb", model.appliedScopeProperties().managementGroupId());
- Assertions.assertEquals("qedqytbciqfoufl", model.appliedScopeProperties().subscriptionId());
- Assertions.assertEquals("nkzsmodmglou", model.appliedScopeProperties().resourceGroupId());
- Assertions.assertEquals("b", model.appliedScopeProperties().displayName());
- Assertions.assertEquals(false, model.renew());
- Assertions.assertEquals(InstanceFlexibility.OFF, model.reservedResourceProperties().instanceFlexibility());
- Assertions.assertEquals(OffsetDateTime.parse("2021-12-01T15:01:53Z"), model.reviewDateTime());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PurchaseRequestTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PurchaseRequestTests.java
deleted file mode 100644
index fa487605d160..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/PurchaseRequestTests.java
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.AppliedScopeProperties;
-import com.azure.resourcemanager.reservations.models.AppliedScopeType;
-import com.azure.resourcemanager.reservations.models.InstanceFlexibility;
-import com.azure.resourcemanager.reservations.models.PurchaseRequest;
-import com.azure.resourcemanager.reservations.models.PurchaseRequestPropertiesReservedResourceProperties;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import com.azure.resourcemanager.reservations.models.ReservedResourceType;
-import com.azure.resourcemanager.reservations.models.SkuName;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class PurchaseRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PurchaseRequest model =
- BinaryData
- .fromString(
- "{\"sku\":{\"name\":\"wnzlljfmppeeb\"},\"location\":\"gxsabkyq\",\"properties\":{\"reservedResourceType\":\"AVS\",\"billingScopeId\":\"tcj\",\"term\":\"P3Y\",\"billingPlan\":\"Upfront\",\"quantity\":1471497811,\"displayName\":\"hkr\",\"appliedScopeType\":\"Single\",\"appliedScopes\":[\"p\",\"sbdkvwr\",\"jfeusnh\"],\"appliedScopeProperties\":{\"tenantId\":\"eltmrldhugjzzdat\",\"managementGroupId\":\"hocdgeab\",\"subscriptionId\":\"phut\",\"resourceGroupId\":\"ndv\",\"displayName\":\"ozwyiftyhxhuro\"},\"renew\":true,\"reservedResourceProperties\":{\"instanceFlexibility\":\"Off\"},\"reviewDateTime\":\"2021-05-10T01:46:35Z\"}}")
- .toObject(PurchaseRequest.class);
- Assertions.assertEquals("wnzlljfmppeeb", model.sku().name());
- Assertions.assertEquals("gxsabkyq", model.location());
- Assertions.assertEquals(ReservedResourceType.AVS, model.reservedResourceType());
- Assertions.assertEquals("tcj", model.billingScopeId());
- Assertions.assertEquals(ReservationTerm.P3Y, model.term());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, model.billingPlan());
- Assertions.assertEquals(1471497811, model.quantity());
- Assertions.assertEquals("hkr", model.displayName());
- Assertions.assertEquals(AppliedScopeType.SINGLE, model.appliedScopeType());
- Assertions.assertEquals("p", model.appliedScopes().get(0));
- Assertions.assertEquals("eltmrldhugjzzdat", model.appliedScopeProperties().tenantId());
- Assertions.assertEquals("hocdgeab", model.appliedScopeProperties().managementGroupId());
- Assertions.assertEquals("phut", model.appliedScopeProperties().subscriptionId());
- Assertions.assertEquals("ndv", model.appliedScopeProperties().resourceGroupId());
- Assertions.assertEquals("ozwyiftyhxhuro", model.appliedScopeProperties().displayName());
- Assertions.assertEquals(true, model.renew());
- Assertions.assertEquals(InstanceFlexibility.OFF, model.reservedResourceProperties().instanceFlexibility());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-10T01:46:35Z"), model.reviewDateTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PurchaseRequest model =
- new PurchaseRequest()
- .withSku(new SkuName().withName("wnzlljfmppeeb"))
- .withLocation("gxsabkyq")
- .withReservedResourceType(ReservedResourceType.AVS)
- .withBillingScopeId("tcj")
- .withTerm(ReservationTerm.P3Y)
- .withBillingPlan(ReservationBillingPlan.UPFRONT)
- .withQuantity(1471497811)
- .withDisplayName("hkr")
- .withAppliedScopeType(AppliedScopeType.SINGLE)
- .withAppliedScopes(Arrays.asList("p", "sbdkvwr", "jfeusnh"))
- .withAppliedScopeProperties(
- new AppliedScopeProperties()
- .withTenantId("eltmrldhugjzzdat")
- .withManagementGroupId("hocdgeab")
- .withSubscriptionId("phut")
- .withResourceGroupId("ndv")
- .withDisplayName("ozwyiftyhxhuro"))
- .withRenew(true)
- .withReservedResourceProperties(
- new PurchaseRequestPropertiesReservedResourceProperties()
- .withInstanceFlexibility(InstanceFlexibility.OFF))
- .withReviewDateTime(OffsetDateTime.parse("2021-05-10T01:46:35Z"));
- model = BinaryData.fromObject(model).toObject(PurchaseRequest.class);
- Assertions.assertEquals("wnzlljfmppeeb", model.sku().name());
- Assertions.assertEquals("gxsabkyq", model.location());
- Assertions.assertEquals(ReservedResourceType.AVS, model.reservedResourceType());
- Assertions.assertEquals("tcj", model.billingScopeId());
- Assertions.assertEquals(ReservationTerm.P3Y, model.term());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, model.billingPlan());
- Assertions.assertEquals(1471497811, model.quantity());
- Assertions.assertEquals("hkr", model.displayName());
- Assertions.assertEquals(AppliedScopeType.SINGLE, model.appliedScopeType());
- Assertions.assertEquals("p", model.appliedScopes().get(0));
- Assertions.assertEquals("eltmrldhugjzzdat", model.appliedScopeProperties().tenantId());
- Assertions.assertEquals("hocdgeab", model.appliedScopeProperties().managementGroupId());
- Assertions.assertEquals("phut", model.appliedScopeProperties().subscriptionId());
- Assertions.assertEquals("ndv", model.appliedScopeProperties().resourceGroupId());
- Assertions.assertEquals("ozwyiftyhxhuro", model.appliedScopeProperties().displayName());
- Assertions.assertEquals(true, model.renew());
- Assertions.assertEquals(InstanceFlexibility.OFF, model.reservedResourceProperties().instanceFlexibility());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-10T01:46:35Z"), model.reviewDateTime());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaLimitsTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaLimitsTests.java
deleted file mode 100644
index 730643f410e9..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaLimitsTests.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.CurrentQuotaLimitBaseInner;
-import com.azure.resourcemanager.reservations.models.QuotaLimits;
-import com.azure.resourcemanager.reservations.models.QuotaProperties;
-import com.azure.resourcemanager.reservations.models.ResourceType;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class QuotaLimitsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- QuotaLimits model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"limit\":988494266,\"currentValue\":1400063393,\"unit\":\"qudf\",\"resourceType\":\"serviceSpecific\",\"quotaPeriod\":\"aaabjyvayff\",\"properties\":\"datarzrtuzqogsex\"},\"id\":\"evfdnwnwm\",\"name\":\"wzsyyceuzs\",\"type\":\"i\"}],\"nextLink\":\"ud\"}")
- .toObject(QuotaLimits.class);
- Assertions.assertEquals(988494266, model.value().get(0).properties().limit());
- Assertions.assertEquals("qudf", model.value().get(0).properties().unit());
- Assertions.assertEquals(ResourceType.SERVICE_SPECIFIC, model.value().get(0).properties().resourceType());
- Assertions.assertEquals("ud", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- QuotaLimits model =
- new QuotaLimits()
- .withValue(
- Arrays
- .asList(
- new CurrentQuotaLimitBaseInner()
- .withProperties(
- new QuotaProperties()
- .withLimit(988494266)
- .withUnit("qudf")
- .withResourceType(ResourceType.SERVICE_SPECIFIC)
- .withProperties("datarzrtuzqogsex"))))
- .withNextLink("ud");
- model = BinaryData.fromObject(model).toObject(QuotaLimits.class);
- Assertions.assertEquals(988494266, model.value().get(0).properties().limit());
- Assertions.assertEquals("qudf", model.value().get(0).properties().unit());
- Assertions.assertEquals(ResourceType.SERVICE_SPECIFIC, model.value().get(0).properties().resourceType());
- Assertions.assertEquals("ud", model.nextLink());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaPropertiesTests.java
deleted file mode 100644
index a167b45034df..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaPropertiesTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.QuotaProperties;
-import com.azure.resourcemanager.reservations.models.ResourceName;
-import com.azure.resourcemanager.reservations.models.ResourceType;
-import org.junit.jupiter.api.Assertions;
-
-public final class QuotaPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- QuotaProperties model =
- BinaryData
- .fromString(
- "{\"limit\":2056764824,\"currentValue\":344602824,\"unit\":\"zikhl\",\"name\":{\"value\":\"hdgqggeb\",\"localizedValue\":\"nyga\"},\"resourceType\":\"lowPriority\",\"quotaPeriod\":\"bqfatpxllrxcyjmo\",\"properties\":\"datasu\"}")
- .toObject(QuotaProperties.class);
- Assertions.assertEquals(2056764824, model.limit());
- Assertions.assertEquals("zikhl", model.unit());
- Assertions.assertEquals("hdgqggeb", model.name().value());
- Assertions.assertEquals(ResourceType.LOW_PRIORITY, model.resourceType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- QuotaProperties model =
- new QuotaProperties()
- .withLimit(2056764824)
- .withUnit("zikhl")
- .withName(new ResourceName().withValue("hdgqggeb"))
- .withResourceType(ResourceType.LOW_PRIORITY)
- .withProperties("datasu");
- model = BinaryData.fromObject(model).toObject(QuotaProperties.class);
- Assertions.assertEquals(2056764824, model.limit());
- Assertions.assertEquals("zikhl", model.unit());
- Assertions.assertEquals("hdgqggeb", model.name().value());
- Assertions.assertEquals(ResourceType.LOW_PRIORITY, model.resourceType());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestDetailsInnerTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestDetailsInnerTests.java
deleted file mode 100644
index a6cb8be5a93a..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestDetailsInnerTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.QuotaRequestDetailsInner;
-import com.azure.resourcemanager.reservations.models.QuotaRequestState;
-import com.azure.resourcemanager.reservations.models.SubRequest;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class QuotaRequestDetailsInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- QuotaRequestDetailsInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"provisioningState\":\"Succeeded\",\"message\":\"rthzvaytdwkqbrqu\",\"requestSubmitTime\":\"2021-01-20T18:23:45Z\",\"value\":[{\"limit\":1398139013,\"resourceType\":\"livpdt\",\"unit\":\"r\",\"provisioningState\":\"Invalid\",\"message\":\"oaxoruzfgsqu\",\"subRequestId\":\"xrxxlep\"}]},\"id\":\"ramxjezwlwnw\",\"name\":\"uqlcvydy\",\"type\":\"atdooaojkniod\"}")
- .toObject(QuotaRequestDetailsInner.class);
- Assertions.assertEquals(QuotaRequestState.SUCCEEDED, model.provisioningState());
- Assertions.assertEquals("r", model.value().get(0).unit());
- Assertions.assertEquals(QuotaRequestState.INVALID, model.value().get(0).provisioningState());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- QuotaRequestDetailsInner model =
- new QuotaRequestDetailsInner()
- .withProvisioningState(QuotaRequestState.SUCCEEDED)
- .withValue(
- Arrays.asList(new SubRequest().withUnit("r").withProvisioningState(QuotaRequestState.INVALID)));
- model = BinaryData.fromObject(model).toObject(QuotaRequestDetailsInner.class);
- Assertions.assertEquals(QuotaRequestState.SUCCEEDED, model.provisioningState());
- Assertions.assertEquals("r", model.value().get(0).unit());
- Assertions.assertEquals(QuotaRequestState.INVALID, model.value().get(0).provisioningState());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestDetailsListTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestDetailsListTests.java
deleted file mode 100644
index d4c79dd281e3..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestDetailsListTests.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.QuotaRequestDetailsInner;
-import com.azure.resourcemanager.reservations.models.QuotaRequestDetailsList;
-import com.azure.resourcemanager.reservations.models.QuotaRequestState;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class QuotaRequestDetailsListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- QuotaRequestDetailsList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"message\":\"ncormrlxqtvcof\",\"requestSubmitTime\":\"2021-04-19T01:16:51Z\",\"value\":[]},\"id\":\"vkg\",\"name\":\"u\",\"type\":\"gdknnqv\"},{\"properties\":{\"provisioningState\":\"Failed\",\"message\":\"n\",\"requestSubmitTime\":\"2021-11-22T10:46:24Z\",\"value\":[]},\"id\":\"dsg\",\"name\":\"a\",\"type\":\"mkycgra\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"message\":\"taeburuvdm\",\"requestSubmitTime\":\"2021-03-10T19:42:31Z\",\"value\":[]},\"id\":\"zlxwabmqoefkifr\",\"name\":\"tpuqujmq\",\"type\":\"gkfbtndoaong\"}],\"nextLink\":\"cn\"}")
- .toObject(QuotaRequestDetailsList.class);
- Assertions.assertEquals(QuotaRequestState.ACCEPTED, model.value().get(0).provisioningState());
- Assertions.assertEquals("cn", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- QuotaRequestDetailsList model =
- new QuotaRequestDetailsList()
- .withValue(
- Arrays
- .asList(
- new QuotaRequestDetailsInner()
- .withProvisioningState(QuotaRequestState.ACCEPTED)
- .withValue(Arrays.asList()),
- new QuotaRequestDetailsInner()
- .withProvisioningState(QuotaRequestState.FAILED)
- .withValue(Arrays.asList()),
- new QuotaRequestDetailsInner()
- .withProvisioningState(QuotaRequestState.SUCCEEDED)
- .withValue(Arrays.asList())))
- .withNextLink("cn");
- model = BinaryData.fromObject(model).toObject(QuotaRequestDetailsList.class);
- Assertions.assertEquals(QuotaRequestState.ACCEPTED, model.value().get(0).provisioningState());
- Assertions.assertEquals("cn", model.nextLink());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestPropertiesTests.java
deleted file mode 100644
index 77afc6a9e449..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestPropertiesTests.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.QuotaRequestProperties;
-import com.azure.resourcemanager.reservations.models.QuotaRequestState;
-import com.azure.resourcemanager.reservations.models.ResourceName;
-import com.azure.resourcemanager.reservations.models.SubRequest;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class QuotaRequestPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- QuotaRequestProperties model =
- BinaryData
- .fromString(
- "{\"provisioningState\":\"Invalid\",\"message\":\"bw\",\"requestSubmitTime\":\"2021-01-14T23:54:10Z\",\"value\":[{\"limit\":1628734797,\"name\":{\"value\":\"vdkcrodtj\",\"localizedValue\":\"fw\"},\"resourceType\":\"fltkacjv\",\"unit\":\"kdlfoa\",\"provisioningState\":\"Failed\",\"message\":\"fpagaowpulp\",\"subRequestId\":\"lyls\"},{\"limit\":168865106,\"name\":{\"value\":\"nsj\",\"localizedValue\":\"vti\"},\"resourceType\":\"xsdszuempsb\",\"unit\":\"f\",\"provisioningState\":\"Succeeded\",\"message\":\"v\",\"subRequestId\":\"qi\"},{\"limit\":1110186498,\"name\":{\"value\":\"kjj\",\"localizedValue\":\"xrbuukzclew\"},\"resourceType\":\"mlwpazt\",\"unit\":\"ofncckwyfzqwhxxb\",\"provisioningState\":\"Failed\",\"message\":\"xzfe\",\"subRequestId\":\"tpp\"}]}")
- .toObject(QuotaRequestProperties.class);
- Assertions.assertEquals(QuotaRequestState.INVALID, model.provisioningState());
- Assertions.assertEquals("vdkcrodtj", model.value().get(0).name().value());
- Assertions.assertEquals("kdlfoa", model.value().get(0).unit());
- Assertions.assertEquals(QuotaRequestState.FAILED, model.value().get(0).provisioningState());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- QuotaRequestProperties model =
- new QuotaRequestProperties()
- .withProvisioningState(QuotaRequestState.INVALID)
- .withValue(
- Arrays
- .asList(
- new SubRequest()
- .withName(new ResourceName().withValue("vdkcrodtj"))
- .withUnit("kdlfoa")
- .withProvisioningState(QuotaRequestState.FAILED),
- new SubRequest()
- .withName(new ResourceName().withValue("nsj"))
- .withUnit("f")
- .withProvisioningState(QuotaRequestState.SUCCEEDED),
- new SubRequest()
- .withName(new ResourceName().withValue("kjj"))
- .withUnit("ofncckwyfzqwhxxb")
- .withProvisioningState(QuotaRequestState.FAILED)));
- model = BinaryData.fromObject(model).toObject(QuotaRequestProperties.class);
- Assertions.assertEquals(QuotaRequestState.INVALID, model.provisioningState());
- Assertions.assertEquals("vdkcrodtj", model.value().get(0).name().value());
- Assertions.assertEquals("kdlfoa", model.value().get(0).unit());
- Assertions.assertEquals(QuotaRequestState.FAILED, model.value().get(0).provisioningState());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestStatusDetailsTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestStatusDetailsTests.java
deleted file mode 100644
index e67688c64cbf..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestStatusDetailsTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.QuotaRequestStatusDetails;
-
-public final class QuotaRequestStatusDetailsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- QuotaRequestStatusDetails model =
- BinaryData
- .fromString("{\"provisioningState\":\"Accepted\",\"message\":\"lkrm\"}")
- .toObject(QuotaRequestStatusDetails.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- QuotaRequestStatusDetails model = new QuotaRequestStatusDetails();
- model = BinaryData.fromObject(model).toObject(QuotaRequestStatusDetails.class);
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestStatusGetWithResponseMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestStatusGetWithResponseMockTests.java
deleted file mode 100644
index fd11cfd13821..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestStatusGetWithResponseMockTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.QuotaRequestDetails;
-import com.azure.resourcemanager.reservations.models.QuotaRequestState;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class QuotaRequestStatusGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Succeeded\",\"message\":\"sbpimlq\",\"requestSubmitTime\":\"2021-02-24T02:21:25Z\",\"value\":[]},\"id\":\"cgxxlxs\",\"name\":\"fgcviz\",\"type\":\"zdwlvwlyoupfgfb\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- QuotaRequestDetails response =
- manager
- .quotaRequestStatus()
- .getWithResponse(
- "fscjfnynszquji", "dvoqyt", "byowbblgyavutp", "hjoxo", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(QuotaRequestState.SUCCEEDED, response.provisioningState());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestStatusListMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestStatusListMockTests.java
deleted file mode 100644
index 0aa4f0ee7145..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestStatusListMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.QuotaRequestDetails;
-import com.azure.resourcemanager.reservations.models.QuotaRequestState;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class QuotaRequestStatusListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"message\":\"xitmmqtgqqq\",\"requestSubmitTime\":\"2021-09-05T22:16:51Z\",\"value\":[]},\"id\":\"rxcpjuisavo\",\"name\":\"qdzfvazivjlfrqtt\",\"type\":\"ajlkatnw\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .quotaRequestStatus()
- .list("jub", "yhgk", "minsgowzf", "tsttktlahbq", 520028629, "tx", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(QuotaRequestState.ACCEPTED, response.iterator().next().provisioningState());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestSubmitResponse201InnerTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestSubmitResponse201InnerTests.java
deleted file mode 100644
index d79042b9b73c..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotaRequestSubmitResponse201InnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.QuotaRequestSubmitResponse201Inner;
-
-public final class QuotaRequestSubmitResponse201InnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- QuotaRequestSubmitResponse201Inner model =
- BinaryData
- .fromString(
- "{\"id\":\"wlycoduhpkxkg\",\"name\":\"areqna\",\"type\":\"qugjhkycube\",\"properties\":{\"provisioningState\":\"InProgress\",\"message\":\"ofwq\"}}")
- .toObject(QuotaRequestSubmitResponse201Inner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- QuotaRequestSubmitResponse201Inner model = new QuotaRequestSubmitResponse201Inner();
- model = BinaryData.fromObject(model).toObject(QuotaRequestSubmitResponse201Inner.class);
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotasCreateOrUpdateMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotasCreateOrUpdateMockTests.java
deleted file mode 100644
index bb6e8a76c482..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotasCreateOrUpdateMockTests.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.CurrentQuotaLimitBase;
-import com.azure.resourcemanager.reservations.models.QuotaProperties;
-import com.azure.resourcemanager.reservations.models.ResourceName;
-import com.azure.resourcemanager.reservations.models.ResourceType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class QuotasCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"limit\":6777629,\"currentValue\":222178389,\"unit\":\"omi\",\"name\":{\"value\":\"ggdufiqndieu\",\"localizedValue\":\"ofjchvcyyysf\"},\"resourceType\":\"serviceSpecific\",\"quotaPeriod\":\"cubiipuipw\",\"properties\":\"dataonmacjekniz\"},\"id\":\"hqvcimpevfgmblr\",\"name\":\"ilbywdxsm\",\"type\":\"ccwr\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CurrentQuotaLimitBase response =
- manager
- .quotas()
- .define("ygdxpgpqchis")
- .withExistingLocation("pjuohminyfl", "orwmduvwpklv", "w")
- .withProperties(
- new QuotaProperties()
- .withLimit(879673215)
- .withUnit("crxgibb")
- .withName(new ResourceName().withValue("confozauors"))
- .withResourceType(ResourceType.DEDICATED)
- .withProperties("datahw"))
- .create();
-
- Assertions.assertEquals(6777629, response.properties().limit());
- Assertions.assertEquals("omi", response.properties().unit());
- Assertions.assertEquals("ggdufiqndieu", response.properties().name().value());
- Assertions.assertEquals(ResourceType.SERVICE_SPECIFIC, response.properties().resourceType());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotasGetWithResponseMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotasGetWithResponseMockTests.java
deleted file mode 100644
index 7bf3e9fea5a3..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotasGetWithResponseMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.CurrentQuotaLimitBase;
-import com.azure.resourcemanager.reservations.models.ResourceType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class QuotasGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"limit\":724220741,\"currentValue\":859061140,\"unit\":\"kkqfqjbvle\",\"name\":{\"value\":\"ml\",\"localizedValue\":\"qtqzfavyv\"},\"resourceType\":\"standard\",\"quotaPeriod\":\"bar\",\"properties\":\"datauayjkqa\"},\"id\":\"qgzsles\",\"name\":\"cbhernntiewdj\",\"type\":\"vbquwr\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CurrentQuotaLimitBase response =
- manager
- .quotas()
- .getWithResponse("rqjfsmlm", "txhwgfws", "tawc", "ezbrhubskh", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(724220741, response.properties().limit());
- Assertions.assertEquals("kkqfqjbvle", response.properties().unit());
- Assertions.assertEquals("ml", response.properties().name().value());
- Assertions.assertEquals(ResourceType.STANDARD, response.properties().resourceType());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotasListMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotasListMockTests.java
deleted file mode 100644
index 495b1cadc348..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/QuotasListMockTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.CurrentQuotaLimitBase;
-import com.azure.resourcemanager.reservations.models.ResourceType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class QuotasListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"limit\":647279453,\"currentValue\":730644177,\"unit\":\"ebjvewzcjzn\",\"name\":{\"value\":\"pmguaadraufac\",\"localizedValue\":\"ahzovajjziuxxp\"},\"resourceType\":\"serviceSpecific\",\"quotaPeriod\":\"e\",\"properties\":\"datalfg\"},\"id\":\"lqubkwdlen\",\"name\":\"d\",\"type\":\"utujba\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.quotas().list("ehwagoh", "uffkmrqemvvh", "xtdr", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(647279453, response.iterator().next().properties().limit());
- Assertions.assertEquals("ebjvewzcjzn", response.iterator().next().properties().unit());
- Assertions.assertEquals("pmguaadraufac", response.iterator().next().properties().name().value());
- Assertions.assertEquals(ResourceType.SERVICE_SPECIFIC, response.iterator().next().properties().resourceType());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/RefundRequestPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/RefundRequestPropertiesTests.java
deleted file mode 100644
index 0484d347f061..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/RefundRequestPropertiesTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.RefundRequestProperties;
-import com.azure.resourcemanager.reservations.models.ReservationToReturn;
-import org.junit.jupiter.api.Assertions;
-
-public final class RefundRequestPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RefundRequestProperties model =
- BinaryData
- .fromString(
- "{\"sessionId\":\"laocqxtccmg\",\"scope\":\"dxyt\",\"reservationToReturn\":{\"reservationId\":\"yrxvwfudwpznt\",\"quantity\":1417270726},\"returnReason\":\"hl\"}")
- .toObject(RefundRequestProperties.class);
- Assertions.assertEquals("laocqxtccmg", model.sessionId());
- Assertions.assertEquals("dxyt", model.scope());
- Assertions.assertEquals("yrxvwfudwpznt", model.reservationToReturn().reservationId());
- Assertions.assertEquals(1417270726, model.reservationToReturn().quantity());
- Assertions.assertEquals("hl", model.returnReason());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RefundRequestProperties model =
- new RefundRequestProperties()
- .withSessionId("laocqxtccmg")
- .withScope("dxyt")
- .withReservationToReturn(
- new ReservationToReturn().withReservationId("yrxvwfudwpznt").withQuantity(1417270726))
- .withReturnReason("hl");
- model = BinaryData.fromObject(model).toObject(RefundRequestProperties.class);
- Assertions.assertEquals("laocqxtccmg", model.sessionId());
- Assertions.assertEquals("dxyt", model.scope());
- Assertions.assertEquals("yrxvwfudwpznt", model.reservationToReturn().reservationId());
- Assertions.assertEquals(1417270726, model.reservationToReturn().quantity());
- Assertions.assertEquals("hl", model.returnReason());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/RefundRequestTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/RefundRequestTests.java
deleted file mode 100644
index 4d10e681fa7a..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/RefundRequestTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.RefundRequest;
-import com.azure.resourcemanager.reservations.models.RefundRequestProperties;
-import com.azure.resourcemanager.reservations.models.ReservationToReturn;
-import org.junit.jupiter.api.Assertions;
-
-public final class RefundRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RefundRequest model =
- BinaryData
- .fromString(
- "{\"properties\":{\"sessionId\":\"crpab\",\"scope\":\"epsbjtazqu\",\"reservationToReturn\":{\"reservationId\":\"wpmueefj\",\"quantity\":1541291640},\"returnReason\":\"kqujidsuyono\"}}")
- .toObject(RefundRequest.class);
- Assertions.assertEquals("crpab", model.properties().sessionId());
- Assertions.assertEquals("epsbjtazqu", model.properties().scope());
- Assertions.assertEquals("wpmueefj", model.properties().reservationToReturn().reservationId());
- Assertions.assertEquals(1541291640, model.properties().reservationToReturn().quantity());
- Assertions.assertEquals("kqujidsuyono", model.properties().returnReason());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RefundRequest model =
- new RefundRequest()
- .withProperties(
- new RefundRequestProperties()
- .withSessionId("crpab")
- .withScope("epsbjtazqu")
- .withReservationToReturn(
- new ReservationToReturn().withReservationId("wpmueefj").withQuantity(1541291640))
- .withReturnReason("kqujidsuyono"));
- model = BinaryData.fromObject(model).toObject(RefundRequest.class);
- Assertions.assertEquals("crpab", model.properties().sessionId());
- Assertions.assertEquals("epsbjtazqu", model.properties().scope());
- Assertions.assertEquals("wpmueefj", model.properties().reservationToReturn().reservationId());
- Assertions.assertEquals(1541291640, model.properties().reservationToReturn().quantity());
- Assertions.assertEquals("kqujidsuyono", model.properties().returnReason());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationListTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationListTests.java
deleted file mode 100644
index af21cb6ed9b1..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationListTests.java
+++ /dev/null
@@ -1,205 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.ReservationResponseInner;
-import com.azure.resourcemanager.reservations.models.AppliedScopeType;
-import com.azure.resourcemanager.reservations.models.InstanceFlexibility;
-import com.azure.resourcemanager.reservations.models.Kind;
-import com.azure.resourcemanager.reservations.models.ProvisioningState;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationList;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import com.azure.resourcemanager.reservations.models.ReservationsProperties;
-import com.azure.resourcemanager.reservations.models.ReservedResourceType;
-import com.azure.resourcemanager.reservations.models.SkuName;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ReservationListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ReservationList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"location\":\"wey\",\"etag\":1047075786,\"sku\":{\"name\":\"evfyexfwhybcib\"},\"properties\":{\"reservedResourceType\":\"DataFactory\",\"instanceFlexibility\":\"On\",\"displayName\":\"tynnaamdectehfi\",\"appliedScopes\":[],\"appliedScopeType\":\"ManagementGroup\",\"archived\":true,\"capabilities\":\"vhezrkgqhcj\",\"quantity\":1843167961,\"provisioningState\":\"PendingResourceHold\",\"effectiveDateTime\":\"2021-06-07T02:58Z\",\"benefitStartTime\":\"2021-10-26T09:37:04Z\",\"lastUpdatedDateTime\":\"2021-02-03T09:21:46Z\",\"expiryDateTime\":\"2021-08-20T18:32:02Z\",\"reviewDateTime\":\"2021-05-05T15:09:29Z\",\"skuDescription\":\"qjpkcattpngjcrc\",\"billingPlan\":\"Upfront\",\"displayProvisioningState\":\"jh\",\"provisioningSubState\":\"daj\",\"purchaseDateTime\":\"2021-09-30T19:57Z\",\"billingScopeId\":\"canoaeupf\",\"renew\":true,\"renewSource\":\"trpmo\",\"renewDestination\":\"mcmatuokthfuiu\",\"term\":\"P1Y\",\"userFriendlyAppliedScopeType\":\"cpkvxodp\",\"userFriendlyRenewState\":\"zmyzydagf\"},\"kind\":\"Microsoft.Compute\",\"id\":\"zyiuokk\",\"name\":\"whrdxwzywqsmbsu\",\"type\":\"exim\"},{\"location\":\"yocf\",\"etag\":1075133602,\"sku\":{\"name\":\"mddystkiiux\"},\"properties\":{\"reservedResourceType\":\"SqlEdge\",\"instanceFlexibility\":\"On\",\"displayName\":\"rrqnbpoczvyifqrv\",\"appliedScopes\":[],\"appliedScopeType\":\"Single\",\"archived\":false,\"capabilities\":\"rm\",\"quantity\":115624331,\"provisioningState\":\"Created\",\"effectiveDateTime\":\"2021-12-05T03:26:34Z\",\"benefitStartTime\":\"2021-07-14T20:07:14Z\",\"lastUpdatedDateTime\":\"2021-01-04T16:23:35Z\",\"expiryDateTime\":\"2021-11-18T04:15:49Z\",\"reviewDateTime\":\"2021-05-09T09:45:07Z\",\"skuDescription\":\"czwtruwiqzbqjv\",\"billingPlan\":\"Monthly\",\"displayProvisioningState\":\"okacspk\",\"provisioningSubState\":\"hzdobpxjmflbvvnc\",\"purchaseDateTime\":\"2021-03-04T23:54:12Z\",\"billingScopeId\":\"juqk\",\"renew\":false,\"renewSource\":\"jiwkuofoskghsau\",\"renewDestination\":\"mjmvxieduugidyjr\",\"term\":\"P1Y\",\"userFriendlyAppliedScopeType\":\"osvexcsonpclhoc\",\"userFriendlyRenewState\":\"slkevle\"},\"kind\":\"Microsoft.Compute\",\"id\":\"u\",\"name\":\"fmvfaxkffeiit\",\"type\":\"lvmezyvshxmzsbbz\"},{\"location\":\"gigr\",\"etag\":830818996,\"sku\":{\"name\":\"vjxxjnsp\"},\"properties\":{\"reservedResourceType\":\"MariaDb\",\"instanceFlexibility\":\"Off\",\"displayName\":\"nkoukn\",\"appliedScopes\":[],\"appliedScopeType\":\"Single\",\"archived\":true,\"capabilities\":\"kbldngkpocipa\",\"quantity\":1866473569,\"provisioningState\":\"PendingResourceHold\",\"effectiveDateTime\":\"2021-01-06T21:03:44Z\",\"benefitStartTime\":\"2021-12-09T00:28:10Z\",\"lastUpdatedDateTime\":\"2021-07-16T00:56:23Z\",\"expiryDateTime\":\"2021-10-28T00:07:14Z\",\"reviewDateTime\":\"2021-07-11T10:35:30Z\",\"skuDescription\":\"gevqznty\",\"billingPlan\":\"Monthly\",\"displayProvisioningState\":\"izcdrqjsd\",\"provisioningSubState\":\"dnfyhxdeoejzicwi\",\"purchaseDateTime\":\"2021-01-05T16:16:49Z\",\"billingScopeId\":\"ishc\",\"renew\":true,\"renewSource\":\"jdeyeamdpha\",\"renewDestination\":\"lpbuxwgipwhonowk\",\"term\":\"P1Y\",\"userFriendlyAppliedScopeType\":\"nkixzbinj\",\"userFriendlyRenewState\":\"uttmrywnuzoqft\"},\"kind\":\"Microsoft.Compute\",\"id\":\"n\",\"name\":\"cqvyxlwhzlsico\",\"type\":\"oqqnwvlryav\"}],\"nextLink\":\"heun\"}")
- .toObject(ReservationList.class);
- Assertions.assertEquals("wey", model.value().get(0).location());
- Assertions.assertEquals(1047075786, model.value().get(0).etag());
- Assertions.assertEquals("evfyexfwhybcib", model.value().get(0).sku().name());
- Assertions
- .assertEquals(ReservedResourceType.DATA_FACTORY, model.value().get(0).properties().reservedResourceType());
- Assertions.assertEquals(InstanceFlexibility.ON, model.value().get(0).properties().instanceFlexibility());
- Assertions.assertEquals("tynnaamdectehfi", model.value().get(0).properties().displayName());
- Assertions
- .assertEquals(AppliedScopeType.MANAGEMENT_GROUP, model.value().get(0).properties().appliedScopeType());
- Assertions.assertEquals(true, model.value().get(0).properties().archived());
- Assertions.assertEquals("vhezrkgqhcj", model.value().get(0).properties().capabilities());
- Assertions.assertEquals(1843167961, model.value().get(0).properties().quantity());
- Assertions
- .assertEquals(
- ProvisioningState.PENDING_RESOURCE_HOLD, model.value().get(0).properties().provisioningState());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-06-07T02:58Z"), model.value().get(0).properties().effectiveDateTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-10-26T09:37:04Z"), model.value().get(0).properties().benefitStartTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-20T18:32:02Z"), model.value().get(0).properties().expiryDateTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-05T15:09:29Z"), model.value().get(0).properties().reviewDateTime());
- Assertions.assertEquals("qjpkcattpngjcrc", model.value().get(0).properties().skuDescription());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, model.value().get(0).properties().billingPlan());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-09-30T19:57Z"), model.value().get(0).properties().purchaseDateTime());
- Assertions.assertEquals("canoaeupf", model.value().get(0).properties().billingScopeId());
- Assertions.assertEquals(true, model.value().get(0).properties().renew());
- Assertions.assertEquals("trpmo", model.value().get(0).properties().renewSource());
- Assertions.assertEquals("mcmatuokthfuiu", model.value().get(0).properties().renewDestination());
- Assertions.assertEquals(ReservationTerm.P1Y, model.value().get(0).properties().term());
- Assertions.assertEquals(Kind.MICROSOFT_COMPUTE, model.value().get(0).kind());
- Assertions.assertEquals("heun", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ReservationList model =
- new ReservationList()
- .withValue(
- Arrays
- .asList(
- new ReservationResponseInner()
- .withLocation("wey")
- .withEtag(1047075786)
- .withSku(new SkuName().withName("evfyexfwhybcib"))
- .withProperties(
- new ReservationsProperties()
- .withReservedResourceType(ReservedResourceType.DATA_FACTORY)
- .withInstanceFlexibility(InstanceFlexibility.ON)
- .withDisplayName("tynnaamdectehfi")
- .withAppliedScopes(Arrays.asList())
- .withAppliedScopeType(AppliedScopeType.MANAGEMENT_GROUP)
- .withArchived(true)
- .withCapabilities("vhezrkgqhcj")
- .withQuantity(1843167961)
- .withProvisioningState(ProvisioningState.PENDING_RESOURCE_HOLD)
- .withEffectiveDateTime(OffsetDateTime.parse("2021-06-07T02:58Z"))
- .withBenefitStartTime(OffsetDateTime.parse("2021-10-26T09:37:04Z"))
- .withExpiryDateTime(OffsetDateTime.parse("2021-08-20T18:32:02Z"))
- .withReviewDateTime(OffsetDateTime.parse("2021-05-05T15:09:29Z"))
- .withSkuDescription("qjpkcattpngjcrc")
- .withBillingPlan(ReservationBillingPlan.UPFRONT)
- .withPurchaseDateTime(OffsetDateTime.parse("2021-09-30T19:57Z"))
- .withBillingScopeId("canoaeupf")
- .withRenew(true)
- .withRenewSource("trpmo")
- .withRenewDestination("mcmatuokthfuiu")
- .withTerm(ReservationTerm.P1Y))
- .withKind(Kind.MICROSOFT_COMPUTE),
- new ReservationResponseInner()
- .withLocation("yocf")
- .withEtag(1075133602)
- .withSku(new SkuName().withName("mddystkiiux"))
- .withProperties(
- new ReservationsProperties()
- .withReservedResourceType(ReservedResourceType.SQL_EDGE)
- .withInstanceFlexibility(InstanceFlexibility.ON)
- .withDisplayName("rrqnbpoczvyifqrv")
- .withAppliedScopes(Arrays.asList())
- .withAppliedScopeType(AppliedScopeType.SINGLE)
- .withArchived(false)
- .withCapabilities("rm")
- .withQuantity(115624331)
- .withProvisioningState(ProvisioningState.CREATED)
- .withEffectiveDateTime(OffsetDateTime.parse("2021-12-05T03:26:34Z"))
- .withBenefitStartTime(OffsetDateTime.parse("2021-07-14T20:07:14Z"))
- .withExpiryDateTime(OffsetDateTime.parse("2021-11-18T04:15:49Z"))
- .withReviewDateTime(OffsetDateTime.parse("2021-05-09T09:45:07Z"))
- .withSkuDescription("czwtruwiqzbqjv")
- .withBillingPlan(ReservationBillingPlan.MONTHLY)
- .withPurchaseDateTime(OffsetDateTime.parse("2021-03-04T23:54:12Z"))
- .withBillingScopeId("juqk")
- .withRenew(false)
- .withRenewSource("jiwkuofoskghsau")
- .withRenewDestination("mjmvxieduugidyjr")
- .withTerm(ReservationTerm.P1Y))
- .withKind(Kind.MICROSOFT_COMPUTE),
- new ReservationResponseInner()
- .withLocation("gigr")
- .withEtag(830818996)
- .withSku(new SkuName().withName("vjxxjnsp"))
- .withProperties(
- new ReservationsProperties()
- .withReservedResourceType(ReservedResourceType.MARIA_DB)
- .withInstanceFlexibility(InstanceFlexibility.OFF)
- .withDisplayName("nkoukn")
- .withAppliedScopes(Arrays.asList())
- .withAppliedScopeType(AppliedScopeType.SINGLE)
- .withArchived(true)
- .withCapabilities("kbldngkpocipa")
- .withQuantity(1866473569)
- .withProvisioningState(ProvisioningState.PENDING_RESOURCE_HOLD)
- .withEffectiveDateTime(OffsetDateTime.parse("2021-01-06T21:03:44Z"))
- .withBenefitStartTime(OffsetDateTime.parse("2021-12-09T00:28:10Z"))
- .withExpiryDateTime(OffsetDateTime.parse("2021-10-28T00:07:14Z"))
- .withReviewDateTime(OffsetDateTime.parse("2021-07-11T10:35:30Z"))
- .withSkuDescription("gevqznty")
- .withBillingPlan(ReservationBillingPlan.MONTHLY)
- .withPurchaseDateTime(OffsetDateTime.parse("2021-01-05T16:16:49Z"))
- .withBillingScopeId("ishc")
- .withRenew(true)
- .withRenewSource("jdeyeamdpha")
- .withRenewDestination("lpbuxwgipwhonowk")
- .withTerm(ReservationTerm.P1Y))
- .withKind(Kind.MICROSOFT_COMPUTE)))
- .withNextLink("heun");
- model = BinaryData.fromObject(model).toObject(ReservationList.class);
- Assertions.assertEquals("wey", model.value().get(0).location());
- Assertions.assertEquals(1047075786, model.value().get(0).etag());
- Assertions.assertEquals("evfyexfwhybcib", model.value().get(0).sku().name());
- Assertions
- .assertEquals(ReservedResourceType.DATA_FACTORY, model.value().get(0).properties().reservedResourceType());
- Assertions.assertEquals(InstanceFlexibility.ON, model.value().get(0).properties().instanceFlexibility());
- Assertions.assertEquals("tynnaamdectehfi", model.value().get(0).properties().displayName());
- Assertions
- .assertEquals(AppliedScopeType.MANAGEMENT_GROUP, model.value().get(0).properties().appliedScopeType());
- Assertions.assertEquals(true, model.value().get(0).properties().archived());
- Assertions.assertEquals("vhezrkgqhcj", model.value().get(0).properties().capabilities());
- Assertions.assertEquals(1843167961, model.value().get(0).properties().quantity());
- Assertions
- .assertEquals(
- ProvisioningState.PENDING_RESOURCE_HOLD, model.value().get(0).properties().provisioningState());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-06-07T02:58Z"), model.value().get(0).properties().effectiveDateTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-10-26T09:37:04Z"), model.value().get(0).properties().benefitStartTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-20T18:32:02Z"), model.value().get(0).properties().expiryDateTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-05T15:09:29Z"), model.value().get(0).properties().reviewDateTime());
- Assertions.assertEquals("qjpkcattpngjcrc", model.value().get(0).properties().skuDescription());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, model.value().get(0).properties().billingPlan());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-09-30T19:57Z"), model.value().get(0).properties().purchaseDateTime());
- Assertions.assertEquals("canoaeupf", model.value().get(0).properties().billingScopeId());
- Assertions.assertEquals(true, model.value().get(0).properties().renew());
- Assertions.assertEquals("trpmo", model.value().get(0).properties().renewSource());
- Assertions.assertEquals("mcmatuokthfuiu", model.value().get(0).properties().renewDestination());
- Assertions.assertEquals(ReservationTerm.P1Y, model.value().get(0).properties().term());
- Assertions.assertEquals(Kind.MICROSOFT_COMPUTE, model.value().get(0).kind());
- Assertions.assertEquals("heun", model.nextLink());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationMergePropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationMergePropertiesTests.java
deleted file mode 100644
index e5bbf3014558..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationMergePropertiesTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ReservationMergeProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ReservationMergePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ReservationMergeProperties model =
- BinaryData
- .fromString("{\"mergeDestination\":\"rvqdra\",\"mergeSources\":[\"yb\",\"gehoqfbowskany\"]}")
- .toObject(ReservationMergeProperties.class);
- Assertions.assertEquals("rvqdra", model.mergeDestination());
- Assertions.assertEquals("yb", model.mergeSources().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ReservationMergeProperties model =
- new ReservationMergeProperties()
- .withMergeDestination("rvqdra")
- .withMergeSources(Arrays.asList("yb", "gehoqfbowskany"));
- model = BinaryData.fromObject(model).toObject(ReservationMergeProperties.class);
- Assertions.assertEquals("rvqdra", model.mergeDestination());
- Assertions.assertEquals("yb", model.mergeSources().get(0));
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrderListTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrderListTests.java
deleted file mode 100644
index e5b742670483..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrderListTests.java
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.ReservationOrderResponseInner;
-import com.azure.resourcemanager.reservations.models.ProvisioningState;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationOrderList;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ReservationOrderListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ReservationOrderList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"etag\":9622678,\"properties\":{\"displayName\":\"tnwu\",\"requestDateTime\":\"2021-10-03T15:35:19Z\",\"createdDateTime\":\"2021-02-12T15:23:48Z\",\"expiryDateTime\":\"2021-11-07T16:18:10Z\",\"benefitStartTime\":\"2020-12-27T04:43:40Z\",\"originalQuantity\":1448961060,\"term\":\"P1Y\",\"provisioningState\":\"Created\",\"billingPlan\":\"Monthly\",\"reservations\":[],\"reviewDateTime\":\"2021-07-21T12:31:03Z\"},\"id\":\"zwdzuh\",\"name\":\"ymwisdkft\",\"type\":\"wxmnteiwao\"},{\"etag\":269791591,\"properties\":{\"displayName\":\"jcmmxdcufufsrp\",\"requestDateTime\":\"2021-06-29T04:41:21Z\",\"createdDateTime\":\"2021-12-09T12:29:37Z\",\"expiryDateTime\":\"2021-10-23T08:25:02Z\",\"benefitStartTime\":\"2021-09-08T03:00:46Z\",\"originalQuantity\":564973983,\"term\":\"P3Y\",\"provisioningState\":\"Succeeded\",\"billingPlan\":\"Upfront\",\"reservations\":[],\"reviewDateTime\":\"2021-04-28T14:26:37Z\"},\"id\":\"mdwzjeiachboo\",\"name\":\"flnrosfqpteehzz\",\"type\":\"ypyqrimzinp\"}],\"nextLink\":\"wjdk\"}")
- .toObject(ReservationOrderList.class);
- Assertions.assertEquals(9622678, model.value().get(0).etag());
- Assertions.assertEquals("tnwu", model.value().get(0).displayName());
- Assertions.assertEquals(OffsetDateTime.parse("2021-10-03T15:35:19Z"), model.value().get(0).requestDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-02-12T15:23:48Z"), model.value().get(0).createdDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T16:18:10Z"), model.value().get(0).expiryDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2020-12-27T04:43:40Z"), model.value().get(0).benefitStartTime());
- Assertions.assertEquals(1448961060, model.value().get(0).originalQuantity());
- Assertions.assertEquals(ReservationTerm.P1Y, model.value().get(0).term());
- Assertions.assertEquals(ProvisioningState.CREATED, model.value().get(0).provisioningState());
- Assertions.assertEquals(ReservationBillingPlan.MONTHLY, model.value().get(0).billingPlan());
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T12:31:03Z"), model.value().get(0).reviewDateTime());
- Assertions.assertEquals("wjdk", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ReservationOrderList model =
- new ReservationOrderList()
- .withValue(
- Arrays
- .asList(
- new ReservationOrderResponseInner()
- .withEtag(9622678)
- .withDisplayName("tnwu")
- .withRequestDateTime(OffsetDateTime.parse("2021-10-03T15:35:19Z"))
- .withCreatedDateTime(OffsetDateTime.parse("2021-02-12T15:23:48Z"))
- .withExpiryDateTime(OffsetDateTime.parse("2021-11-07T16:18:10Z"))
- .withBenefitStartTime(OffsetDateTime.parse("2020-12-27T04:43:40Z"))
- .withOriginalQuantity(1448961060)
- .withTerm(ReservationTerm.P1Y)
- .withProvisioningState(ProvisioningState.CREATED)
- .withBillingPlan(ReservationBillingPlan.MONTHLY)
- .withReservations(Arrays.asList())
- .withReviewDateTime(OffsetDateTime.parse("2021-07-21T12:31:03Z")),
- new ReservationOrderResponseInner()
- .withEtag(269791591)
- .withDisplayName("jcmmxdcufufsrp")
- .withRequestDateTime(OffsetDateTime.parse("2021-06-29T04:41:21Z"))
- .withCreatedDateTime(OffsetDateTime.parse("2021-12-09T12:29:37Z"))
- .withExpiryDateTime(OffsetDateTime.parse("2021-10-23T08:25:02Z"))
- .withBenefitStartTime(OffsetDateTime.parse("2021-09-08T03:00:46Z"))
- .withOriginalQuantity(564973983)
- .withTerm(ReservationTerm.P3Y)
- .withProvisioningState(ProvisioningState.SUCCEEDED)
- .withBillingPlan(ReservationBillingPlan.UPFRONT)
- .withReservations(Arrays.asList())
- .withReviewDateTime(OffsetDateTime.parse("2021-04-28T14:26:37Z"))))
- .withNextLink("wjdk");
- model = BinaryData.fromObject(model).toObject(ReservationOrderList.class);
- Assertions.assertEquals(9622678, model.value().get(0).etag());
- Assertions.assertEquals("tnwu", model.value().get(0).displayName());
- Assertions.assertEquals(OffsetDateTime.parse("2021-10-03T15:35:19Z"), model.value().get(0).requestDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-02-12T15:23:48Z"), model.value().get(0).createdDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T16:18:10Z"), model.value().get(0).expiryDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2020-12-27T04:43:40Z"), model.value().get(0).benefitStartTime());
- Assertions.assertEquals(1448961060, model.value().get(0).originalQuantity());
- Assertions.assertEquals(ReservationTerm.P1Y, model.value().get(0).term());
- Assertions.assertEquals(ProvisioningState.CREATED, model.value().get(0).provisioningState());
- Assertions.assertEquals(ReservationBillingPlan.MONTHLY, model.value().get(0).billingPlan());
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T12:31:03Z"), model.value().get(0).reviewDateTime());
- Assertions.assertEquals("wjdk", model.nextLink());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrderResponseInnerTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrderResponseInnerTests.java
deleted file mode 100644
index 8e3103568168..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrderResponseInnerTests.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.ReservationOrderResponseInner;
-import com.azure.resourcemanager.reservations.fluent.models.ReservationResponseInner;
-import com.azure.resourcemanager.reservations.models.Kind;
-import com.azure.resourcemanager.reservations.models.ProvisioningState;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationOrderBillingPlanInformation;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ReservationOrderResponseInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ReservationOrderResponseInner model =
- BinaryData
- .fromString(
- "{\"etag\":1230254023,\"properties\":{\"displayName\":\"dqxhcrmnohjtckwh\",\"requestDateTime\":\"2021-05-11T08:11:32Z\",\"createdDateTime\":\"2021-07-22T01:38:16Z\",\"expiryDateTime\":\"2020-12-23T06:13:14Z\",\"benefitStartTime\":\"2021-01-18T03:53:41Z\",\"originalQuantity\":1921161938,\"term\":\"P3Y\",\"provisioningState\":\"ConfirmedResourceHold\",\"billingPlan\":\"Upfront\",\"planInformation\":{\"transactions\":[]},\"reservations\":[{\"location\":\"snb\",\"etag\":1701008083,\"kind\":\"Microsoft.Compute\",\"id\":\"cpc\",\"name\":\"shurzafbljjgpbto\",\"type\":\"c\"}],\"reviewDateTime\":\"2021-08-23T17:30:32Z\"},\"id\":\"javbqidtqajz\",\"name\":\"ulpkudjkrl\",\"type\":\"hbzhfepg\"}")
- .toObject(ReservationOrderResponseInner.class);
- Assertions.assertEquals(1230254023, model.etag());
- Assertions.assertEquals("dqxhcrmnohjtckwh", model.displayName());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-11T08:11:32Z"), model.requestDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-22T01:38:16Z"), model.createdDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T06:13:14Z"), model.expiryDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T03:53:41Z"), model.benefitStartTime());
- Assertions.assertEquals(1921161938, model.originalQuantity());
- Assertions.assertEquals(ReservationTerm.P3Y, model.term());
- Assertions.assertEquals(ProvisioningState.CONFIRMED_RESOURCE_HOLD, model.provisioningState());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, model.billingPlan());
- Assertions.assertEquals("snb", model.reservations().get(0).location());
- Assertions.assertEquals(1701008083, model.reservations().get(0).etag());
- Assertions.assertEquals(Kind.MICROSOFT_COMPUTE, model.reservations().get(0).kind());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-23T17:30:32Z"), model.reviewDateTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ReservationOrderResponseInner model =
- new ReservationOrderResponseInner()
- .withEtag(1230254023)
- .withDisplayName("dqxhcrmnohjtckwh")
- .withRequestDateTime(OffsetDateTime.parse("2021-05-11T08:11:32Z"))
- .withCreatedDateTime(OffsetDateTime.parse("2021-07-22T01:38:16Z"))
- .withExpiryDateTime(OffsetDateTime.parse("2020-12-23T06:13:14Z"))
- .withBenefitStartTime(OffsetDateTime.parse("2021-01-18T03:53:41Z"))
- .withOriginalQuantity(1921161938)
- .withTerm(ReservationTerm.P3Y)
- .withProvisioningState(ProvisioningState.CONFIRMED_RESOURCE_HOLD)
- .withBillingPlan(ReservationBillingPlan.UPFRONT)
- .withPlanInformation(new ReservationOrderBillingPlanInformation().withTransactions(Arrays.asList()))
- .withReservations(
- Arrays
- .asList(
- new ReservationResponseInner()
- .withLocation("snb")
- .withEtag(1701008083)
- .withKind(Kind.MICROSOFT_COMPUTE)))
- .withReviewDateTime(OffsetDateTime.parse("2021-08-23T17:30:32Z"));
- model = BinaryData.fromObject(model).toObject(ReservationOrderResponseInner.class);
- Assertions.assertEquals(1230254023, model.etag());
- Assertions.assertEquals("dqxhcrmnohjtckwh", model.displayName());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-11T08:11:32Z"), model.requestDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-22T01:38:16Z"), model.createdDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T06:13:14Z"), model.expiryDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T03:53:41Z"), model.benefitStartTime());
- Assertions.assertEquals(1921161938, model.originalQuantity());
- Assertions.assertEquals(ReservationTerm.P3Y, model.term());
- Assertions.assertEquals(ProvisioningState.CONFIRMED_RESOURCE_HOLD, model.provisioningState());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, model.billingPlan());
- Assertions.assertEquals("snb", model.reservations().get(0).location());
- Assertions.assertEquals(1701008083, model.reservations().get(0).etag());
- Assertions.assertEquals(Kind.MICROSOFT_COMPUTE, model.reservations().get(0).kind());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-23T17:30:32Z"), model.reviewDateTime());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersChangeDirectoryWithResponseMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersChangeDirectoryWithResponseMockTests.java
deleted file mode 100644
index 2ba031125896..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersChangeDirectoryWithResponseMockTests.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.ChangeDirectoryRequest;
-import com.azure.resourcemanager.reservations.models.ChangeDirectoryResponse;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ReservationOrdersChangeDirectoryWithResponseMockTests {
- @Test
- public void testChangeDirectoryWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"reservationOrder\":{\"id\":\"ih\",\"name\":\"qg\",\"isSucceeded\":true,\"error\":\"fqntcyp\"},\"reservations\":[{\"id\":\"foimwkslircizjxv\",\"name\":\"fceacvlhvygd\",\"isSucceeded\":false,\"error\":\"mrtwna\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ChangeDirectoryResponse response =
- manager
- .reservationOrders()
- .changeDirectoryWithResponse(
- "lw",
- new ChangeDirectoryRequest().withDestinationTenantId("esutrgjupauutpw"),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("ih", response.reservationOrder().id());
- Assertions.assertEquals("qg", response.reservationOrder().name());
- Assertions.assertEquals(true, response.reservationOrder().isSucceeded());
- Assertions.assertEquals("fqntcyp", response.reservationOrder().error());
- Assertions.assertEquals("foimwkslircizjxv", response.reservations().get(0).id());
- Assertions.assertEquals("fceacvlhvygd", response.reservations().get(0).name());
- Assertions.assertEquals(false, response.reservations().get(0).isSucceeded());
- Assertions.assertEquals("mrtwna", response.reservations().get(0).error());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersGetWithResponseMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersGetWithResponseMockTests.java
deleted file mode 100644
index 03fdda512936..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersGetWithResponseMockTests.java
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.ProvisioningState;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationOrderResponse;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ReservationOrdersGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"etag\":1383298252,\"properties\":{\"displayName\":\"hxacpqjlihhyu\",\"requestDateTime\":\"2021-01-11T22:34:27Z\",\"createdDateTime\":\"2021-06-19T07:14:10Z\",\"expiryDateTime\":\"2021-06-21T01:18:29Z\",\"benefitStartTime\":\"2021-12-09T00:48:19Z\",\"originalQuantity\":363338546,\"term\":\"P5Y\",\"provisioningState\":\"Merged\",\"billingPlan\":\"Upfront\",\"planInformation\":{\"transactions\":[]},\"reservations\":[],\"reviewDateTime\":\"2021-07-04T20:55:26Z\"},\"id\":\"uzvx\",\"name\":\"risjnhnytxifqjz\",\"type\":\"xmrhu\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ReservationOrderResponse response =
- manager
- .reservationOrders()
- .getWithResponse("cotmr", "hirctymoxoftpipi", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(1383298252, response.etag());
- Assertions.assertEquals("hxacpqjlihhyu", response.displayName());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T22:34:27Z"), response.requestDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T07:14:10Z"), response.createdDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T01:18:29Z"), response.expiryDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-12-09T00:48:19Z"), response.benefitStartTime());
- Assertions.assertEquals(363338546, response.originalQuantity());
- Assertions.assertEquals(ReservationTerm.P5Y, response.term());
- Assertions.assertEquals(ProvisioningState.MERGED, response.provisioningState());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, response.billingPlan());
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-04T20:55:26Z"), response.reviewDateTime());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersListMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersListMockTests.java
deleted file mode 100644
index b05ccf10973f..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersListMockTests.java
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.ProvisioningState;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationOrderResponse;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ReservationOrdersListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"etag\":1047026822,\"properties\":{\"displayName\":\"hcrat\",\"requestDateTime\":\"2021-08-13T20:41:57Z\",\"createdDateTime\":\"2021-06-27T16:40:41Z\",\"expiryDateTime\":\"2021-01-21T03:47:46Z\",\"benefitStartTime\":\"2021-07-03T11:09:27Z\",\"originalQuantity\":1438708374,\"term\":\"P1Y\",\"provisioningState\":\"PendingBilling\",\"billingPlan\":\"Monthly\",\"planInformation\":{\"transactions\":[]},\"reservations\":[],\"reviewDateTime\":\"2021-06-13T10:36:32Z\"},\"id\":\"honnxkrlgnyhmos\",\"name\":\"xkk\",\"type\":\"thrrgh\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.reservationOrders().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(1047026822, response.iterator().next().etag());
- Assertions.assertEquals("hcrat", response.iterator().next().displayName());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-08-13T20:41:57Z"), response.iterator().next().requestDateTime());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-06-27T16:40:41Z"), response.iterator().next().createdDateTime());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-01-21T03:47:46Z"), response.iterator().next().expiryDateTime());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-07-03T11:09:27Z"), response.iterator().next().benefitStartTime());
- Assertions.assertEquals(1438708374, response.iterator().next().originalQuantity());
- Assertions.assertEquals(ReservationTerm.P1Y, response.iterator().next().term());
- Assertions.assertEquals(ProvisioningState.PENDING_BILLING, response.iterator().next().provisioningState());
- Assertions.assertEquals(ReservationBillingPlan.MONTHLY, response.iterator().next().billingPlan());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-06-13T10:36:32Z"), response.iterator().next().reviewDateTime());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersPurchaseMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersPurchaseMockTests.java
deleted file mode 100644
index 43256c11975a..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationOrdersPurchaseMockTests.java
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.AppliedScopeProperties;
-import com.azure.resourcemanager.reservations.models.AppliedScopeType;
-import com.azure.resourcemanager.reservations.models.InstanceFlexibility;
-import com.azure.resourcemanager.reservations.models.ProvisioningState;
-import com.azure.resourcemanager.reservations.models.PurchaseRequest;
-import com.azure.resourcemanager.reservations.models.PurchaseRequestPropertiesReservedResourceProperties;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationOrderResponse;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import com.azure.resourcemanager.reservations.models.ReservedResourceType;
-import com.azure.resourcemanager.reservations.models.SkuName;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ReservationOrdersPurchaseMockTests {
- @Test
- public void testPurchase() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"etag\":592416055,\"properties\":{\"displayName\":\"fezzxscyhwzdg\",\"requestDateTime\":\"2021-01-16T07:41:49Z\",\"createdDateTime\":\"2021-08-21T05:05:09Z\",\"expiryDateTime\":\"2021-05-15T16:47:17Z\",\"benefitStartTime\":\"2021-02-14T17:43:30Z\",\"originalQuantity\":921177918,\"term\":\"P5Y\",\"provisioningState\":\"Succeeded\",\"billingPlan\":\"Upfront\",\"planInformation\":{\"transactions\":[]},\"reservations\":[],\"reviewDateTime\":\"2021-05-20T07:43:06Z\"},\"id\":\"wdsh\",\"name\":\"ssnrbgye\",\"type\":\"rymsgaojfmw\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ReservationOrderResponse response =
- manager
- .reservationOrders()
- .purchase(
- "jbdhqxvc",
- new PurchaseRequest()
- .withSku(new SkuName().withName("rpdsof"))
- .withLocation("hrnsvbu")
- .withReservedResourceType(ReservedResourceType.COSMOS_DB)
- .withBillingScopeId("yybyc")
- .withTerm(ReservationTerm.P5Y)
- .withBillingPlan(ReservationBillingPlan.UPFRONT)
- .withQuantity(461683729)
- .withDisplayName("kfawnopqgikyz")
- .withAppliedScopeType(AppliedScopeType.MANAGEMENT_GROUP)
- .withAppliedScopes(Arrays.asList("yuxzejntpsewgi", "ilqu"))
- .withAppliedScopeProperties(
- new AppliedScopeProperties()
- .withTenantId("dxtqmieoxo")
- .withManagementGroupId("gufhyaomtbg")
- .withSubscriptionId("avgrvkffovjz")
- .withResourceGroupId("jbibg")
- .withDisplayName("fxumv"))
- .withRenew(true)
- .withReservedResourceProperties(
- new PurchaseRequestPropertiesReservedResourceProperties()
- .withInstanceFlexibility(InstanceFlexibility.OFF))
- .withReviewDateTime(OffsetDateTime.parse("2021-05-30T07:45:57Z")),
- com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(592416055, response.etag());
- Assertions.assertEquals("fezzxscyhwzdg", response.displayName());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-16T07:41:49Z"), response.requestDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T05:05:09Z"), response.createdDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T16:47:17Z"), response.expiryDateTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T17:43:30Z"), response.benefitStartTime());
- Assertions.assertEquals(921177918, response.originalQuantity());
- Assertions.assertEquals(ReservationTerm.P5Y, response.term());
- Assertions.assertEquals(ProvisioningState.SUCCEEDED, response.provisioningState());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, response.billingPlan());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T07:43:06Z"), response.reviewDateTime());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationSplitPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationSplitPropertiesTests.java
deleted file mode 100644
index 41619f7269a2..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationSplitPropertiesTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ReservationSplitProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ReservationSplitPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ReservationSplitProperties model =
- BinaryData
- .fromString(
- "{\"splitDestinations\":[\"vtpgvdfgiotkf\",\"utqxlngx\",\"efgugnxk\"],\"splitSource\":\"dqmidtt\"}")
- .toObject(ReservationSplitProperties.class);
- Assertions.assertEquals("vtpgvdfgiotkf", model.splitDestinations().get(0));
- Assertions.assertEquals("dqmidtt", model.splitSource());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ReservationSplitProperties model =
- new ReservationSplitProperties()
- .withSplitDestinations(Arrays.asList("vtpgvdfgiotkf", "utqxlngx", "efgugnxk"))
- .withSplitSource("dqmidtt");
- model = BinaryData.fromObject(model).toObject(ReservationSplitProperties.class);
- Assertions.assertEquals("vtpgvdfgiotkf", model.splitDestinations().get(0));
- Assertions.assertEquals("dqmidtt", model.splitSource());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationSummaryTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationSummaryTests.java
deleted file mode 100644
index 18d0ab9f2ec0..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationSummaryTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ReservationSummary;
-
-public final class ReservationSummaryTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ReservationSummary model =
- BinaryData
- .fromString(
- "{\"succeededCount\":44.318954,\"failedCount\":51.598812,\"expiringCount\":85.78577,\"expiredCount\":70.35829,\"pendingCount\":1.5577674,\"cancelledCount\":21.989983,\"processingCount\":36.020805,\"warningCount\":33.008022,\"noBenefitCount\":53.03174}")
- .toObject(ReservationSummary.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ReservationSummary model = new ReservationSummary();
- model = BinaryData.fromObject(model).toObject(ReservationSummary.class);
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationSwapPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationSwapPropertiesTests.java
deleted file mode 100644
index b8ef58d37cb4..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationSwapPropertiesTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ReservationSwapProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class ReservationSwapPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ReservationSwapProperties model =
- BinaryData
- .fromString("{\"swapSource\":\"zlcuiywgqywgndrv\",\"swapDestination\":\"hzgpphrcgyncocpe\"}")
- .toObject(ReservationSwapProperties.class);
- Assertions.assertEquals("zlcuiywgqywgndrv", model.swapSource());
- Assertions.assertEquals("hzgpphrcgyncocpe", model.swapDestination());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ReservationSwapProperties model =
- new ReservationSwapProperties().withSwapSource("zlcuiywgqywgndrv").withSwapDestination("hzgpphrcgyncocpe");
- model = BinaryData.fromObject(model).toObject(ReservationSwapProperties.class);
- Assertions.assertEquals("zlcuiywgqywgndrv", model.swapSource());
- Assertions.assertEquals("hzgpphrcgyncocpe", model.swapDestination());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationToReturnTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationToReturnTests.java
deleted file mode 100644
index 2b8d9ef34456..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationToReturnTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ReservationToReturn;
-import org.junit.jupiter.api.Assertions;
-
-public final class ReservationToReturnTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ReservationToReturn model =
- BinaryData
- .fromString("{\"reservationId\":\"pesapskrdqmhjj\",\"quantity\":871941711}")
- .toObject(ReservationToReturn.class);
- Assertions.assertEquals("pesapskrdqmhjj", model.reservationId());
- Assertions.assertEquals(871941711, model.quantity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ReservationToReturn model =
- new ReservationToReturn().withReservationId("pesapskrdqmhjj").withQuantity(871941711);
- model = BinaryData.fromObject(model).toObject(ReservationToReturn.class);
- Assertions.assertEquals("pesapskrdqmhjj", model.reservationId());
- Assertions.assertEquals(871941711, model.quantity());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationUtilizationAggregatesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationUtilizationAggregatesTests.java
deleted file mode 100644
index e50a6b34a25e..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationUtilizationAggregatesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ReservationUtilizationAggregates;
-
-public final class ReservationUtilizationAggregatesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ReservationUtilizationAggregates model =
- BinaryData
- .fromString(
- "{\"grain\":1.3349712,\"grainUnit\":\"udgwdslfho\",\"value\":17.321093,\"valueUnit\":\"ynpwlbj\"}")
- .toObject(ReservationUtilizationAggregates.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ReservationUtilizationAggregates model = new ReservationUtilizationAggregates();
- model = BinaryData.fromObject(model).toObject(ReservationUtilizationAggregates.class);
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsArchiveWithResponseMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsArchiveWithResponseMockTests.java
deleted file mode 100644
index d0c119bec499..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsArchiveWithResponseMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ReservationsArchiveWithResponseMockTests {
- @Test
- public void testArchiveWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.reservations().archiveWithResponse("jvcdwxlpqekf", "nkhtjsyingw", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsAvailableScopesMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsAvailableScopesMockTests.java
deleted file mode 100644
index 8f50775ebd13..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsAvailableScopesMockTests.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.AvailableScopeProperties;
-import com.azure.resourcemanager.reservations.models.AvailableScopeRequest;
-import com.azure.resourcemanager.reservations.models.AvailableScopeRequestProperties;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ReservationsAvailableScopesMockTests {
- @Test
- public void testAvailableScopes() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"properties\":{\"scopes\":[]}}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AvailableScopeProperties response =
- manager
- .reservations()
- .availableScopes(
- "ujitcjedftww",
- "ezkojvdcp",
- new AvailableScopeRequest()
- .withProperties(
- new AvailableScopeRequestProperties()
- .withScopes(
- Arrays.asList("ouicybxarzgszu", "oxciqopidoamcio", "hkh", "zxkhnzbonlwnto"))),
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsListResultTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsListResultTests.java
deleted file mode 100644
index a3b6e802db06..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsListResultTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ReservationSummary;
-import com.azure.resourcemanager.reservations.models.ReservationsListResult;
-
-public final class ReservationsListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ReservationsListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"location\":\"eqqkdltfzxm\",\"etag\":172476059,\"sku\":{\"name\":\"ur\"},\"properties\":{\"reservedResourceType\":\"CosmosDb\",\"instanceFlexibility\":\"Off\",\"displayName\":\"dagxtibqd\",\"appliedScopes\":[],\"appliedScopeType\":\"Shared\",\"archived\":true,\"capabilities\":\"ogqxndlkzgxhuri\",\"quantity\":1090180987,\"provisioningState\":\"ConfirmedResourceHold\",\"effectiveDateTime\":\"2021-08-20T16:40:33Z\",\"benefitStartTime\":\"2021-03-09T22:42:48Z\",\"lastUpdatedDateTime\":\"2021-10-13T09:55:38Z\",\"expiryDateTime\":\"2021-09-11T16:48:39Z\",\"reviewDateTime\":\"2021-07-12T07:57:48Z\",\"skuDescription\":\"yyntwl\",\"billingPlan\":\"Monthly\",\"displayProvisioningState\":\"oievseotgqrlltm\",\"provisioningSubState\":\"lauwzizxbmpgcjef\",\"purchaseDateTime\":\"2021-07-24T11:16:02Z\",\"billingScopeId\":\"d\",\"renew\":true,\"renewSource\":\"p\",\"renewDestination\":\"ebmnzbtbhjpglk\",\"term\":\"P1Y\",\"userFriendlyAppliedScopeType\":\"neuelfphsdyhtoz\",\"userFriendlyRenewState\":\"kd\"},\"kind\":\"Microsoft.Compute\",\"id\":\"uvxzxclvi\",\"name\":\"hhqzonosgg\",\"type\":\"hcohfwdsjnk\"},{\"location\":\"jutiiswacff\",\"etag\":264036091,\"sku\":{\"name\":\"ewkfvhqcrai\"},\"properties\":{\"reservedResourceType\":\"MariaDb\",\"instanceFlexibility\":\"On\",\"displayName\":\"uflrwd\",\"appliedScopes\":[],\"appliedScopeType\":\"ManagementGroup\",\"archived\":true,\"capabilities\":\"rxsagafcnihgwqa\",\"quantity\":633865702,\"provisioningState\":\"PendingBilling\",\"effectiveDateTime\":\"2021-11-13T04:56:11Z\",\"benefitStartTime\":\"2021-11-14T14:54Z\",\"lastUpdatedDateTime\":\"2021-07-29T10:41:12Z\",\"expiryDateTime\":\"2021-06-29T16:35:56Z\",\"reviewDateTime\":\"2021-01-29T19:24:17Z\",\"skuDescription\":\"qdcvdrhvoo\",\"billingPlan\":\"Upfront\",\"displayProvisioningState\":\"obzdopcjwvnhdl\",\"provisioningSubState\":\"mgxcxrslpm\",\"purchaseDateTime\":\"2021-07-05T10:35:22Z\",\"billingScopeId\":\"khjwn\",\"renew\":false,\"renewSource\":\"luicpdggkzzlvmbm\",\"renewDestination\":\"xmodf\",\"term\":\"P1Y\",\"userFriendlyAppliedScopeType\":\"wsbpfvm\",\"userFriendlyRenewState\":\"hrfou\"},\"kind\":\"Microsoft.Compute\",\"id\":\"kcpwiy\",\"name\":\"vqtmnub\",\"type\":\"xkp\"},{\"location\":\"smond\",\"etag\":1007666972,\"sku\":{\"name\":\"vypomgkopkwho\"},\"properties\":{\"reservedResourceType\":\"MariaDb\",\"instanceFlexibility\":\"On\",\"displayName\":\"xysmoc\",\"appliedScopes\":[],\"appliedScopeType\":\"ManagementGroup\",\"archived\":false,\"capabilities\":\"kcxozapvhelx\",\"quantity\":1663002651,\"provisioningState\":\"Split\",\"effectiveDateTime\":\"2021-06-05T06:43:20Z\",\"benefitStartTime\":\"2021-09-20T17:04:55Z\",\"lastUpdatedDateTime\":\"2021-09-28T08:18:40Z\",\"expiryDateTime\":\"2021-12-06T09:13:13Z\",\"reviewDateTime\":\"2021-09-18T06:03:16Z\",\"skuDescription\":\"rjxgciqib\",\"billingPlan\":\"Monthly\",\"displayProvisioningState\":\"sdqrhzoymibmrq\",\"provisioningSubState\":\"bahwfl\",\"purchaseDateTime\":\"2021-01-14T17:23:07Z\",\"billingScopeId\":\"wofyyvoqacpiexp\",\"renew\":true,\"renewSource\":\"wbwo\",\"renewDestination\":\"washr\",\"term\":\"P1Y\",\"userFriendlyAppliedScopeType\":\"nqxwbp\",\"userFriendlyRenewState\":\"ulpiuj\"},\"kind\":\"Microsoft.Compute\",\"id\":\"pqiiobyuqe\",\"name\":\"pqlpq\",\"type\":\"cciuqgbdbutau\"},{\"location\":\"btkuwhh\",\"etag\":1745648414,\"sku\":{\"name\":\"joxafnndlpi\"},\"properties\":{\"reservedResourceType\":\"ManagedDisk\",\"instanceFlexibility\":\"Off\",\"displayName\":\"cdyhbpkkpwdreqn\",\"appliedScopes\":[],\"appliedScopeType\":\"Shared\",\"archived\":true,\"capabilities\":\"ljxywsu\",\"quantity\":678747249,\"provisioningState\":\"ConfirmedBilling\",\"effectiveDateTime\":\"2021-11-22T09:18:13Z\",\"benefitStartTime\":\"2021-07-23T03:32:16Z\",\"lastUpdatedDateTime\":\"2021-07-30T00:54:27Z\",\"expiryDateTime\":\"2021-02-03T00:22:15Z\",\"reviewDateTime\":\"2021-06-12T20:34:45Z\",\"skuDescription\":\"ea\",\"billingPlan\":\"Upfront\",\"displayProvisioningState\":\"zar\",\"provisioningSubState\":\"lquuijfqkacewii\",\"purchaseDateTime\":\"2021-07-25T09:47:55Z\",\"billingScopeId\":\"wifto\",\"renew\":true,\"renewSource\":\"puvks\",\"renewDestination\":\"lsa\",\"term\":\"P1Y\",\"userFriendlyAppliedScopeType\":\"synljphuopxodl\",\"userFriendlyRenewState\":\"ynt\"},\"kind\":\"Microsoft.Compute\",\"id\":\"leosjswsrms\",\"name\":\"yzrpzbchckqqzq\",\"type\":\"ox\"}],\"nextLink\":\"suiizynkedyat\",\"summary\":{\"succeededCount\":64.28258,\"failedCount\":96.57825,\"expiringCount\":21.838146,\"expiredCount\":98.649445,\"pendingCount\":15.874994,\"cancelledCount\":70.79321,\"processingCount\":65.06971,\"warningCount\":16.777504,\"noBenefitCount\":96.15853}}")
- .toObject(ReservationsListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ReservationsListResult model = new ReservationsListResult().withSummary(new ReservationSummary());
- model = BinaryData.fromObject(model).toObject(ReservationsListResult.class);
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsMergeMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsMergeMockTests.java
deleted file mode 100644
index 8d9435c6dde0..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsMergeMockTests.java
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.AppliedScopeType;
-import com.azure.resourcemanager.reservations.models.InstanceFlexibility;
-import com.azure.resourcemanager.reservations.models.Kind;
-import com.azure.resourcemanager.reservations.models.MergeRequest;
-import com.azure.resourcemanager.reservations.models.ProvisioningState;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationResponse;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import com.azure.resourcemanager.reservations.models.ReservedResourceType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.List;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ReservationsMergeMockTests {
- @Test
- public void testMerge() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "[{\"location\":\"gfpelolppvksrpqv\",\"etag\":2128211402,\"sku\":{\"name\":\"ehtwdwrft\"},\"properties\":{\"reservedResourceType\":\"Databricks\",\"instanceFlexibility\":\"Off\",\"displayName\":\"dl\",\"appliedScopes\":[\"hfwpracstwit\",\"khevxccedc\",\"nmdyodnwzxl\",\"jc\"],\"appliedScopeType\":\"ManagementGroup\",\"archived\":true,\"capabilities\":\"ugcxnavvwxq\",\"quantity\":165046754,\"provisioningState\":\"PendingBilling\",\"effectiveDateTime\":\"2021-05-22T21:00:43Z\",\"benefitStartTime\":\"2021-09-23T12:45:02Z\",\"lastUpdatedDateTime\":\"2021-06-28T16:16:43Z\",\"expiryDateTime\":\"2021-08-23T07:03:36Z\",\"reviewDateTime\":\"2021-02-11T03:05:15Z\",\"skuDescription\":\"vfgbvfvpdboda\",\"billingPlan\":\"Upfront\",\"displayProvisioningState\":\"q\",\"provisioningSubState\":\"krribdeibqi\",\"purchaseDateTime\":\"2021-05-03T06:31:18Z\",\"billingScopeId\":\"zwmk\",\"renew\":true,\"renewSource\":\"jpjorwkqnyhgb\",\"renewDestination\":\"tjivfxzsjabib\",\"term\":\"P5Y\",\"userFriendlyAppliedScopeType\":\"wfsdjpvkvpbj\",\"userFriendlyRenewState\":\"kzbzkdvncjabudu\"},\"kind\":\"Microsoft.Compute\",\"id\":\"mokzhjjklf\",\"name\":\"hmouwqlgzrfze\",\"type\":\"yebizikayuh\"}]";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- List response =
- manager
- .reservations()
- .merge(
- "zrncsdt",
- new MergeRequest().withSources(Arrays.asList("iypbsfgytgusl", "eadcygqukyhejhz")),
- com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("gfpelolppvksrpqv", response.get(0).location());
- Assertions.assertEquals(2128211402, response.get(0).etag());
- Assertions.assertEquals("ehtwdwrft", response.get(0).sku().name());
- Assertions.assertEquals(ReservedResourceType.DATABRICKS, response.get(0).properties().reservedResourceType());
- Assertions.assertEquals(InstanceFlexibility.OFF, response.get(0).properties().instanceFlexibility());
- Assertions.assertEquals("dl", response.get(0).properties().displayName());
- Assertions.assertEquals("hfwpracstwit", response.get(0).properties().appliedScopes().get(0));
- Assertions.assertEquals(AppliedScopeType.MANAGEMENT_GROUP, response.get(0).properties().appliedScopeType());
- Assertions.assertEquals(true, response.get(0).properties().archived());
- Assertions.assertEquals("ugcxnavvwxq", response.get(0).properties().capabilities());
- Assertions.assertEquals(165046754, response.get(0).properties().quantity());
- Assertions.assertEquals(ProvisioningState.PENDING_BILLING, response.get(0).properties().provisioningState());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-22T21:00:43Z"), response.get(0).properties().effectiveDateTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-09-23T12:45:02Z"), response.get(0).properties().benefitStartTime());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-08-23T07:03:36Z"), response.get(0).properties().expiryDateTime());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-02-11T03:05:15Z"), response.get(0).properties().reviewDateTime());
- Assertions.assertEquals("vfgbvfvpdboda", response.get(0).properties().skuDescription());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, response.get(0).properties().billingPlan());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-03T06:31:18Z"), response.get(0).properties().purchaseDateTime());
- Assertions.assertEquals("zwmk", response.get(0).properties().billingScopeId());
- Assertions.assertEquals(true, response.get(0).properties().renew());
- Assertions.assertEquals("jpjorwkqnyhgb", response.get(0).properties().renewSource());
- Assertions.assertEquals("tjivfxzsjabib", response.get(0).properties().renewDestination());
- Assertions.assertEquals(ReservationTerm.P5Y, response.get(0).properties().term());
- Assertions.assertEquals(Kind.MICROSOFT_COMPUTE, response.get(0).kind());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsPropertiesUtilizationTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsPropertiesUtilizationTests.java
deleted file mode 100644
index 9fb6c9a40330..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsPropertiesUtilizationTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ReservationUtilizationAggregates;
-import com.azure.resourcemanager.reservations.models.ReservationsPropertiesUtilization;
-import java.util.Arrays;
-
-public final class ReservationsPropertiesUtilizationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ReservationsPropertiesUtilization model =
- BinaryData
- .fromString(
- "{\"trend\":\"djpjumasxazjpq\",\"aggregates\":[{\"grain\":29.506851,\"grainUnit\":\"hb\",\"value\":27.095669,\"valueUnit\":\"jj\"}]}")
- .toObject(ReservationsPropertiesUtilization.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ReservationsPropertiesUtilization model =
- new ReservationsPropertiesUtilization()
- .withAggregates(Arrays.asList(new ReservationUtilizationAggregates()));
- model = BinaryData.fromObject(model).toObject(ReservationsPropertiesUtilization.class);
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsSplitMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsSplitMockTests.java
deleted file mode 100644
index 341439573fce..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsSplitMockTests.java
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.AppliedScopeType;
-import com.azure.resourcemanager.reservations.models.InstanceFlexibility;
-import com.azure.resourcemanager.reservations.models.Kind;
-import com.azure.resourcemanager.reservations.models.ProvisioningState;
-import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
-import com.azure.resourcemanager.reservations.models.ReservationResponse;
-import com.azure.resourcemanager.reservations.models.ReservationTerm;
-import com.azure.resourcemanager.reservations.models.ReservedResourceType;
-import com.azure.resourcemanager.reservations.models.SplitRequest;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.List;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ReservationsSplitMockTests {
- @Test
- public void testSplit() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "[{\"location\":\"lmnguxaw\",\"etag\":1823569828,\"sku\":{\"name\":\"yuuximerqfobwyzn\"},\"properties\":{\"reservedResourceType\":\"SqlEdge\",\"instanceFlexibility\":\"On\",\"displayName\":\"pfhpagmhrskdsnfd\",\"appliedScopes\":[\"akgtdlmkkzevdlh\",\"wpusdsttwvogv\",\"bejdcn\",\"qqmoaku\"],\"appliedScopeType\":\"Shared\",\"archived\":false,\"capabilities\":\"wr\",\"quantity\":632499232,\"provisioningState\":\"Succeeded\",\"effectiveDateTime\":\"2021-08-17T18:50:12Z\",\"benefitStartTime\":\"2021-01-31T20:09:39Z\",\"lastUpdatedDateTime\":\"2021-09-26T20:30:12Z\",\"expiryDateTime\":\"2021-07-21T23:33:14Z\",\"reviewDateTime\":\"2021-08-27T02:00:49Z\",\"skuDescription\":\"nrfdw\",\"billingPlan\":\"Upfront\",\"displayProvisioningState\":\"ziuiefozbhdm\",\"provisioningSubState\":\"l\",\"purchaseDateTime\":\"2021-05-05T09:05:40Z\",\"billingScopeId\":\"ae\",\"renew\":false,\"renewSource\":\"hxicslfaoqz\",\"renewDestination\":\"yylhalnswhccsp\",\"term\":\"P3Y\",\"userFriendlyAppliedScopeType\":\"witqscywuggwoluh\",\"userFriendlyRenewState\":\"bwemhairs\"},\"kind\":\"Microsoft.Compute\",\"id\":\"wmsweypqwd\",\"name\":\"ggicccnxqhue\",\"type\":\"mkttlstvlzywem\"}]";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- List response =
- manager
- .reservations()
- .split(
- "dwbwhkszzcmrvexz",
- new SplitRequest().withQuantities(Arrays.asList(1159944878)).withReservationId("sfraoyzko"),
- com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("lmnguxaw", response.get(0).location());
- Assertions.assertEquals(1823569828, response.get(0).etag());
- Assertions.assertEquals("yuuximerqfobwyzn", response.get(0).sku().name());
- Assertions.assertEquals(ReservedResourceType.SQL_EDGE, response.get(0).properties().reservedResourceType());
- Assertions.assertEquals(InstanceFlexibility.ON, response.get(0).properties().instanceFlexibility());
- Assertions.assertEquals("pfhpagmhrskdsnfd", response.get(0).properties().displayName());
- Assertions.assertEquals("akgtdlmkkzevdlh", response.get(0).properties().appliedScopes().get(0));
- Assertions.assertEquals(AppliedScopeType.SHARED, response.get(0).properties().appliedScopeType());
- Assertions.assertEquals(false, response.get(0).properties().archived());
- Assertions.assertEquals("wr", response.get(0).properties().capabilities());
- Assertions.assertEquals(632499232, response.get(0).properties().quantity());
- Assertions.assertEquals(ProvisioningState.SUCCEEDED, response.get(0).properties().provisioningState());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-17T18:50:12Z"), response.get(0).properties().effectiveDateTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-01-31T20:09:39Z"), response.get(0).properties().benefitStartTime());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-07-21T23:33:14Z"), response.get(0).properties().expiryDateTime());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-08-27T02:00:49Z"), response.get(0).properties().reviewDateTime());
- Assertions.assertEquals("nrfdw", response.get(0).properties().skuDescription());
- Assertions.assertEquals(ReservationBillingPlan.UPFRONT, response.get(0).properties().billingPlan());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-05T09:05:40Z"), response.get(0).properties().purchaseDateTime());
- Assertions.assertEquals("ae", response.get(0).properties().billingScopeId());
- Assertions.assertEquals(false, response.get(0).properties().renew());
- Assertions.assertEquals("hxicslfaoqz", response.get(0).properties().renewSource());
- Assertions.assertEquals("yylhalnswhccsp", response.get(0).properties().renewDestination());
- Assertions.assertEquals(ReservationTerm.P3Y, response.get(0).properties().term());
- Assertions.assertEquals(Kind.MICROSOFT_COMPUTE, response.get(0).kind());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsUnarchiveWithResponseMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsUnarchiveWithResponseMockTests.java
deleted file mode 100644
index 2ffa5021ebbb..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ReservationsUnarchiveWithResponseMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ReservationsUnarchiveWithResponseMockTests {
- @Test
- public void testUnarchiveWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.reservations().unarchiveWithResponse("qatmtdhtmdvy", "gikdgsz", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ResourceNameTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ResourceNameTests.java
deleted file mode 100644
index 62f014390cc2..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ResourceNameTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ResourceName;
-import org.junit.jupiter.api.Assertions;
-
-public final class ResourceNameTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ResourceName model =
- BinaryData
- .fromString("{\"value\":\"r\",\"localizedValue\":\"wdmjsjqbjhhyx\"}")
- .toObject(ResourceName.class);
- Assertions.assertEquals("r", model.value());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ResourceName model = new ResourceName().withValue("r");
- model = BinaryData.fromObject(model).toObject(ResourceName.class);
- Assertions.assertEquals("r", model.value());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ResourceProvidersGetAppliedReservationListWithResponseMockTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ResourceProvidersGetAppliedReservationListWithResponseMockTests.java
deleted file mode 100644
index bb610f3ea4a1..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ResourceProvidersGetAppliedReservationListWithResponseMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.reservations.ReservationsManager;
-import com.azure.resourcemanager.reservations.models.AppliedReservations;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ResourceProvidersGetAppliedReservationListWithResponseMockTests {
- @Test
- public void testGetAppliedReservationListWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"id\":\"f\",\"name\":\"otxhojujby\",\"type\":\"lmcuvhixb\",\"properties\":{\"reservationOrderIds\":{\"value\":[],\"nextLink\":\"n\"}}}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- ReservationsManager manager =
- ReservationsManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AppliedReservations response =
- manager
- .resourceProviders()
- .getAppliedReservationListWithResponse("upev", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("n", response.reservationOrderIds().nextLink());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ScopePropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ScopePropertiesTests.java
deleted file mode 100644
index 69e12106be81..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/ScopePropertiesTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ScopeProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class ScopePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ScopeProperties model =
- BinaryData.fromString("{\"scope\":\"nq\",\"valid\":true}").toObject(ScopeProperties.class);
- Assertions.assertEquals("nq", model.scope());
- Assertions.assertEquals(true, model.valid());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ScopeProperties model = new ScopeProperties().withScope("nq").withValid(true);
- model = BinaryData.fromObject(model).toObject(ScopeProperties.class);
- Assertions.assertEquals("nq", model.scope());
- Assertions.assertEquals(true, model.valid());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SkuCapabilityTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SkuCapabilityTests.java
deleted file mode 100644
index 9c228f807102..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SkuCapabilityTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.SkuCapability;
-import org.junit.jupiter.api.Assertions;
-
-public final class SkuCapabilityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SkuCapability model =
- BinaryData.fromString("{\"name\":\"tonpe\",\"value\":\"pjkjlxofpdv\"}").toObject(SkuCapability.class);
- Assertions.assertEquals("tonpe", model.name());
- Assertions.assertEquals("pjkjlxofpdv", model.value());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SkuCapability model = new SkuCapability().withName("tonpe").withValue("pjkjlxofpdv");
- model = BinaryData.fromObject(model).toObject(SkuCapability.class);
- Assertions.assertEquals("tonpe", model.name());
- Assertions.assertEquals("pjkjlxofpdv", model.value());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SkuNameTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SkuNameTests.java
deleted file mode 100644
index 5621684ddd6b..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SkuNameTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.SkuName;
-import org.junit.jupiter.api.Assertions;
-
-public final class SkuNameTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SkuName model = BinaryData.fromString("{\"name\":\"wpwcukjfkgiawxkl\"}").toObject(SkuName.class);
- Assertions.assertEquals("wpwcukjfkgiawxkl", model.name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SkuName model = new SkuName().withName("wpwcukjfkgiawxkl");
- model = BinaryData.fromObject(model).toObject(SkuName.class);
- Assertions.assertEquals("wpwcukjfkgiawxkl", model.name());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SkuPropertyTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SkuPropertyTests.java
deleted file mode 100644
index 40546004ecf5..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SkuPropertyTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.SkuProperty;
-import org.junit.jupiter.api.Assertions;
-
-public final class SkuPropertyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SkuProperty model =
- BinaryData
- .fromString("{\"name\":\"hbcryffdfdosyge\",\"value\":\"aojakhmsbzjhcrz\"}")
- .toObject(SkuProperty.class);
- Assertions.assertEquals("hbcryffdfdosyge", model.name());
- Assertions.assertEquals("aojakhmsbzjhcrz", model.value());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SkuProperty model = new SkuProperty().withName("hbcryffdfdosyge").withValue("aojakhmsbzjhcrz");
- model = BinaryData.fromObject(model).toObject(SkuProperty.class);
- Assertions.assertEquals("hbcryffdfdosyge", model.name());
- Assertions.assertEquals("aojakhmsbzjhcrz", model.value());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SplitPropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SplitPropertiesTests.java
deleted file mode 100644
index 6139594f9b48..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SplitPropertiesTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.fluent.models.SplitProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class SplitPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SplitProperties model =
- BinaryData
- .fromString(
- "{\"quantities\":[1667329548,1230833613,2130063245,517935134],\"reservationId\":\"dejbavo\"}")
- .toObject(SplitProperties.class);
- Assertions.assertEquals(1667329548, model.quantities().get(0));
- Assertions.assertEquals("dejbavo", model.reservationId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SplitProperties model =
- new SplitProperties()
- .withQuantities(Arrays.asList(1667329548, 1230833613, 2130063245, 517935134))
- .withReservationId("dejbavo");
- model = BinaryData.fromObject(model).toObject(SplitProperties.class);
- Assertions.assertEquals(1667329548, model.quantities().get(0));
- Assertions.assertEquals("dejbavo", model.reservationId());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SplitRequestTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SplitRequestTests.java
deleted file mode 100644
index 4c75e895bab4..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SplitRequestTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.SplitRequest;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class SplitRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SplitRequest model =
- BinaryData
- .fromString(
- "{\"properties\":{\"quantities\":[1690822953,1146215181],\"reservationId\":\"adehxnltyfsopp\"}}")
- .toObject(SplitRequest.class);
- Assertions.assertEquals(1690822953, model.quantities().get(0));
- Assertions.assertEquals("adehxnltyfsopp", model.reservationId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SplitRequest model =
- new SplitRequest()
- .withQuantities(Arrays.asList(1690822953, 1146215181))
- .withReservationId("adehxnltyfsopp");
- model = BinaryData.fromObject(model).toObject(SplitRequest.class);
- Assertions.assertEquals(1690822953, model.quantities().get(0));
- Assertions.assertEquals("adehxnltyfsopp", model.reservationId());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SubRequestTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SubRequestTests.java
deleted file mode 100644
index 33f58796d739..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SubRequestTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.QuotaRequestState;
-import com.azure.resourcemanager.reservations.models.ResourceName;
-import com.azure.resourcemanager.reservations.models.SubRequest;
-import org.junit.jupiter.api.Assertions;
-
-public final class SubRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SubRequest model =
- BinaryData
- .fromString(
- "{\"limit\":80294620,\"name\":{\"value\":\"or\",\"localizedValue\":\"lt\"},\"resourceType\":\"mncwsobqwcsdb\",\"unit\":\"dcfhucqdpf\",\"provisioningState\":\"Succeeded\",\"message\":\"sbjjc\",\"subRequestId\":\"vxb\"}")
- .toObject(SubRequest.class);
- Assertions.assertEquals("or", model.name().value());
- Assertions.assertEquals("dcfhucqdpf", model.unit());
- Assertions.assertEquals(QuotaRequestState.SUCCEEDED, model.provisioningState());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SubRequest model =
- new SubRequest()
- .withName(new ResourceName().withValue("or"))
- .withUnit("dcfhucqdpf")
- .withProvisioningState(QuotaRequestState.SUCCEEDED);
- model = BinaryData.fromObject(model).toObject(SubRequest.class);
- Assertions.assertEquals("or", model.name().value());
- Assertions.assertEquals("dcfhucqdpf", model.unit());
- Assertions.assertEquals(QuotaRequestState.SUCCEEDED, model.provisioningState());
- }
-}
diff --git a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SubscriptionScopePropertiesTests.java b/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SubscriptionScopePropertiesTests.java
deleted file mode 100644
index 4a3283c29456..000000000000
--- a/sdk/reservations/azure-resourcemanager-reservations/src/test/java/com/azure/resourcemanager/reservations/generated/SubscriptionScopePropertiesTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.reservations.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.reservations.models.ScopeProperties;
-import com.azure.resourcemanager.reservations.models.SubscriptionScopeProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class SubscriptionScopePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SubscriptionScopeProperties model =
- BinaryData
- .fromString(
- "{\"scopes\":[{\"scope\":\"qsoqijgkd\",\"valid\":true},{\"scope\":\"zlobcufpd\",\"valid\":false},{\"scope\":\"t\",\"valid\":true}]}")
- .toObject(SubscriptionScopeProperties.class);
- Assertions.assertEquals("qsoqijgkd", model.scopes().get(0).scope());
- Assertions.assertEquals(true, model.scopes().get(0).valid());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SubscriptionScopeProperties model =
- new SubscriptionScopeProperties()
- .withScopes(
- Arrays
- .asList(
- new ScopeProperties().withScope("qsoqijgkd").withValid(true),
- new ScopeProperties().withScope("zlobcufpd").withValid(false),
- new ScopeProperties().withScope("t").withValid(true)));
- model = BinaryData.fromObject(model).toObject(SubscriptionScopeProperties.class);
- Assertions.assertEquals("qsoqijgkd", model.scopes().get(0).scope());
- Assertions.assertEquals(true, model.scopes().get(0).valid());
- }
-}