getByResourceGroupWithResponse(
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -91,7 +92,8 @@ SyncPoller, IotHubDescriptionInner> beginCrea
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -118,7 +120,8 @@ SyncPoller, IotHubDescriptionInner> beginCrea
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -138,7 +141,8 @@ IotHubDescriptionInner createOrUpdate(
*
*
Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientBuilder.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientBuilder.java
index 6c506efcce77..b5c04dfdb0b0 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientBuilder.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientBuilder.java
@@ -137,7 +137,7 @@ public IotHubClientImpl buildClient() {
localSerializerAdapter,
localDefaultPollInterval,
localEnvironment,
- subscriptionId,
+ this.subscriptionId,
localEndpoint);
return client;
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java
index bac045f9f008..1e7ee5307203 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java
@@ -220,7 +220,7 @@ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2022-11-15-preview";
+ this.apiVersion = "2023-06-30";
this.operations = new OperationsClientImpl(this);
this.iotHubResources = new IotHubResourcesClientImpl(this);
this.resourceProviderCommons = new ResourceProviderCommonsClientImpl(this);
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java
index 2f6835b2ae6e..24ec1800b9a6 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java
@@ -662,7 +662,8 @@ public IotHubDescriptionInner getByResourceGroup(String resourceGroupName, Strin
*
*
Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -725,7 +726,8 @@ private Mono>> createOrUpdateWithResponseAsync(
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -790,7 +792,8 @@ private Mono>> createOrUpdateWithResponseAsync(
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -822,7 +825,8 @@ private PollerFlux, IotHubDescriptionInner> b
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -853,7 +857,8 @@ private PollerFlux, IotHubDescriptionInner> b
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -891,7 +896,8 @@ private PollerFlux, IotHubDescriptionInner> b
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -915,7 +921,8 @@ public SyncPoller, IotHubDescriptionInner> be
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -945,7 +952,8 @@ public SyncPoller, IotHubDescriptionInner> be
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -970,7 +978,8 @@ private Mono createOrUpdateAsync(
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -994,7 +1003,8 @@ private Mono createOrUpdateAsync(
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -1024,7 +1034,8 @@ private Mono createOrUpdateAsync(
*
* Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
@@ -1046,7 +1057,8 @@ public IotHubDescriptionInner createOrUpdate(
*
*
Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
* metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
- * hub.
+ * hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to
+ * default, which may lead to unexpected behavior.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java
index d2beb9716add..fba33c2a62ef 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java
@@ -25,7 +25,7 @@ public final class ArmIdentity {
private String tenantId;
/*
- * The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly
+ * The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly
* created identity and a set of user assigned identities. The type 'None' will remove any identities from the
* service.
*/
@@ -62,7 +62,7 @@ public String tenantId() {
}
/**
- * Get the type property: The type of identity used for the resource. The type 'SystemAssigned,UserAssigned'
+ * Get the type property: The type of identity used for the resource. The type 'SystemAssigned, UserAssigned'
* includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove
* any identities from the service.
*
@@ -73,7 +73,7 @@ public ResourceIdentityType type() {
}
/**
- * Set the type property: The type of identity used for the resource. The type 'SystemAssigned,UserAssigned'
+ * Set the type property: The type of identity used for the resource. The type 'SystemAssigned, UserAssigned'
* includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove
* any identities from the service.
*
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java
index 2c319d346bb9..496cac6ae565 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java
@@ -62,11 +62,13 @@ public interface CertificateDescription {
interface Definition
extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
}
+
/** The CertificateDescription definition stages. */
interface DefinitionStages {
/** The first stage of the CertificateDescription definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the CertificateDescription definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -78,6 +80,7 @@ interface WithParentResource {
*/
WithCreate withExistingIotHub(String resourceGroupName, String resourceName);
}
+
/**
* The stage of the CertificateDescription definition which contains all the minimum required properties for the
* resource to be created, but also allows for any other optional properties to be specified.
@@ -98,6 +101,7 @@ interface WithCreate extends DefinitionStages.WithProperties, DefinitionStages.W
*/
CertificateDescription create(Context context);
}
+
/** The stage of the CertificateDescription definition allowing to specify properties. */
interface WithProperties {
/**
@@ -108,6 +112,7 @@ interface WithProperties {
*/
WithCreate withProperties(CertificateProperties properties);
}
+
/** The stage of the CertificateDescription definition allowing to specify ifMatch. */
interface WithIfMatch {
/**
@@ -121,6 +126,7 @@ interface WithIfMatch {
WithCreate withIfMatch(String ifMatch);
}
}
+
/**
* Begins update for the CertificateDescription resource.
*
@@ -145,6 +151,7 @@ interface Update extends UpdateStages.WithProperties, UpdateStages.WithIfMatch {
*/
CertificateDescription apply(Context context);
}
+
/** The CertificateDescription update stages. */
interface UpdateStages {
/** The stage of the CertificateDescription update allowing to specify properties. */
@@ -157,6 +164,7 @@ interface WithProperties {
*/
Update withProperties(CertificateProperties properties);
}
+
/** The stage of the CertificateDescription update allowing to specify ifMatch. */
interface WithIfMatch {
/**
@@ -170,6 +178,7 @@ interface WithIfMatch {
Update withIfMatch(String ifMatch);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EncryptionPropertiesDescription.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EncryptionPropertiesDescription.java
deleted file mode 100644
index 4b4405b8a2fc..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EncryptionPropertiesDescription.java
+++ /dev/null
@@ -1,80 +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.iothub.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** The encryption properties for the IoT hub. */
-@Fluent
-public final class EncryptionPropertiesDescription {
- /*
- * The source of the key.
- */
- @JsonProperty(value = "keySource")
- private String keySource;
-
- /*
- * The properties of the KeyVault key.
- */
- @JsonProperty(value = "keyVaultProperties")
- private List keyVaultProperties;
-
- /** Creates an instance of EncryptionPropertiesDescription class. */
- public EncryptionPropertiesDescription() {
- }
-
- /**
- * Get the keySource property: The source of the key.
- *
- * @return the keySource value.
- */
- public String keySource() {
- return this.keySource;
- }
-
- /**
- * Set the keySource property: The source of the key.
- *
- * @param keySource the keySource value to set.
- * @return the EncryptionPropertiesDescription object itself.
- */
- public EncryptionPropertiesDescription withKeySource(String keySource) {
- this.keySource = keySource;
- return this;
- }
-
- /**
- * Get the keyVaultProperties property: The properties of the KeyVault key.
- *
- * @return the keyVaultProperties value.
- */
- public List keyVaultProperties() {
- return this.keyVaultProperties;
- }
-
- /**
- * Set the keyVaultProperties property: The properties of the KeyVault key.
- *
- * @param keyVaultProperties the keyVaultProperties value to set.
- * @return the EncryptionPropertiesDescription object itself.
- */
- public EncryptionPropertiesDescription withKeyVaultProperties(List keyVaultProperties) {
- this.keyVaultProperties = keyVaultProperties;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (keyVaultProperties() != null) {
- keyVaultProperties().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ErrorDetails.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ErrorDetails.java
index 6a601a5590d7..7b4e534a7340 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ErrorDetails.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ErrorDetails.java
@@ -26,7 +26,7 @@ public ErrorDetails() {
*
* @return the httpStatusCode value.
*/
- public String getHttpStatusCode() {
+ public String httpStatusCode() {
return this.httpStatusCode;
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupInfo.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupInfo.java
index e9ca6fd06336..53d57c55e38c 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupInfo.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupInfo.java
@@ -59,11 +59,13 @@ interface Definition
DefinitionStages.WithProperties,
DefinitionStages.WithCreate {
}
+
/** The EventHubConsumerGroupInfo definition stages. */
interface DefinitionStages {
/** The first stage of the EventHubConsumerGroupInfo definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the EventHubConsumerGroupInfo definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -77,6 +79,7 @@ interface WithParentResource {
WithProperties withExistingEventHubEndpoint(
String resourceGroupName, String resourceName, String eventHubEndpointName);
}
+
/** The stage of the EventHubConsumerGroupInfo definition allowing to specify properties. */
interface WithProperties {
/**
@@ -87,6 +90,7 @@ interface WithProperties {
*/
WithCreate withProperties(EventHubConsumerGroupName properties);
}
+
/**
* The stage of the EventHubConsumerGroupInfo definition which contains all the minimum required properties for
* the resource to be created, but also allows for any other optional properties to be specified.
@@ -108,6 +112,7 @@ interface WithCreate {
EventHubConsumerGroupInfo create(Context context);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java
index 8f09aef71b2d..634599247022 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java
@@ -121,11 +121,13 @@ interface Definition
DefinitionStages.WithSku,
DefinitionStages.WithCreate {
}
+
/** The IotHubDescription definition stages. */
interface DefinitionStages {
/** The first stage of the IotHubDescription definition. */
interface Blank extends WithLocation {
}
+
/** The stage of the IotHubDescription definition allowing to specify location. */
interface WithLocation {
/**
@@ -144,6 +146,7 @@ interface WithLocation {
*/
WithResourceGroup withRegion(String location);
}
+
/** The stage of the IotHubDescription definition allowing to specify parent resource. */
interface WithResourceGroup {
/**
@@ -154,6 +157,7 @@ interface WithResourceGroup {
*/
WithSku withExistingResourceGroup(String resourceGroupName);
}
+
/** The stage of the IotHubDescription definition allowing to specify sku. */
interface WithSku {
/**
@@ -164,6 +168,7 @@ interface WithSku {
*/
WithCreate withSku(IotHubSkuInfo sku);
}
+
/**
* The stage of the IotHubDescription definition which contains all the minimum required properties for the
* resource to be created, but also allows for any other optional properties to be specified.
@@ -189,6 +194,7 @@ interface WithCreate
*/
IotHubDescription create(Context context);
}
+
/** The stage of the IotHubDescription definition allowing to specify tags. */
interface WithTags {
/**
@@ -199,6 +205,7 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+
/** The stage of the IotHubDescription definition allowing to specify etag. */
interface WithEtag {
/**
@@ -211,6 +218,7 @@ interface WithEtag {
*/
WithCreate withEtag(String etag);
}
+
/** The stage of the IotHubDescription definition allowing to specify properties. */
interface WithProperties {
/**
@@ -221,6 +229,7 @@ interface WithProperties {
*/
WithCreate withProperties(IotHubProperties properties);
}
+
/** The stage of the IotHubDescription definition allowing to specify identity. */
interface WithIdentity {
/**
@@ -231,6 +240,7 @@ interface WithIdentity {
*/
WithCreate withIdentity(ArmIdentity identity);
}
+
/** The stage of the IotHubDescription definition allowing to specify ifMatch. */
interface WithIfMatch {
/**
@@ -244,6 +254,7 @@ interface WithIfMatch {
WithCreate withIfMatch(String ifMatch);
}
}
+
/**
* Begins update for the IotHubDescription resource.
*
@@ -268,6 +279,7 @@ interface Update extends UpdateStages.WithTags {
*/
IotHubDescription apply(Context context);
}
+
/** The IotHubDescription update stages. */
interface UpdateStages {
/** The stage of the IotHubDescription update allowing to specify tags. */
@@ -281,6 +293,7 @@ interface WithTags {
Update withTags(Map tags);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java
index d9918847b688..3c6fd1cbdc34 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java
@@ -152,24 +152,12 @@ public final class IotHubProperties {
@JsonProperty(value = "comments")
private String comments;
- /*
- * The device streams properties of iothub.
- */
- @JsonProperty(value = "deviceStreams")
- private IotHubPropertiesDeviceStreams deviceStreams;
-
/*
* The capabilities and features enabled for the IoT hub.
*/
@JsonProperty(value = "features")
private Capabilities features;
- /*
- * The encryption properties for the IoT hub.
- */
- @JsonProperty(value = "encryption")
- private EncryptionPropertiesDescription encryption;
-
/*
* Primary and secondary location for iot hub
*/
@@ -182,18 +170,6 @@ public final class IotHubProperties {
@JsonProperty(value = "enableDataResidency")
private Boolean enableDataResidency;
- /*
- * This property store root certificate related information
- */
- @JsonProperty(value = "rootCertificate")
- private RootCertificateProperties rootCertificate;
-
- /*
- * This property specifies the IP Version the hub is currently utilizing.
- */
- @JsonProperty(value = "ipVersion")
- private IpVersion ipVersion;
-
/** Creates an instance of IotHubProperties class. */
public IotHubProperties() {
}
@@ -609,26 +585,6 @@ public IotHubProperties withComments(String comments) {
return this;
}
- /**
- * Get the deviceStreams property: The device streams properties of iothub.
- *
- * @return the deviceStreams value.
- */
- public IotHubPropertiesDeviceStreams deviceStreams() {
- return this.deviceStreams;
- }
-
- /**
- * Set the deviceStreams property: The device streams properties of iothub.
- *
- * @param deviceStreams the deviceStreams value to set.
- * @return the IotHubProperties object itself.
- */
- public IotHubProperties withDeviceStreams(IotHubPropertiesDeviceStreams deviceStreams) {
- this.deviceStreams = deviceStreams;
- return this;
- }
-
/**
* Get the features property: The capabilities and features enabled for the IoT hub.
*
@@ -649,26 +605,6 @@ public IotHubProperties withFeatures(Capabilities features) {
return this;
}
- /**
- * Get the encryption property: The encryption properties for the IoT hub.
- *
- * @return the encryption value.
- */
- public EncryptionPropertiesDescription encryption() {
- return this.encryption;
- }
-
- /**
- * Set the encryption property: The encryption properties for the IoT hub.
- *
- * @param encryption the encryption value to set.
- * @return the IotHubProperties object itself.
- */
- public IotHubProperties withEncryption(EncryptionPropertiesDescription encryption) {
- this.encryption = encryption;
- return this;
- }
-
/**
* Get the locations property: Primary and secondary location for iot hub.
*
@@ -700,46 +636,6 @@ public IotHubProperties withEnableDataResidency(Boolean enableDataResidency) {
return this;
}
- /**
- * Get the rootCertificate property: This property store root certificate related information.
- *
- * @return the rootCertificate value.
- */
- public RootCertificateProperties rootCertificate() {
- return this.rootCertificate;
- }
-
- /**
- * Set the rootCertificate property: This property store root certificate related information.
- *
- * @param rootCertificate the rootCertificate value to set.
- * @return the IotHubProperties object itself.
- */
- public IotHubProperties withRootCertificate(RootCertificateProperties rootCertificate) {
- this.rootCertificate = rootCertificate;
- return this;
- }
-
- /**
- * Get the ipVersion property: This property specifies the IP Version the hub is currently utilizing.
- *
- * @return the ipVersion value.
- */
- public IpVersion ipVersion() {
- return this.ipVersion;
- }
-
- /**
- * Set the ipVersion property: This property specifies the IP Version the hub is currently utilizing.
- *
- * @param ipVersion the ipVersion value to set.
- * @return the IotHubProperties object itself.
- */
- public IotHubProperties withIpVersion(IpVersion ipVersion) {
- this.ipVersion = ipVersion;
- return this;
- }
-
/**
* Validates the instance.
*
@@ -794,17 +690,8 @@ public void validate() {
if (cloudToDevice() != null) {
cloudToDevice().validate();
}
- if (deviceStreams() != null) {
- deviceStreams().validate();
- }
- if (encryption() != null) {
- encryption().validate();
- }
if (locations() != null) {
locations().forEach(e -> e.validate());
}
- if (rootCertificate() != null) {
- rootCertificate().validate();
- }
}
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubPropertiesDeviceStreams.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubPropertiesDeviceStreams.java
deleted file mode 100644
index ace27da806e6..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubPropertiesDeviceStreams.java
+++ /dev/null
@@ -1,51 +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.iothub.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** The device streams properties of iothub. */
-@Fluent
-public final class IotHubPropertiesDeviceStreams {
- /*
- * List of Device Streams Endpoints.
- */
- @JsonProperty(value = "streamingEndpoints")
- private List streamingEndpoints;
-
- /** Creates an instance of IotHubPropertiesDeviceStreams class. */
- public IotHubPropertiesDeviceStreams() {
- }
-
- /**
- * Get the streamingEndpoints property: List of Device Streams Endpoints.
- *
- * @return the streamingEndpoints value.
- */
- public List streamingEndpoints() {
- return this.streamingEndpoints;
- }
-
- /**
- * Set the streamingEndpoints property: List of Device Streams Endpoints.
- *
- * @param streamingEndpoints the streamingEndpoints value to set.
- * @return the IotHubPropertiesDeviceStreams object itself.
- */
- public IotHubPropertiesDeviceStreams withStreamingEndpoints(List streamingEndpoints) {
- this.streamingEndpoints = streamingEndpoints;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IpVersion.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IpVersion.java
deleted file mode 100644
index 496858e0f0b3..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IpVersion.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.iothub.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** This property specifies the IP Version the hub is currently utilizing. */
-public final class IpVersion extends ExpandableStringEnum {
- /** Static value ipv4 for IpVersion. */
- public static final IpVersion IPV4 = fromString("ipv4");
-
- /** Static value ipv6 for IpVersion. */
- public static final IpVersion IPV6 = fromString("ipv6");
-
- /** Static value ipv4ipv6 for IpVersion. */
- public static final IpVersion IPV4IPV6 = fromString("ipv4ipv6");
-
- /**
- * Creates a new instance of IpVersion value.
- *
- * @deprecated Use the {@link #fromString(String)} factory method.
- */
- @Deprecated
- public IpVersion() {
- }
-
- /**
- * Creates or finds a IpVersion from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding IpVersion.
- */
- @JsonCreator
- public static IpVersion fromString(String name) {
- return fromString(name, IpVersion.class);
- }
-
- /**
- * Gets known IpVersion values.
- *
- * @return known IpVersion values.
- */
- public static Collection values() {
- return values(IpVersion.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/KeyVaultKeyProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/KeyVaultKeyProperties.java
deleted file mode 100644
index f106a37fdc4a..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/KeyVaultKeyProperties.java
+++ /dev/null
@@ -1,79 +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.iothub.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The properties of the KeyVault key. */
-@Fluent
-public final class KeyVaultKeyProperties {
- /*
- * The identifier of the key.
- */
- @JsonProperty(value = "keyIdentifier")
- private String keyIdentifier;
-
- /*
- * Managed identity properties of KeyVault Key.
- */
- @JsonProperty(value = "identity")
- private ManagedIdentity identity;
-
- /** Creates an instance of KeyVaultKeyProperties class. */
- public KeyVaultKeyProperties() {
- }
-
- /**
- * Get the keyIdentifier property: The identifier of the key.
- *
- * @return the keyIdentifier value.
- */
- public String keyIdentifier() {
- return this.keyIdentifier;
- }
-
- /**
- * Set the keyIdentifier property: The identifier of the key.
- *
- * @param keyIdentifier the keyIdentifier value to set.
- * @return the KeyVaultKeyProperties object itself.
- */
- public KeyVaultKeyProperties withKeyIdentifier(String keyIdentifier) {
- this.keyIdentifier = keyIdentifier;
- return this;
- }
-
- /**
- * Get the identity property: Managed identity properties of KeyVault Key.
- *
- * @return the identity value.
- */
- public ManagedIdentity identity() {
- return this.identity;
- }
-
- /**
- * Set the identity property: Managed identity properties of KeyVault Key.
- *
- * @param identity the identity value to set.
- * @return the KeyVaultKeyProperties object itself.
- */
- public KeyVaultKeyProperties withIdentity(ManagedIdentity identity) {
- this.identity = identity;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (identity() != null) {
- identity().validate();
- }
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ResourceIdentityType.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ResourceIdentityType.java
index e2c4dcca374d..01d082c3b9c6 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ResourceIdentityType.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ResourceIdentityType.java
@@ -8,7 +8,7 @@
import com.fasterxml.jackson.annotation.JsonValue;
/**
- * The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly
+ * The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly
* created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.
*/
public enum ResourceIdentityType {
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RootCertificateProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RootCertificateProperties.java
deleted file mode 100644
index 5966512f8c6d..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RootCertificateProperties.java
+++ /dev/null
@@ -1,68 +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.iothub.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
-
-/** This property store root certificate related information. */
-@Fluent
-public final class RootCertificateProperties {
- /*
- * This property when set to true, hub will use G2 cert; while it's set to false, hub uses Baltimore Cert.
- */
- @JsonProperty(value = "enableRootCertificateV2")
- private Boolean enableRootCertificateV2;
-
- /*
- * the last update time to root certificate flag.
- */
- @JsonProperty(value = "lastUpdatedTimeUtc", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime lastUpdatedTimeUtc;
-
- /** Creates an instance of RootCertificateProperties class. */
- public RootCertificateProperties() {
- }
-
- /**
- * Get the enableRootCertificateV2 property: This property when set to true, hub will use G2 cert; while it's set to
- * false, hub uses Baltimore Cert.
- *
- * @return the enableRootCertificateV2 value.
- */
- public Boolean enableRootCertificateV2() {
- return this.enableRootCertificateV2;
- }
-
- /**
- * Set the enableRootCertificateV2 property: This property when set to true, hub will use G2 cert; while it's set to
- * false, hub uses Baltimore Cert.
- *
- * @param enableRootCertificateV2 the enableRootCertificateV2 value to set.
- * @return the RootCertificateProperties object itself.
- */
- public RootCertificateProperties withEnableRootCertificateV2(Boolean enableRootCertificateV2) {
- this.enableRootCertificateV2 = enableRootCertificateV2;
- return this;
- }
-
- /**
- * Get the lastUpdatedTimeUtc property: the last update time to root certificate flag.
- *
- * @return the lastUpdatedTimeUtc value.
- */
- public OffsetDateTime lastUpdatedTimeUtc() {
- return this.lastUpdatedTimeUtc;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingCosmosDBSqlApiProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingCosmosDBSqlApiProperties.java
index 022dc9d0f732..d6c04afcebb9 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingCosmosDBSqlApiProperties.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingCosmosDBSqlApiProperties.java
@@ -8,7 +8,7 @@
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The properties related to a cosmos DB sql collection endpoint. */
+/** The properties related to a cosmos DB sql container endpoint. */
@Fluent
public final class RoutingCosmosDBSqlApiProperties {
/*
@@ -20,9 +20,9 @@ public final class RoutingCosmosDBSqlApiProperties {
private String name;
/*
- * Id of the cosmos DB sql collection endpoint
+ * Id of the cosmos DB sql container endpoint
*/
- @JsonProperty(value = "id")
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
private String id;
/*
@@ -44,13 +44,13 @@ public final class RoutingCosmosDBSqlApiProperties {
private String endpointUri;
/*
- * Method used to authenticate against the cosmos DB sql collection endpoint
+ * Method used to authenticate against the cosmos DB sql container endpoint
*/
@JsonProperty(value = "authenticationType")
private AuthenticationType authenticationType;
/*
- * Managed identity properties of routing cosmos DB collection endpoint.
+ * Managed identity properties of routing cosmos DB container endpoint.
*/
@JsonProperty(value = "identity")
private ManagedIdentity identity;
@@ -74,20 +74,20 @@ public final class RoutingCosmosDBSqlApiProperties {
private String databaseName;
/*
- * The name of the cosmos DB sql collection in the cosmos DB database.
+ * The name of the cosmos DB sql container in the cosmos DB database.
*/
- @JsonProperty(value = "collectionName", required = true)
- private String collectionName;
+ @JsonProperty(value = "containerName", required = true)
+ private String containerName;
/*
- * The name of the partition key associated with this cosmos DB sql collection if one exists. This is an optional
+ * The name of the partition key associated with this cosmos DB sql container if one exists. This is an optional
* parameter.
*/
@JsonProperty(value = "partitionKeyName")
private String partitionKeyName;
/*
- * The template for generating a synthetic partition key value for use with this cosmos DB sql collection. The
+ * The template for generating a synthetic partition key value for use with this cosmos DB sql container. The
* template must include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}.
* Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. This
* parameter is only required if PartitionKeyName is specified.
@@ -124,7 +124,7 @@ public RoutingCosmosDBSqlApiProperties withName(String name) {
}
/**
- * Get the id property: Id of the cosmos DB sql collection endpoint.
+ * Get the id property: Id of the cosmos DB sql container endpoint.
*
* @return the id value.
*/
@@ -132,17 +132,6 @@ public String id() {
return this.id;
}
- /**
- * Set the id property: Id of the cosmos DB sql collection endpoint.
- *
- * @param id the id value to set.
- * @return the RoutingCosmosDBSqlApiProperties object itself.
- */
- public RoutingCosmosDBSqlApiProperties withId(String id) {
- this.id = id;
- return this;
- }
-
/**
* Get the subscriptionId property: The subscription identifier of the cosmos DB account.
*
@@ -204,7 +193,7 @@ public RoutingCosmosDBSqlApiProperties withEndpointUri(String endpointUri) {
}
/**
- * Get the authenticationType property: Method used to authenticate against the cosmos DB sql collection endpoint.
+ * Get the authenticationType property: Method used to authenticate against the cosmos DB sql container endpoint.
*
* @return the authenticationType value.
*/
@@ -213,7 +202,7 @@ public AuthenticationType authenticationType() {
}
/**
- * Set the authenticationType property: Method used to authenticate against the cosmos DB sql collection endpoint.
+ * Set the authenticationType property: Method used to authenticate against the cosmos DB sql container endpoint.
*
* @param authenticationType the authenticationType value to set.
* @return the RoutingCosmosDBSqlApiProperties object itself.
@@ -224,7 +213,7 @@ public RoutingCosmosDBSqlApiProperties withAuthenticationType(AuthenticationType
}
/**
- * Get the identity property: Managed identity properties of routing cosmos DB collection endpoint.
+ * Get the identity property: Managed identity properties of routing cosmos DB container endpoint.
*
* @return the identity value.
*/
@@ -233,7 +222,7 @@ public ManagedIdentity identity() {
}
/**
- * Set the identity property: Managed identity properties of routing cosmos DB collection endpoint.
+ * Set the identity property: Managed identity properties of routing cosmos DB container endpoint.
*
* @param identity the identity value to set.
* @return the RoutingCosmosDBSqlApiProperties object itself.
@@ -304,27 +293,27 @@ public RoutingCosmosDBSqlApiProperties withDatabaseName(String databaseName) {
}
/**
- * Get the collectionName property: The name of the cosmos DB sql collection in the cosmos DB database.
+ * Get the containerName property: The name of the cosmos DB sql container in the cosmos DB database.
*
- * @return the collectionName value.
+ * @return the containerName value.
*/
- public String collectionName() {
- return this.collectionName;
+ public String containerName() {
+ return this.containerName;
}
/**
- * Set the collectionName property: The name of the cosmos DB sql collection in the cosmos DB database.
+ * Set the containerName property: The name of the cosmos DB sql container in the cosmos DB database.
*
- * @param collectionName the collectionName value to set.
+ * @param containerName the containerName value to set.
* @return the RoutingCosmosDBSqlApiProperties object itself.
*/
- public RoutingCosmosDBSqlApiProperties withCollectionName(String collectionName) {
- this.collectionName = collectionName;
+ public RoutingCosmosDBSqlApiProperties withContainerName(String containerName) {
+ this.containerName = containerName;
return this;
}
/**
- * Get the partitionKeyName property: The name of the partition key associated with this cosmos DB sql collection if
+ * Get the partitionKeyName property: The name of the partition key associated with this cosmos DB sql container if
* one exists. This is an optional parameter.
*
* @return the partitionKeyName value.
@@ -334,7 +323,7 @@ public String partitionKeyName() {
}
/**
- * Set the partitionKeyName property: The name of the partition key associated with this cosmos DB sql collection if
+ * Set the partitionKeyName property: The name of the partition key associated with this cosmos DB sql container if
* one exists. This is an optional parameter.
*
* @param partitionKeyName the partitionKeyName value to set.
@@ -347,7 +336,7 @@ public RoutingCosmosDBSqlApiProperties withPartitionKeyName(String partitionKeyN
/**
* Get the partitionKeyTemplate property: The template for generating a synthetic partition key value for use with
- * this cosmos DB sql collection. The template must include at least one of the following placeholders: {iothub},
+ * this cosmos DB sql container. The template must include at least one of the following placeholders: {iothub},
* {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and
* non-placeholder components are arbitrary. This parameter is only required if PartitionKeyName is specified.
*
@@ -359,7 +348,7 @@ public String partitionKeyTemplate() {
/**
* Set the partitionKeyTemplate property: The template for generating a synthetic partition key value for use with
- * this cosmos DB sql collection. The template must include at least one of the following placeholders: {iothub},
+ * this cosmos DB sql container. The template must include at least one of the following placeholders: {iothub},
* {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and
* non-placeholder components are arbitrary. This parameter is only required if PartitionKeyName is specified.
*
@@ -398,11 +387,11 @@ public void validate() {
new IllegalArgumentException(
"Missing required property databaseName in model RoutingCosmosDBSqlApiProperties"));
}
- if (collectionName() == null) {
+ if (containerName() == null) {
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
- "Missing required property collectionName in model RoutingCosmosDBSqlApiProperties"));
+ "Missing required property containerName in model RoutingCosmosDBSqlApiProperties"));
}
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEndpoints.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEndpoints.java
index 95624d66dcae..ff30a6f12ae0 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEndpoints.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEndpoints.java
@@ -41,10 +41,10 @@ public final class RoutingEndpoints {
private List storageContainers;
/*
- * The list of Cosmos DB collection endpoints that IoT hub routes messages to, based on the routing rules.
+ * The list of Cosmos DB container endpoints that IoT hub routes messages to, based on the routing rules.
*/
- @JsonProperty(value = "cosmosDBSqlCollections")
- private List cosmosDBSqlCollections;
+ @JsonProperty(value = "cosmosDBSqlContainers")
+ private List cosmosDBSqlContainers;
/** Creates an instance of RoutingEndpoints class. */
public RoutingEndpoints() {
@@ -139,24 +139,24 @@ public RoutingEndpoints withStorageContainers(List cosmosDBSqlCollections() {
- return this.cosmosDBSqlCollections;
+ public List cosmosDBSqlContainers() {
+ return this.cosmosDBSqlContainers;
}
/**
- * Set the cosmosDBSqlCollections property: The list of Cosmos DB collection endpoints that IoT hub routes messages
+ * Set the cosmosDBSqlContainers property: The list of Cosmos DB container endpoints that IoT hub routes messages
* to, based on the routing rules.
*
- * @param cosmosDBSqlCollections the cosmosDBSqlCollections value to set.
+ * @param cosmosDBSqlContainers the cosmosDBSqlContainers value to set.
* @return the RoutingEndpoints object itself.
*/
- public RoutingEndpoints withCosmosDBSqlCollections(List cosmosDBSqlCollections) {
- this.cosmosDBSqlCollections = cosmosDBSqlCollections;
+ public RoutingEndpoints withCosmosDBSqlContainers(List cosmosDBSqlContainers) {
+ this.cosmosDBSqlContainers = cosmosDBSqlContainers;
return this;
}
@@ -178,8 +178,8 @@ public void validate() {
if (storageContainers() != null) {
storageContainers().forEach(e -> e.validate());
}
- if (cosmosDBSqlCollections() != null) {
- cosmosDBSqlCollections().forEach(e -> e.validate());
+ if (cosmosDBSqlContainers() != null) {
+ cosmosDBSqlContainers().forEach(e -> e.validate());
}
}
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingProperties.java
index c02c18d8b4a1..97c5b204afeb 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingProperties.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingProperties.java
@@ -32,8 +32,8 @@ public final class RoutingProperties {
/*
* The properties of the route that is used as a fall-back route when none of the conditions specified in the
- * 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do
- * not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint.
+ * 'routes' section are met. This is an optional parameter. When this property is not present in the template, the
+ * fallback route is disabled by default.
*/
@JsonProperty(value = "fallbackRoute")
private FallbackRouteProperties fallbackRoute;
@@ -100,8 +100,7 @@ public RoutingProperties withRoutes(List routes) {
/**
* Get the fallbackRoute property: The properties of the route that is used as a fall-back route when none of the
* conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not
- * set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the
- * built-in eventhub endpoint.
+ * present in the template, the fallback route is disabled by default.
*
* @return the fallbackRoute value.
*/
@@ -112,8 +111,7 @@ public FallbackRouteProperties fallbackRoute() {
/**
* Set the fallbackRoute property: The properties of the route that is used as a fall-back route when none of the
* conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not
- * set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the
- * built-in eventhub endpoint.
+ * present in the template, the fallback route is disabled by default.
*
* @param fallbackRoute the fallbackRoute value to set.
* @return the RoutingProperties object itself.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java
index b7db729608af..749ab75aac1e 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java
@@ -25,15 +25,9 @@ public final class RoutingSource extends ExpandableStringEnum {
/** Static value DeviceJobLifecycleEvents for RoutingSource. */
public static final RoutingSource DEVICE_JOB_LIFECYCLE_EVENTS = fromString("DeviceJobLifecycleEvents");
- /** Static value DigitalTwinChangeEvents for RoutingSource. */
- public static final RoutingSource DIGITAL_TWIN_CHANGE_EVENTS = fromString("DigitalTwinChangeEvents");
-
/** Static value DeviceConnectionStateEvents for RoutingSource. */
public static final RoutingSource DEVICE_CONNECTION_STATE_EVENTS = fromString("DeviceConnectionStateEvents");
- /** Static value MqttBrokerMessages for RoutingSource. */
- public static final RoutingSource MQTT_BROKER_MESSAGES = fromString("MqttBrokerMessages");
-
/**
* Creates a new instance of RoutingSource value.
*
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesCreateOrUpdateSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesCreateOrUpdateSamples.java
index 67c58c331f70..cd55189b2dc0 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesCreateOrUpdateSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesCreateOrUpdateSamples.java
@@ -9,7 +9,7 @@
/** Samples for Certificates CreateOrUpdate. */
public final class CertificatesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_certificatescreateorupdate.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_certificatescreateorupdate.json
*/
/**
* Sample code: Certificates_CreateOrUpdate.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesDeleteSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesDeleteSamples.java
index 61ba2a5ca588..1c47823a0532 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesDeleteSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for Certificates Delete. */
public final class CertificatesDeleteSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_certificatesdelete.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_certificatesdelete.json
*/
/**
* Sample code: Certificates_Delete.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGenerateVerificationCodeSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGenerateVerificationCodeSamples.java
index 5ec7905114f6..9f22190de3d7 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGenerateVerificationCodeSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGenerateVerificationCodeSamples.java
@@ -7,7 +7,7 @@
/** Samples for Certificates GenerateVerificationCode. */
public final class CertificatesGenerateVerificationCodeSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_generateverificationcode.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_generateverificationcode.json
*/
/**
* Sample code: Certificates_GenerateVerificationCode.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGetSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGetSamples.java
index 0ee916a6f086..0a49b7bf782f 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGetSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for Certificates Get. */
public final class CertificatesGetSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getcertificate.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getcertificate.json
*/
/**
* Sample code: Certificates_Get.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesListByIotHubSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesListByIotHubSamples.java
index c2023a216ea9..07f13f148296 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesListByIotHubSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesListByIotHubSamples.java
@@ -7,7 +7,7 @@
/** Samples for Certificates ListByIotHub. */
public final class CertificatesListByIotHubSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listcertificates.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listcertificates.json
*/
/**
* Sample code: Certificates_ListByIotHub.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesVerifySamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesVerifySamples.java
index 8d60108f9d5f..4196f0c4c6d8 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesVerifySamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesVerifySamples.java
@@ -9,7 +9,7 @@
/** Samples for Certificates Verify. */
public final class CertificatesVerifySamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_certverify.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_certverify.json
*/
/**
* Sample code: Certificates_Verify.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubManualFailoverSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubManualFailoverSamples.java
index eab64aa98e1f..8e1aa57f5aab 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubManualFailoverSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubManualFailoverSamples.java
@@ -9,7 +9,7 @@
/** Samples for IotHub ManualFailover. */
public final class IotHubManualFailoverSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/IotHub_ManualFailover.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/IotHub_ManualFailover.json
*/
/**
* Sample code: IotHub_ManualFailover.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCheckNameAvailabilitySamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCheckNameAvailabilitySamples.java
index 0facb51a6a4b..13ad2adb3231 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCheckNameAvailabilitySamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCheckNameAvailabilitySamples.java
@@ -9,7 +9,7 @@
/** Samples for IotHubResource CheckNameAvailability. */
public final class IotHubResourceCheckNameAvailabilitySamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/checkNameAvailability.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/checkNameAvailability.json
*/
/**
* Sample code: IotHubResource_CheckNameAvailability.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateEventHubConsumerGroupSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateEventHubConsumerGroupSamples.java
index 36c0715687a0..f62884542f29 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateEventHubConsumerGroupSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateEventHubConsumerGroupSamples.java
@@ -9,7 +9,7 @@
/** Samples for IotHubResource CreateEventHubConsumerGroup. */
public final class IotHubResourceCreateEventHubConsumerGroupSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_createconsumergroup.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_createconsumergroup.json
*/
/**
* Sample code: IotHubResource_CreateEventHubConsumerGroup.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateOrUpdateSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateOrUpdateSamples.java
index ea4d482473b4..13d104fd771e 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateOrUpdateSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateOrUpdateSamples.java
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.iothub.generated;
+import com.azure.resourcemanager.iothub.models.AuthenticationType;
import com.azure.resourcemanager.iothub.models.Capabilities;
import com.azure.resourcemanager.iothub.models.CloudToDeviceProperties;
import com.azure.resourcemanager.iothub.models.DefaultAction;
@@ -13,12 +14,11 @@
import com.azure.resourcemanager.iothub.models.IotHubProperties;
import com.azure.resourcemanager.iothub.models.IotHubSku;
import com.azure.resourcemanager.iothub.models.IotHubSkuInfo;
-import com.azure.resourcemanager.iothub.models.IpVersion;
import com.azure.resourcemanager.iothub.models.MessagingEndpointProperties;
import com.azure.resourcemanager.iothub.models.NetworkRuleIpAction;
import com.azure.resourcemanager.iothub.models.NetworkRuleSetIpRule;
import com.azure.resourcemanager.iothub.models.NetworkRuleSetProperties;
-import com.azure.resourcemanager.iothub.models.RootCertificateProperties;
+import com.azure.resourcemanager.iothub.models.RoutingCosmosDBSqlApiProperties;
import com.azure.resourcemanager.iothub.models.RoutingEndpoints;
import com.azure.resourcemanager.iothub.models.RoutingProperties;
import com.azure.resourcemanager.iothub.models.RoutingSource;
@@ -31,7 +31,7 @@
/** Samples for IotHubResource CreateOrUpdate. */
public final class IotHubResourceCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_createOrUpdate.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_createOrUpdate.json
*/
/**
* Sample code: IotHubResource_CreateOrUpdate.
@@ -109,12 +109,110 @@ public static void iotHubResourceCreateOrUpdate(com.azure.resourcemanager.iothub
.withTtlAsIso8601(Duration.parse("PT1H"))
.withMaxDeliveryCount(10)))
.withFeatures(Capabilities.NONE)
- .withEnableDataResidency(true)
- .withRootCertificate(new RootCertificateProperties().withEnableRootCertificateV2(true))
- .withIpVersion(IpVersion.IPV4IPV6))
+ .withEnableDataResidency(false))
.create();
}
+ /*
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_addRoutingCosmosDBEndpoint.json
+ */
+ /**
+ * Sample code: IotHubResource_AddCosmosDbEndpoint.
+ *
+ * @param manager Entry point to IotHubManager.
+ */
+ public static void iotHubResourceAddCosmosDbEndpoint(com.azure.resourcemanager.iothub.IotHubManager manager) {
+ manager
+ .iotHubResources()
+ .define("testHub")
+ .withRegion("centraluseuap")
+ .withExistingResourceGroup("myResourceGroup")
+ .withSku(new IotHubSkuInfo().withName(IotHubSku.S1).withCapacity(1L))
+ .withTags(mapOf())
+ .withEtag("AAAAAAFD6M4=")
+ .withProperties(
+ new IotHubProperties()
+ .withIpFilterRules(Arrays.asList())
+ .withNetworkRuleSets(
+ new NetworkRuleSetProperties()
+ .withDefaultAction(DefaultAction.DENY)
+ .withApplyToBuiltInEventHubEndpoint(true)
+ .withIpRules(
+ Arrays
+ .asList(
+ new NetworkRuleSetIpRule()
+ .withFilterName("rule1")
+ .withAction(NetworkRuleIpAction.ALLOW)
+ .withIpMask("131.117.159.53"),
+ new NetworkRuleSetIpRule()
+ .withFilterName("rule2")
+ .withAction(NetworkRuleIpAction.ALLOW)
+ .withIpMask("157.55.59.128/25"))))
+ .withMinTlsVersion("1.2")
+ .withEventHubEndpoints(
+ mapOf("events", new EventHubProperties().withRetentionTimeInDays(1L).withPartitionCount(2)))
+ .withRouting(
+ new RoutingProperties()
+ .withEndpoints(
+ new RoutingEndpoints()
+ .withServiceBusQueues(Arrays.asList())
+ .withServiceBusTopics(Arrays.asList())
+ .withEventHubs(Arrays.asList())
+ .withStorageContainers(Arrays.asList())
+ .withCosmosDBSqlContainers(
+ Arrays
+ .asList(
+ new RoutingCosmosDBSqlApiProperties()
+ .withName("endpointcosmos")
+ .withSubscriptionId("")
+ .withResourceGroup("rg-test")
+ .withEndpointUri(
+ "https://test-systemstore-test2.documents.azure.com")
+ .withAuthenticationType(AuthenticationType.KEY_BASED)
+ .withPrimaryKey("fakeTokenPlaceholder")
+ .withSecondaryKey("fakeTokenPlaceholder")
+ .withDatabaseName("systemstore")
+ .withContainerName("test")
+ .withPartitionKeyName("fakeTokenPlaceholder")
+ .withPartitionKeyTemplate("fakeTokenPlaceholder"))))
+ .withRoutes(Arrays.asList())
+ .withFallbackRoute(
+ new FallbackRouteProperties()
+ .withName("$fallback")
+ .withSource(RoutingSource.DEVICE_MESSAGES)
+ .withCondition("true")
+ .withEndpointNames(Arrays.asList("events"))
+ .withIsEnabled(true)))
+ .withStorageEndpoints(
+ mapOf(
+ "$default",
+ new StorageEndpointProperties()
+ .withSasTtlAsIso8601(Duration.parse("PT1H"))
+ .withConnectionString("")
+ .withContainerName("")))
+ .withMessagingEndpoints(
+ mapOf(
+ "fileNotifications",
+ new MessagingEndpointProperties()
+ .withLockDurationAsIso8601(Duration.parse("PT1M"))
+ .withTtlAsIso8601(Duration.parse("PT1H"))
+ .withMaxDeliveryCount(10)))
+ .withEnableFileUploadNotifications(false)
+ .withCloudToDevice(
+ new CloudToDeviceProperties()
+ .withMaxDeliveryCount(10)
+ .withDefaultTtlAsIso8601(Duration.parse("PT1H"))
+ .withFeedback(
+ new FeedbackProperties()
+ .withLockDurationAsIso8601(Duration.parse("PT1M"))
+ .withTtlAsIso8601(Duration.parse("PT1H"))
+ .withMaxDeliveryCount(10)))
+ .withFeatures(Capabilities.NONE)
+ .withEnableDataResidency(false))
+ .create();
+ }
+
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteEventHubConsumerGroupSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteEventHubConsumerGroupSamples.java
index e06756470975..39f4cb5a84d9 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteEventHubConsumerGroupSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteEventHubConsumerGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource DeleteEventHubConsumerGroup. */
public final class IotHubResourceDeleteEventHubConsumerGroupSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_deleteconsumergroup.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_deleteconsumergroup.json
*/
/**
* Sample code: IotHubResource_DeleteEventHubConsumerGroup.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteSamples.java
index 4417738a281b..77ffaeff80d8 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource Delete. */
public final class IotHubResourceDeleteSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_delete.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_delete.json
*/
/**
* Sample code: IotHubResource_Delete.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceExportDevicesSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceExportDevicesSamples.java
index 49d384d55dab..361de299c3ab 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceExportDevicesSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceExportDevicesSamples.java
@@ -4,14 +4,12 @@
package com.azure.resourcemanager.iothub.generated;
-import com.azure.resourcemanager.iothub.models.AuthenticationType;
import com.azure.resourcemanager.iothub.models.ExportDevicesRequest;
-import com.azure.resourcemanager.iothub.models.ManagedIdentity;
/** Samples for IotHubResource ExportDevices. */
public final class IotHubResourceExportDevicesSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_exportdevices.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_exportdevices.json
*/
/**
* Sample code: IotHubResource_ExportDevices.
@@ -24,14 +22,7 @@ public static void iotHubResourceExportDevices(com.azure.resourcemanager.iothub.
.exportDevicesWithResponse(
"myResourceGroup",
"testHub",
- new ExportDevicesRequest()
- .withExportBlobContainerUri("testBlob")
- .withExcludeKeys(true)
- .withAuthenticationType(AuthenticationType.IDENTITY_BASED)
- .withIdentity(
- new ManagedIdentity()
- .withUserAssignedIdentity(
- "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1")),
+ new ExportDevicesRequest().withExportBlobContainerUri("testBlob").withExcludeKeys(true),
com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetByResourceGroupSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetByResourceGroupSamples.java
index ea558057aada..96dcfd62ab6f 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetByResourceGroupSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource GetByResourceGroup. */
public final class IotHubResourceGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_get.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_get.json
*/
/**
* Sample code: IotHubResource_Get.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEndpointHealthSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEndpointHealthSamples.java
index a0dd12653cd4..2255f39e84f0 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEndpointHealthSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEndpointHealthSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource GetEndpointHealth. */
public final class IotHubResourceGetEndpointHealthSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_routingendpointhealth.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_routingendpointhealth.json
*/
/**
* Sample code: IotHubResource_GetEndpointHealth.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEventHubConsumerGroupSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEventHubConsumerGroupSamples.java
index 3cc209523a72..9f3e32f7d6ca 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEventHubConsumerGroupSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEventHubConsumerGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource GetEventHubConsumerGroup. */
public final class IotHubResourceGetEventHubConsumerGroupSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getconsumergroup.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getconsumergroup.json
*/
/**
* Sample code: IotHubResource_ListEventHubConsumerGroups.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetJobSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetJobSamples.java
index f9f1433d3857..f2cd34573cfd 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetJobSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetJobSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource GetJob. */
public final class IotHubResourceGetJobSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getjob.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getjob.json
*/
/**
* Sample code: IotHubResource_GetJob.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetKeysForKeyNameSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetKeysForKeyNameSamples.java
index 11dffec06eab..71735d9d2888 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetKeysForKeyNameSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetKeysForKeyNameSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource GetKeysForKeyName. */
public final class IotHubResourceGetKeysForKeyNameSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getkey.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getkey.json
*/
/**
* Sample code: IotHubResource_GetKeysForKeyName.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetQuotaMetricsSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetQuotaMetricsSamples.java
index 775e10695bb5..68bfeedae655 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetQuotaMetricsSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetQuotaMetricsSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource GetQuotaMetrics. */
public final class IotHubResourceGetQuotaMetricsSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_quotametrics.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_quotametrics.json
*/
/**
* Sample code: IotHubResource_GetQuotaMetrics.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetStatsSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetStatsSamples.java
index dcc8d008d25d..17a1b6cbffd2 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetStatsSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetStatsSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource GetStats. */
public final class IotHubResourceGetStatsSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_stats.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_stats.json
*/
/**
* Sample code: IotHubResource_GetStats.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetValidSkusSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetValidSkusSamples.java
index bfe42046f6a4..72d1f8d714f2 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetValidSkusSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetValidSkusSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource GetValidSkus. */
public final class IotHubResourceGetValidSkusSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getskus.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getskus.json
*/
/**
* Sample code: IotHubResource_GetValidSkus.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceImportDevicesSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceImportDevicesSamples.java
index 79cd595c5497..196da9a57deb 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceImportDevicesSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceImportDevicesSamples.java
@@ -9,7 +9,7 @@
/** Samples for IotHubResource ImportDevices. */
public final class IotHubResourceImportDevicesSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_importdevices.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_importdevices.json
*/
/**
* Sample code: IotHubResource_ImportDevices.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListByResourceGroupSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListByResourceGroupSamples.java
index fe778d1ed072..fd4b18492567 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListByResourceGroupSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource ListByResourceGroup. */
public final class IotHubResourceListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listbyrg.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listbyrg.json
*/
/**
* Sample code: IotHubResource_ListByResourceGroup.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListEventHubConsumerGroupsSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListEventHubConsumerGroupsSamples.java
index a8dad23085ab..435df57e3ba3 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListEventHubConsumerGroupsSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListEventHubConsumerGroupsSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource ListEventHubConsumerGroups. */
public final class IotHubResourceListEventHubConsumerGroupsSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listehgroups.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listehgroups.json
*/
/**
* Sample code: IotHubResource_ListEventHubConsumerGroups.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListJobsSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListJobsSamples.java
index 04018569eddb..d7fa2420a461 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListJobsSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListJobsSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource ListJobs. */
public final class IotHubResourceListJobsSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listjobs.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listjobs.json
*/
/**
* Sample code: IotHubResource_ListJobs.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListKeysSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListKeysSamples.java
index bdf5149ef1e8..0c40b8683057 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListKeysSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListKeysSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource ListKeys. */
public final class IotHubResourceListKeysSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listkeys.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listkeys.json
*/
/**
* Sample code: IotHubResource_ListKeys.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListSamples.java
index 7a5d05862b02..7d68fe420271 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListSamples.java
@@ -7,7 +7,7 @@
/** Samples for IotHubResource List. */
public final class IotHubResourceListSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listbysubscription.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listbysubscription.json
*/
/**
* Sample code: IotHubResource_ListBySubscription.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestAllRoutesSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestAllRoutesSamples.java
index 99e3f501bb25..d5cd3516fea9 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestAllRoutesSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestAllRoutesSamples.java
@@ -13,7 +13,7 @@
/** Samples for IotHubResource TestAllRoutes. */
public final class IotHubResourceTestAllRoutesSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_testallroutes.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_testallroutes.json
*/
/**
* Sample code: IotHubResource_TestAllRoutes.
@@ -31,11 +31,12 @@ public static void iotHubResourceTestAllRoutes(com.azure.resourcemanager.iothub.
.withMessage(
new RoutingMessage()
.withBody("Body of message")
- .withAppProperties(mapOf("key1", "value1"))
- .withSystemProperties(mapOf("key1", "value1"))),
+ .withAppProperties(mapOf("key1", "fakeTokenPlaceholder"))
+ .withSystemProperties(mapOf("key1", "fakeTokenPlaceholder"))),
com.azure.core.util.Context.NONE);
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestRouteSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestRouteSamples.java
index f789024375da..eab3c3c9bc62 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestRouteSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestRouteSamples.java
@@ -15,7 +15,7 @@
/** Samples for IotHubResource TestRoute. */
public final class IotHubResourceTestRouteSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_testnewroute.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_testnewroute.json
*/
/**
* Sample code: IotHubResource_TestRoute.
@@ -32,8 +32,8 @@ public static void iotHubResourceTestRoute(com.azure.resourcemanager.iothub.IotH
.withMessage(
new RoutingMessage()
.withBody("Body of message")
- .withAppProperties(mapOf("key1", "value1"))
- .withSystemProperties(mapOf("key1", "value1")))
+ .withAppProperties(mapOf("key1", "fakeTokenPlaceholder"))
+ .withSystemProperties(mapOf("key1", "fakeTokenPlaceholder")))
.withRoute(
new RouteProperties()
.withName("Routeid")
@@ -43,6 +43,7 @@ public static void iotHubResourceTestRoute(com.azure.resourcemanager.iothub.IotH
com.azure.core.util.Context.NONE);
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceUpdateSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceUpdateSamples.java
index be13f9a3482c..db96b866387e 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceUpdateSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceUpdateSamples.java
@@ -11,7 +11,7 @@
/** Samples for IotHubResource Update. */
public final class IotHubResourceUpdateSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_patch.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_patch.json
*/
/**
* Sample code: IotHubResource_Update.
@@ -27,6 +27,7 @@ public static void iotHubResourceUpdate(com.azure.resourcemanager.iothub.IotHubM
resource.update().withTags(mapOf("foo", "bar")).apply();
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/OperationsListSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/OperationsListSamples.java
index c93d77c1a4e5..528a2f8d802a 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/OperationsListSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/OperationsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_operations.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_operations.json
*/
/**
* Sample code: Operations_List.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsDeleteSamples.java
index dc62553134aa..c257ffd66de9 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsDeleteSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for PrivateEndpointConnections Delete. */
public final class PrivateEndpointConnectionsDeleteSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_deleteprivateendpointconnection.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_deleteprivateendpointconnection.json
*/
/**
* Sample code: PrivateEndpointConnection_Delete.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsGetSamples.java
index 92f0726359de..2e707f04544e 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsGetSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for PrivateEndpointConnections Get. */
public final class PrivateEndpointConnectionsGetSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getprivateendpointconnection.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getprivateendpointconnection.json
*/
/**
* Sample code: PrivateEndpointConnection_Get.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsListSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsListSamples.java
index 9d8e94e9e8a2..a90db9389724 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsListSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for PrivateEndpointConnections List. */
public final class PrivateEndpointConnectionsListSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listprivateendpointconnections.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listprivateendpointconnections.json
*/
/**
* Sample code: PrivateEndpointConnections_List.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsUpdateSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsUpdateSamples.java
index 3602c49e0651..5b615ecb4c7c 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsUpdateSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsUpdateSamples.java
@@ -12,7 +12,7 @@
/** Samples for PrivateEndpointConnections Update. */
public final class PrivateEndpointConnectionsUpdateSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_updateprivateendpointconnection.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_updateprivateendpointconnection.json
*/
/**
* Sample code: PrivateEndpointConnection_Update.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationGetSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationGetSamples.java
index 91b76b03ae03..7fc71efc94e7 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationGetSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for PrivateLinkResourcesOperation Get. */
public final class PrivateLinkResourcesOperationGetSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_getprivatelinkresources.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getprivatelinkresources.json
*/
/**
* Sample code: PrivateLinkResources_List.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationListSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationListSamples.java
index c29dca7b0181..f5cad36f6b22 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationListSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationListSamples.java
@@ -7,7 +7,7 @@
/** Samples for PrivateLinkResourcesOperation List. */
public final class PrivateLinkResourcesOperationListSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_listprivatelinkresources.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listprivatelinkresources.json
*/
/**
* Sample code: PrivateLinkResources_List.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/ResourceProviderCommonGetSubscriptionQuotaSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/ResourceProviderCommonGetSubscriptionQuotaSamples.java
index 4c164be4dd8f..f755d34e9942 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/ResourceProviderCommonGetSubscriptionQuotaSamples.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/ResourceProviderCommonGetSubscriptionQuotaSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceProviderCommon GetSubscriptionQuota. */
public final class ResourceProviderCommonGetSubscriptionQuotaSamples {
/*
- * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-15-preview/examples/iothub_usages.json
+ * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_usages.json
*/
/**
* Sample code: ResourceProviderCommon_GetSubscriptionQuota.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ArmIdentityTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ArmIdentityTests.java
deleted file mode 100644
index 03bcc450e730..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ArmIdentityTests.java
+++ /dev/null
@@ -1,56 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.ArmIdentity;
-import com.azure.resourcemanager.iothub.models.ArmUserIdentity;
-import com.azure.resourcemanager.iothub.models.ResourceIdentityType;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ArmIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ArmIdentity model =
- BinaryData
- .fromString(
- "{\"principalId\":\"ec\",\"tenantId\":\"odebfqkkrbmpu\",\"type\":\"SystemAssigned,"
- + " UserAssigned\",\"userAssignedIdentities\":{\"y\":{\"principalId\":\"lzlfbxzpuz\",\"clientId\":\"ispnqzahmgkbrp\"},\"buynhijggm\":{\"principalId\":\"ibnuqqkpik\",\"clientId\":\"rgvtqag\"},\"jrunmpxtt\":{\"principalId\":\"fsiarbutr\",\"clientId\":\"pnazzm\"},\"qidybyx\":{\"principalId\":\"hrbnlankxmyskpbh\",\"clientId\":\"btkcxywnytnrsyn\"}}}")
- .toObject(ArmIdentity.class);
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ArmIdentity model =
- new ArmIdentity()
- .withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
- .withUserAssignedIdentities(
- mapOf(
- "y",
- new ArmUserIdentity(),
- "buynhijggm",
- new ArmUserIdentity(),
- "jrunmpxtt",
- new ArmUserIdentity(),
- "qidybyx",
- new ArmUserIdentity()));
- model = BinaryData.fromObject(model).toObject(ArmIdentity.class);
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ArmUserIdentityTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ArmUserIdentityTests.java
deleted file mode 100644
index 61113032d11e..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ArmUserIdentityTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.ArmUserIdentity;
-
-public final class ArmUserIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ArmUserIdentity model =
- BinaryData
- .fromString("{\"principalId\":\"fclhaaxdbabphlwr\",\"clientId\":\"fkts\"}")
- .toObject(ArmUserIdentity.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ArmUserIdentity model = new ArmUserIdentity();
- model = BinaryData.fromObject(model).toObject(ArmUserIdentity.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificateDescriptionInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificateDescriptionInnerTests.java
deleted file mode 100644
index 0365d2c4987c..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificateDescriptionInnerTests.java
+++ /dev/null
@@ -1,36 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
-import com.azure.resourcemanager.iothub.models.CertificateProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class CertificateDescriptionInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CertificateDescriptionInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"subject\":\"mond\",\"expiry\":\"Thu, 01 Apr 2021 23:21:50"
- + " GMT\",\"thumbprint\":\"xvy\",\"isVerified\":false,\"created\":\"Fri, 01 Oct 2021 02:55:48"
- + " GMT\",\"updated\":\"Mon, 25 Jan 2021 05:21:40"
- + " GMT\",\"certificate\":\"whojvp\"},\"etag\":\"qgxy\",\"id\":\"mocmbqfqvmk\",\"name\":\"xozap\",\"type\":\"helxprglya\"}")
- .toObject(CertificateDescriptionInner.class);
- Assertions.assertEquals(false, model.properties().isVerified());
- Assertions.assertEquals("whojvp", model.properties().certificate());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CertificateDescriptionInner model =
- new CertificateDescriptionInner()
- .withProperties(new CertificateProperties().withIsVerified(false).withCertificate("whojvp"));
- model = BinaryData.fromObject(model).toObject(CertificateDescriptionInner.class);
- Assertions.assertEquals(false, model.properties().isVerified());
- Assertions.assertEquals("whojvp", model.properties().certificate());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificateListDescriptionInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificateListDescriptionInnerTests.java
deleted file mode 100644
index 68f25228db7d..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificateListDescriptionInnerTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
-import com.azure.resourcemanager.iothub.fluent.models.CertificateListDescriptionInner;
-import com.azure.resourcemanager.iothub.models.CertificateProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class CertificateListDescriptionInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CertificateListDescriptionInner model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"subject\":\"uoegrpkhjwniyqs\",\"expiry\":\"Mon, 01 Mar 2021"
- + " 06:19:30 GMT\",\"thumbprint\":\"pdggkzzlvm\",\"isVerified\":true,\"created\":\"Fri, 04 Jun"
- + " 2021 21:38:56 GMT\",\"updated\":\"Wed, 28 Apr 2021 10:55:20"
- + " GMT\",\"certificate\":\"fv\"},\"etag\":\"fy\",\"id\":\"sbpfvmwyhr\",\"name\":\"ouyftaakc\",\"type\":\"wiyzvqtmnubexkp\"}]}")
- .toObject(CertificateListDescriptionInner.class);
- Assertions.assertEquals(true, model.value().get(0).properties().isVerified());
- Assertions.assertEquals("fv", model.value().get(0).properties().certificate());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CertificateListDescriptionInner model =
- new CertificateListDescriptionInner()
- .withValue(
- Arrays
- .asList(
- new CertificateDescriptionInner()
- .withProperties(
- new CertificateProperties().withIsVerified(true).withCertificate("fv"))));
- model = BinaryData.fromObject(model).toObject(CertificateListDescriptionInner.class);
- Assertions.assertEquals(true, model.value().get(0).properties().isVerified());
- Assertions.assertEquals("fv", model.value().get(0).properties().certificate());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatePropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatePropertiesTests.java
deleted file mode 100644
index 7a6a118d66a2..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatePropertiesTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.CertificateProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class CertificatePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CertificateProperties model =
- BinaryData
- .fromString(
- "{\"subject\":\"dckcbc\",\"expiry\":\"Thu, 29 Jul 2021 04:12:00"
- + " GMT\",\"thumbprint\":\"jxgciqibrh\",\"isVerified\":true,\"created\":\"Tue, 01 Jun 2021"
- + " 12:21:20 GMT\",\"updated\":\"Thu, 04 Feb 2021 15:03:28"
- + " GMT\",\"certificate\":\"zoymibmrqyibahw\"}")
- .toObject(CertificateProperties.class);
- Assertions.assertEquals(true, model.isVerified());
- Assertions.assertEquals("zoymibmrqyibahw", model.certificate());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CertificateProperties model =
- new CertificateProperties().withIsVerified(true).withCertificate("zoymibmrqyibahw");
- model = BinaryData.fromObject(model).toObject(CertificateProperties.class);
- Assertions.assertEquals(true, model.isVerified());
- Assertions.assertEquals("zoymibmrqyibahw", model.certificate());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificateVerificationDescriptionTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificateVerificationDescriptionTests.java
deleted file mode 100644
index 9cc236144213..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificateVerificationDescriptionTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.CertificateVerificationDescription;
-import org.junit.jupiter.api.Assertions;
-
-public final class CertificateVerificationDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CertificateVerificationDescription model =
- BinaryData.fromString("{\"certificate\":\"pqlpq\"}").toObject(CertificateVerificationDescription.class);
- Assertions.assertEquals("pqlpq", model.certificate());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CertificateVerificationDescription model = new CertificateVerificationDescription().withCertificate("pqlpq");
- model = BinaryData.fromObject(model).toObject(CertificateVerificationDescription.class);
- Assertions.assertEquals("pqlpq", model.certificate());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesCreateOrUpdateWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index fd1ac1ed46d5..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,78 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.CertificateDescription;
-import com.azure.resourcemanager.iothub.models.CertificateProperties;
-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 CertificatesCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"subject\":\"rpdsof\",\"expiry\":\"Mon, 03 May 2021 16:15:22"
- + " GMT\",\"thumbprint\":\"nsvbuswdv\",\"isVerified\":true,\"created\":\"Mon, 22 Feb 2021 05:56:13"
- + " GMT\",\"updated\":\"Tue, 06 Apr 2021 20:50:40"
- + " GMT\",\"certificate\":\"nvjsrtkfa\"},\"etag\":\"opqgikyzirtxdyux\",\"id\":\"ejnt\",\"name\":\"sewgioilqukr\",\"type\":\"dxtqmieoxo\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CertificateDescription response =
- manager
- .certificates()
- .define("mqnrojlpijnkr")
- .withExistingIotHub("knpirgnepttwq", "sniffc")
- .withProperties(new CertificateProperties().withIsVerified(false).withCertificate("f"))
- .withIfMatch("jbdhqxvc")
- .create();
-
- Assertions.assertEquals(true, response.properties().isVerified());
- Assertions.assertEquals("nvjsrtkfa", response.properties().certificate());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesDeleteWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesDeleteWithResponseMockTests.java
deleted file mode 100644
index 06719c642438..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +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.iothub.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.iothub.IotHubManager;
-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 CertificatesDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .certificates()
- .deleteWithResponse("azpxdtnkdmkqjjl", "uenvrkp", "ou", "ibreb", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesGetWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesGetWithResponseMockTests.java
deleted file mode 100644
index 23ea834c27a5..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesGetWithResponseMockTests.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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.CertificateDescription;
-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 CertificatesGetWithResponseMockTests {
- @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\":{\"subject\":\"lmv\",\"expiry\":\"Sun, 26 Sep 2021 11:18:34"
- + " GMT\",\"thumbprint\":\"ktgplcr\",\"isVerified\":true,\"created\":\"Fri, 19 Nov 2021 13:53:17"
- + " GMT\",\"updated\":\"Fri, 05 Mar 2021 15:11:27"
- + " GMT\",\"certificate\":\"igbrnjw\"},\"etag\":\"kpnb\",\"id\":\"azej\",\"name\":\"oqkag\",\"type\":\"hsxttaugzxnf\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CertificateDescription response =
- manager
- .certificates()
- .getWithResponse("waekrrjreafxtsgu", "hjglikk", "wslolbqp", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(true, response.properties().isVerified());
- Assertions.assertEquals("igbrnjw", response.properties().certificate());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesListByIotHubWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesListByIotHubWithResponseMockTests.java
deleted file mode 100644
index f29712dd56cd..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesListByIotHubWithResponseMockTests.java
+++ /dev/null
@@ -1,64 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.CertificateListDescription;
-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 CertificatesListByIotHubWithResponseMockTests {
- @Test
- public void testListByIotHubWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"etag\":\"l\",\"id\":\"dn\",\"name\":\"itvgbmhrixkwm\",\"type\":\"ijejvegrhbpn\"},{\"etag\":\"exccbdreaxhcexd\",\"id\":\"rvqahqkghtpwi\",\"name\":\"nhyjsv\",\"type\":\"ycxzbfvoo\"},{\"etag\":\"vmtgjqppy\",\"id\":\"s\",\"name\":\"ronzmyhgfip\",\"type\":\"sxkm\"}]}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CertificateListDescription response =
- manager.certificates().listByIotHubWithResponse("xuvw", "fbn", com.azure.core.util.Context.NONE).getValue();
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesVerifyWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesVerifyWithResponseMockTests.java
deleted file mode 100644
index 813bfa9725f9..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatesVerifyWithResponseMockTests.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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.CertificateDescription;
-import com.azure.resourcemanager.iothub.models.CertificateVerificationDescription;
-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 CertificatesVerifyWithResponseMockTests {
- @Test
- public void testVerifyWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"subject\":\"iithtywu\",\"expiry\":\"Sat, 06 Mar 2021 07:21:05"
- + " GMT\",\"thumbprint\":\"ihwqknfdntwjchr\",\"isVerified\":true,\"created\":\"Tue, 05 Oct 2021"
- + " 08:32:44 GMT\",\"updated\":\"Fri, 19 Mar 2021 07:37:05"
- + " GMT\",\"certificate\":\"wct\"},\"etag\":\"dzjlu\",\"id\":\"dfdlwggyts\",\"name\":\"wtovvtgsein\",\"type\":\"fiufx\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CertificateDescription response =
- manager
- .certificates()
- .verifyWithResponse(
- "hfstotxhojujbyp",
- "lmcuvhixb",
- "xyfwnylrcool",
- "ttpkiwkkbnujrywv",
- new CertificateVerificationDescription().withCertificate("lbfpncurd"),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(true, response.properties().isVerified());
- Assertions.assertEquals("wct", response.properties().certificate());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CloudToDevicePropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CloudToDevicePropertiesTests.java
deleted file mode 100644
index 4e65ca2aa4e7..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CloudToDevicePropertiesTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.CloudToDeviceProperties;
-import com.azure.resourcemanager.iothub.models.FeedbackProperties;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class CloudToDevicePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CloudToDeviceProperties model =
- BinaryData
- .fromString(
- "{\"maxDeliveryCount\":1121109847,\"defaultTtlAsIso8601\":\"PT84H30M6S\",\"feedback\":{\"lockDurationAsIso8601\":\"PT9H8M5S\",\"ttlAsIso8601\":\"PT205H49M51S\",\"maxDeliveryCount\":1139583555}}")
- .toObject(CloudToDeviceProperties.class);
- Assertions.assertEquals(1121109847, model.maxDeliveryCount());
- Assertions.assertEquals(Duration.parse("PT84H30M6S"), model.defaultTtlAsIso8601());
- Assertions.assertEquals(Duration.parse("PT9H8M5S"), model.feedback().lockDurationAsIso8601());
- Assertions.assertEquals(Duration.parse("PT205H49M51S"), model.feedback().ttlAsIso8601());
- Assertions.assertEquals(1139583555, model.feedback().maxDeliveryCount());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CloudToDeviceProperties model =
- new CloudToDeviceProperties()
- .withMaxDeliveryCount(1121109847)
- .withDefaultTtlAsIso8601(Duration.parse("PT84H30M6S"))
- .withFeedback(
- new FeedbackProperties()
- .withLockDurationAsIso8601(Duration.parse("PT9H8M5S"))
- .withTtlAsIso8601(Duration.parse("PT205H49M51S"))
- .withMaxDeliveryCount(1139583555));
- model = BinaryData.fromObject(model).toObject(CloudToDeviceProperties.class);
- Assertions.assertEquals(1121109847, model.maxDeliveryCount());
- Assertions.assertEquals(Duration.parse("PT84H30M6S"), model.defaultTtlAsIso8601());
- Assertions.assertEquals(Duration.parse("PT9H8M5S"), model.feedback().lockDurationAsIso8601());
- Assertions.assertEquals(Duration.parse("PT205H49M51S"), model.feedback().ttlAsIso8601());
- Assertions.assertEquals(1139583555, model.feedback().maxDeliveryCount());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EndpointHealthDataInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EndpointHealthDataInnerTests.java
deleted file mode 100644
index 9998aeb0495c..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EndpointHealthDataInnerTests.java
+++ /dev/null
@@ -1,49 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.EndpointHealthDataInner;
-import com.azure.resourcemanager.iothub.models.EndpointHealthStatus;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-
-public final class EndpointHealthDataInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EndpointHealthDataInner model =
- BinaryData
- .fromString(
- "{\"endpointId\":\"p\",\"healthStatus\":\"unknown\",\"lastKnownError\":\"ofd\",\"lastKnownErrorTime\":\"Sun,"
- + " 25 Apr 2021 06:48:17 GMT\",\"lastSuccessfulSendAttemptTime\":\"Tue, 15 Jun 2021 07:35:54"
- + " GMT\",\"lastSendAttemptTime\":\"Fri, 22 Jan 2021 23:23:23 GMT\"}")
- .toObject(EndpointHealthDataInner.class);
- Assertions.assertEquals("p", model.endpointId());
- Assertions.assertEquals(EndpointHealthStatus.UNKNOWN, model.healthStatus());
- Assertions.assertEquals("ofd", model.lastKnownError());
- Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T06:48:17Z"), model.lastKnownErrorTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-06-15T07:35:54Z"), model.lastSuccessfulSendAttemptTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T23:23:23Z"), model.lastSendAttemptTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EndpointHealthDataInner model =
- new EndpointHealthDataInner()
- .withEndpointId("p")
- .withHealthStatus(EndpointHealthStatus.UNKNOWN)
- .withLastKnownError("ofd")
- .withLastKnownErrorTime(OffsetDateTime.parse("2021-04-25T06:48:17Z"))
- .withLastSuccessfulSendAttemptTime(OffsetDateTime.parse("2021-06-15T07:35:54Z"))
- .withLastSendAttemptTime(OffsetDateTime.parse("2021-01-22T23:23:23Z"));
- model = BinaryData.fromObject(model).toObject(EndpointHealthDataInner.class);
- Assertions.assertEquals("p", model.endpointId());
- Assertions.assertEquals(EndpointHealthStatus.UNKNOWN, model.healthStatus());
- Assertions.assertEquals("ofd", model.lastKnownError());
- Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T06:48:17Z"), model.lastKnownErrorTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-06-15T07:35:54Z"), model.lastSuccessfulSendAttemptTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T23:23:23Z"), model.lastSendAttemptTime());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EndpointHealthDataListResultTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EndpointHealthDataListResultTests.java
deleted file mode 100644
index 49f43091d4ea..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EndpointHealthDataListResultTests.java
+++ /dev/null
@@ -1,93 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.EndpointHealthDataInner;
-import com.azure.resourcemanager.iothub.models.EndpointHealthDataListResult;
-import com.azure.resourcemanager.iothub.models.EndpointHealthStatus;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class EndpointHealthDataListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EndpointHealthDataListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"endpointId\":\"zvahapjy\",\"healthStatus\":\"dead\",\"lastKnownError\":\"gqzcjr\",\"lastKnownErrorTime\":\"Sat,"
- + " 03 Apr 2021 19:52:37 GMT\",\"lastSuccessfulSendAttemptTime\":\"Sat, 05 Jun 2021 18:59:27"
- + " GMT\",\"lastSendAttemptTime\":\"Sat, 04 Sep 2021 18:51:43"
- + " GMT\"},{\"endpointId\":\"lxkvu\",\"healthStatus\":\"degraded\",\"lastKnownError\":\"ovawjvzunlu\",\"lastKnownErrorTime\":\"Thu,"
- + " 05 Aug 2021 22:08:57 GMT\",\"lastSuccessfulSendAttemptTime\":\"Thu, 21 Jan 2021 11:08:17"
- + " GMT\",\"lastSendAttemptTime\":\"Thu, 11 Mar 2021 05:06:45"
- + " GMT\"},{\"endpointId\":\"i\",\"healthStatus\":\"healthy\",\"lastKnownError\":\"pjzu\",\"lastKnownErrorTime\":\"Tue,"
- + " 12 Oct 2021 12:24:32 GMT\",\"lastSuccessfulSendAttemptTime\":\"Mon, 21 Jun 2021 03:54:01"
- + " GMT\",\"lastSendAttemptTime\":\"Wed, 03 Nov 2021 21:00:46"
- + " GMT\"},{\"endpointId\":\"skzbb\",\"healthStatus\":\"dead\",\"lastKnownError\":\"mv\",\"lastKnownErrorTime\":\"Wed,"
- + " 24 Feb 2021 15:47:12 GMT\",\"lastSuccessfulSendAttemptTime\":\"Mon, 22 Mar 2021 15:40:44"
- + " GMT\",\"lastSendAttemptTime\":\"Thu, 01 Jul 2021 08:04:50 GMT\"}],\"nextLink\":\"uh\"}")
- .toObject(EndpointHealthDataListResult.class);
- Assertions.assertEquals("zvahapjy", model.value().get(0).endpointId());
- Assertions.assertEquals(EndpointHealthStatus.DEAD, model.value().get(0).healthStatus());
- Assertions.assertEquals("gqzcjr", model.value().get(0).lastKnownError());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-04-03T19:52:37Z"), model.value().get(0).lastKnownErrorTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-06-05T18:59:27Z"), model.value().get(0).lastSuccessfulSendAttemptTime());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-09-04T18:51:43Z"), model.value().get(0).lastSendAttemptTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EndpointHealthDataListResult model =
- new EndpointHealthDataListResult()
- .withValue(
- Arrays
- .asList(
- new EndpointHealthDataInner()
- .withEndpointId("zvahapjy")
- .withHealthStatus(EndpointHealthStatus.DEAD)
- .withLastKnownError("gqzcjr")
- .withLastKnownErrorTime(OffsetDateTime.parse("2021-04-03T19:52:37Z"))
- .withLastSuccessfulSendAttemptTime(OffsetDateTime.parse("2021-06-05T18:59:27Z"))
- .withLastSendAttemptTime(OffsetDateTime.parse("2021-09-04T18:51:43Z")),
- new EndpointHealthDataInner()
- .withEndpointId("lxkvu")
- .withHealthStatus(EndpointHealthStatus.DEGRADED)
- .withLastKnownError("ovawjvzunlu")
- .withLastKnownErrorTime(OffsetDateTime.parse("2021-08-05T22:08:57Z"))
- .withLastSuccessfulSendAttemptTime(OffsetDateTime.parse("2021-01-21T11:08:17Z"))
- .withLastSendAttemptTime(OffsetDateTime.parse("2021-03-11T05:06:45Z")),
- new EndpointHealthDataInner()
- .withEndpointId("i")
- .withHealthStatus(EndpointHealthStatus.HEALTHY)
- .withLastKnownError("pjzu")
- .withLastKnownErrorTime(OffsetDateTime.parse("2021-10-12T12:24:32Z"))
- .withLastSuccessfulSendAttemptTime(OffsetDateTime.parse("2021-06-21T03:54:01Z"))
- .withLastSendAttemptTime(OffsetDateTime.parse("2021-11-03T21:00:46Z")),
- new EndpointHealthDataInner()
- .withEndpointId("skzbb")
- .withHealthStatus(EndpointHealthStatus.DEAD)
- .withLastKnownError("mv")
- .withLastKnownErrorTime(OffsetDateTime.parse("2021-02-24T15:47:12Z"))
- .withLastSuccessfulSendAttemptTime(OffsetDateTime.parse("2021-03-22T15:40:44Z"))
- .withLastSendAttemptTime(OffsetDateTime.parse("2021-07-01T08:04:50Z"))));
- model = BinaryData.fromObject(model).toObject(EndpointHealthDataListResult.class);
- Assertions.assertEquals("zvahapjy", model.value().get(0).endpointId());
- Assertions.assertEquals(EndpointHealthStatus.DEAD, model.value().get(0).healthStatus());
- Assertions.assertEquals("gqzcjr", model.value().get(0).lastKnownError());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-04-03T19:52:37Z"), model.value().get(0).lastKnownErrorTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-06-05T18:59:27Z"), model.value().get(0).lastSuccessfulSendAttemptTime());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-09-04T18:51:43Z"), model.value().get(0).lastSendAttemptTime());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupBodyDescriptionTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupBodyDescriptionTests.java
deleted file mode 100644
index 729d558bbb31..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupBodyDescriptionTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupBodyDescription;
-import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupName;
-import org.junit.jupiter.api.Assertions;
-
-public final class EventHubConsumerGroupBodyDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EventHubConsumerGroupBodyDescription model =
- BinaryData
- .fromString("{\"properties\":{\"name\":\"it\"}}")
- .toObject(EventHubConsumerGroupBodyDescription.class);
- Assertions.assertEquals("it", model.properties().name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EventHubConsumerGroupBodyDescription model =
- new EventHubConsumerGroupBodyDescription().withProperties(new EventHubConsumerGroupName().withName("it"));
- model = BinaryData.fromObject(model).toObject(EventHubConsumerGroupBodyDescription.class);
- Assertions.assertEquals("it", model.properties().name());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupInfoInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupInfoInnerTests.java
deleted file mode 100644
index 96256a33881c..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupInfoInnerTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.EventHubConsumerGroupInfoInner;
-import java.util.HashMap;
-import java.util.Map;
-
-public final class EventHubConsumerGroupInfoInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EventHubConsumerGroupInfoInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"cjooxdjebwpucwwf\":\"dataxcug\"},\"etag\":\"vbvmeu\",\"id\":\"civyhzceuo\",\"name\":\"gjrwjueiotwmcdyt\",\"type\":\"x\"}")
- .toObject(EventHubConsumerGroupInfoInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EventHubConsumerGroupInfoInner model =
- new EventHubConsumerGroupInfoInner().withProperties(mapOf("cjooxdjebwpucwwf", "dataxcug"));
- model = BinaryData.fromObject(model).toObject(EventHubConsumerGroupInfoInner.class);
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupNameTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupNameTests.java
deleted file mode 100644
index a7fbaf96b95e..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupNameTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupName;
-import org.junit.jupiter.api.Assertions;
-
-public final class EventHubConsumerGroupNameTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EventHubConsumerGroupName model =
- BinaryData.fromString("{\"name\":\"nrjawgqwg\"}").toObject(EventHubConsumerGroupName.class);
- Assertions.assertEquals("nrjawgqwg", model.name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EventHubConsumerGroupName model = new EventHubConsumerGroupName().withName("nrjawgqwg");
- model = BinaryData.fromObject(model).toObject(EventHubConsumerGroupName.class);
- Assertions.assertEquals("nrjawgqwg", model.name());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupsListResultTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupsListResultTests.java
deleted file mode 100644
index b673ae7d3890..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubConsumerGroupsListResultTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.EventHubConsumerGroupInfoInner;
-import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupsListResult;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-public final class EventHubConsumerGroupsListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EventHubConsumerGroupsListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"aex\":\"datamdua\",\"vxpvgomz\":\"datapvfadmwsrcr\"},\"etag\":\"misgwbnb\",\"id\":\"e\",\"name\":\"dawkzbali\",\"type\":\"urqhaka\"}],\"nextLink\":\"ashsfwxos\"}")
- .toObject(EventHubConsumerGroupsListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EventHubConsumerGroupsListResult model =
- new EventHubConsumerGroupsListResult()
- .withValue(
- Arrays
- .asList(
- new EventHubConsumerGroupInfoInner()
- .withProperties(mapOf("aex", "datamdua", "vxpvgomz", "datapvfadmwsrcr"))));
- model = BinaryData.fromObject(model).toObject(EventHubConsumerGroupsListResult.class);
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubPropertiesTests.java
deleted file mode 100644
index 93555a6db058..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/EventHubPropertiesTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.EventHubProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class EventHubPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EventHubProperties model =
- BinaryData
- .fromString(
- "{\"retentionTimeInDays\":6730920882568093114,\"partitionCount\":230645799,\"partitionIds\":[\"ej\"],\"path\":\"vwryoqpso\",\"endpoint\":\"ctazakljlahbcryf\"}")
- .toObject(EventHubProperties.class);
- Assertions.assertEquals(6730920882568093114L, model.retentionTimeInDays());
- Assertions.assertEquals(230645799, model.partitionCount());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EventHubProperties model =
- new EventHubProperties().withRetentionTimeInDays(6730920882568093114L).withPartitionCount(230645799);
- model = BinaryData.fromObject(model).toObject(EventHubProperties.class);
- Assertions.assertEquals(6730920882568093114L, model.retentionTimeInDays());
- Assertions.assertEquals(230645799, model.partitionCount());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/FailoverInputTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/FailoverInputTests.java
deleted file mode 100644
index d30fdbc939ec..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/FailoverInputTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.FailoverInput;
-import org.junit.jupiter.api.Assertions;
-
-public final class FailoverInputTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- FailoverInput model =
- BinaryData.fromString("{\"failoverRegion\":\"cciuqgbdbutau\"}").toObject(FailoverInput.class);
- Assertions.assertEquals("cciuqgbdbutau", model.failoverRegion());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- FailoverInput model = new FailoverInput().withFailoverRegion("cciuqgbdbutau");
- model = BinaryData.fromObject(model).toObject(FailoverInput.class);
- Assertions.assertEquals("cciuqgbdbutau", model.failoverRegion());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/FallbackRoutePropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/FallbackRoutePropertiesTests.java
deleted file mode 100644
index 3d9d9c2605af..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/FallbackRoutePropertiesTests.java
+++ /dev/null
@@ -1,44 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.FallbackRouteProperties;
-import com.azure.resourcemanager.iothub.models.RoutingSource;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class FallbackRoutePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- FallbackRouteProperties model =
- BinaryData
- .fromString(
- "{\"name\":\"lyaxuc\",\"source\":\"DeviceJobLifecycleEvents\",\"condition\":\"qszf\",\"endpointNames\":[\"eyp\",\"wrmjmwvvjektc\",\"senhwlrs\"],\"isEnabled\":true}")
- .toObject(FallbackRouteProperties.class);
- Assertions.assertEquals("lyaxuc", model.name());
- Assertions.assertEquals(RoutingSource.DEVICE_JOB_LIFECYCLE_EVENTS, model.source());
- Assertions.assertEquals("qszf", model.condition());
- Assertions.assertEquals("eyp", model.endpointNames().get(0));
- Assertions.assertEquals(true, model.isEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- FallbackRouteProperties model =
- new FallbackRouteProperties()
- .withName("lyaxuc")
- .withSource(RoutingSource.DEVICE_JOB_LIFECYCLE_EVENTS)
- .withCondition("qszf")
- .withEndpointNames(Arrays.asList("eyp", "wrmjmwvvjektc", "senhwlrs"))
- .withIsEnabled(true);
- model = BinaryData.fromObject(model).toObject(FallbackRouteProperties.class);
- Assertions.assertEquals("lyaxuc", model.name());
- Assertions.assertEquals(RoutingSource.DEVICE_JOB_LIFECYCLE_EVENTS, model.source());
- Assertions.assertEquals("qszf", model.condition());
- Assertions.assertEquals("eyp", model.endpointNames().get(0));
- Assertions.assertEquals(true, model.isEnabled());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/FeedbackPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/FeedbackPropertiesTests.java
deleted file mode 100644
index 4f02379b21b8..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/FeedbackPropertiesTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.FeedbackProperties;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class FeedbackPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- FeedbackProperties model =
- BinaryData
- .fromString(
- "{\"lockDurationAsIso8601\":\"PT19H28M11S\",\"ttlAsIso8601\":\"PT104H38M10S\",\"maxDeliveryCount\":1236632858}")
- .toObject(FeedbackProperties.class);
- Assertions.assertEquals(Duration.parse("PT19H28M11S"), model.lockDurationAsIso8601());
- Assertions.assertEquals(Duration.parse("PT104H38M10S"), model.ttlAsIso8601());
- Assertions.assertEquals(1236632858, model.maxDeliveryCount());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- FeedbackProperties model =
- new FeedbackProperties()
- .withLockDurationAsIso8601(Duration.parse("PT19H28M11S"))
- .withTtlAsIso8601(Duration.parse("PT104H38M10S"))
- .withMaxDeliveryCount(1236632858);
- model = BinaryData.fromObject(model).toObject(FeedbackProperties.class);
- Assertions.assertEquals(Duration.parse("PT19H28M11S"), model.lockDurationAsIso8601());
- Assertions.assertEquals(Duration.parse("PT104H38M10S"), model.ttlAsIso8601());
- Assertions.assertEquals(1236632858, model.maxDeliveryCount());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/GroupIdInformationInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/GroupIdInformationInnerTests.java
deleted file mode 100644
index aebfbfba5552..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/GroupIdInformationInnerTests.java
+++ /dev/null
@@ -1,40 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.GroupIdInformationInner;
-import com.azure.resourcemanager.iothub.models.GroupIdInformationProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class GroupIdInformationInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GroupIdInformationInner model =
- BinaryData
- .fromString(
- "{\"id\":\"nzar\",\"name\":\"lquuijfqkacewii\",\"type\":\"pubjibw\",\"properties\":{\"groupId\":\"f\",\"requiredMembers\":[\"qkvpuvksgplsakn\",\"n\",\"synljphuopxodl\",\"iyntorzihle\"],\"requiredZoneNames\":[\"swsrms\",\"yzrpzbchckqqzq\",\"ox\"]}}")
- .toObject(GroupIdInformationInner.class);
- Assertions.assertEquals("f", model.properties().groupId());
- Assertions.assertEquals("qkvpuvksgplsakn", model.properties().requiredMembers().get(0));
- Assertions.assertEquals("swsrms", model.properties().requiredZoneNames().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GroupIdInformationInner model =
- new GroupIdInformationInner()
- .withProperties(
- new GroupIdInformationProperties()
- .withGroupId("f")
- .withRequiredMembers(Arrays.asList("qkvpuvksgplsakn", "n", "synljphuopxodl", "iyntorzihle"))
- .withRequiredZoneNames(Arrays.asList("swsrms", "yzrpzbchckqqzq", "ox")));
- model = BinaryData.fromObject(model).toObject(GroupIdInformationInner.class);
- Assertions.assertEquals("f", model.properties().groupId());
- Assertions.assertEquals("qkvpuvksgplsakn", model.properties().requiredMembers().get(0));
- Assertions.assertEquals("swsrms", model.properties().requiredZoneNames().get(0));
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/GroupIdInformationPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/GroupIdInformationPropertiesTests.java
deleted file mode 100644
index 706bb7733ff4..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/GroupIdInformationPropertiesTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.GroupIdInformationProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class GroupIdInformationPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GroupIdInformationProperties model =
- BinaryData
- .fromString(
- "{\"groupId\":\"suiizynkedyat\",\"requiredMembers\":[\"hqmibzyhwit\",\"mypyynpcdpu\",\"nzgmwznmabik\"],\"requiredZoneNames\":[\"rgjhxb\",\"dtlwwrlkd\",\"tncvokot\"]}")
- .toObject(GroupIdInformationProperties.class);
- Assertions.assertEquals("suiizynkedyat", model.groupId());
- Assertions.assertEquals("hqmibzyhwit", model.requiredMembers().get(0));
- Assertions.assertEquals("rgjhxb", model.requiredZoneNames().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GroupIdInformationProperties model =
- new GroupIdInformationProperties()
- .withGroupId("suiizynkedyat")
- .withRequiredMembers(Arrays.asList("hqmibzyhwit", "mypyynpcdpu", "nzgmwznmabik"))
- .withRequiredZoneNames(Arrays.asList("rgjhxb", "dtlwwrlkd", "tncvokot"));
- model = BinaryData.fromObject(model).toObject(GroupIdInformationProperties.class);
- Assertions.assertEquals("suiizynkedyat", model.groupId());
- Assertions.assertEquals("hqmibzyhwit", model.requiredMembers().get(0));
- Assertions.assertEquals("rgjhxb", model.requiredZoneNames().get(0));
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ImportDevicesRequestTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ImportDevicesRequestTests.java
deleted file mode 100644
index ff9c5af048d5..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ImportDevicesRequestTests.java
+++ /dev/null
@@ -1,53 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.AuthenticationType;
-import com.azure.resourcemanager.iothub.models.ImportDevicesRequest;
-import com.azure.resourcemanager.iothub.models.ManagedIdentity;
-import org.junit.jupiter.api.Assertions;
-
-public final class ImportDevicesRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ImportDevicesRequest model =
- BinaryData
- .fromString(
- "{\"inputBlobContainerUri\":\"fcnihgwq\",\"outputBlobContainerUri\":\"pnedgf\",\"inputBlobName\":\"vkcvqvpkeqd\",\"outputBlobName\":\"drhvoodsotbo\",\"authenticationType\":\"identityBased\",\"identity\":{\"userAssignedIdentity\":\"cjwvn\"},\"includeConfigurations\":false,\"configurationsBlobName\":\"wmgxcxrsl\"}")
- .toObject(ImportDevicesRequest.class);
- Assertions.assertEquals("fcnihgwq", model.inputBlobContainerUri());
- Assertions.assertEquals("pnedgf", model.outputBlobContainerUri());
- Assertions.assertEquals("vkcvqvpkeqd", model.inputBlobName());
- Assertions.assertEquals("drhvoodsotbo", model.outputBlobName());
- Assertions.assertEquals(AuthenticationType.IDENTITY_BASED, model.authenticationType());
- Assertions.assertEquals("cjwvn", model.identity().userAssignedIdentity());
- Assertions.assertEquals(false, model.includeConfigurations());
- Assertions.assertEquals("wmgxcxrsl", model.configurationsBlobName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ImportDevicesRequest model =
- new ImportDevicesRequest()
- .withInputBlobContainerUri("fcnihgwq")
- .withOutputBlobContainerUri("pnedgf")
- .withInputBlobName("vkcvqvpkeqd")
- .withOutputBlobName("drhvoodsotbo")
- .withAuthenticationType(AuthenticationType.IDENTITY_BASED)
- .withIdentity(new ManagedIdentity().withUserAssignedIdentity("cjwvn"))
- .withIncludeConfigurations(false)
- .withConfigurationsBlobName("wmgxcxrsl");
- model = BinaryData.fromObject(model).toObject(ImportDevicesRequest.class);
- Assertions.assertEquals("fcnihgwq", model.inputBlobContainerUri());
- Assertions.assertEquals("pnedgf", model.outputBlobContainerUri());
- Assertions.assertEquals("vkcvqvpkeqd", model.inputBlobName());
- Assertions.assertEquals("drhvoodsotbo", model.outputBlobName());
- Assertions.assertEquals(AuthenticationType.IDENTITY_BASED, model.authenticationType());
- Assertions.assertEquals("cjwvn", model.identity().userAssignedIdentity());
- Assertions.assertEquals(false, model.includeConfigurations());
- Assertions.assertEquals("wmgxcxrsl", model.configurationsBlobName());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubCapacityTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubCapacityTests.java
deleted file mode 100644
index 3e9f46fecce5..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubCapacityTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.IotHubCapacity;
-
-public final class IotHubCapacityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IotHubCapacity model =
- BinaryData
- .fromString(
- "{\"minimum\":2874780118088744582,\"maximum\":9144697658006681867,\"default\":8641218324516083606,\"scaleType\":\"Manual\"}")
- .toObject(IotHubCapacity.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IotHubCapacity model = new IotHubCapacity();
- model = BinaryData.fromObject(model).toObject(IotHubCapacity.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubDescriptionListResultTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubDescriptionListResultTests.java
deleted file mode 100644
index 198063445ee5..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubDescriptionListResultTests.java
+++ /dev/null
@@ -1,125 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.IotHubDescriptionInner;
-import com.azure.resourcemanager.iothub.models.ArmIdentity;
-import com.azure.resourcemanager.iothub.models.Capabilities;
-import com.azure.resourcemanager.iothub.models.IotHubDescriptionListResult;
-import com.azure.resourcemanager.iothub.models.IotHubProperties;
-import com.azure.resourcemanager.iothub.models.IotHubSku;
-import com.azure.resourcemanager.iothub.models.IotHubSkuInfo;
-import com.azure.resourcemanager.iothub.models.IpVersion;
-import com.azure.resourcemanager.iothub.models.PublicNetworkAccess;
-import com.azure.resourcemanager.iothub.models.ResourceIdentityType;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class IotHubDescriptionListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IotHubDescriptionListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"etag\":\"gnxytxhpzxbz\",\"properties\":{\"authorizationPolicies\":[],\"disableLocalAuth\":false,\"disableDeviceSAS\":true,\"disableModuleSAS\":true,\"restrictOutboundNetworkAccess\":true,\"allowedFqdnList\":[],\"publicNetworkAccess\":\"Enabled\",\"ipFilterRules\":[],\"minTlsVersion\":\"iklbbovpl\",\"privateEndpointConnections\":[],\"provisioningState\":\"hvgyuguosvmk\",\"state\":\"sxqu\",\"hostName\":\"fpl\",\"eventHubEndpoints\":{},\"storageEndpoints\":{},\"messagingEndpoints\":{},\"enableFileUploadNotifications\":false,\"comments\":\"kde\",\"features\":\"DeviceManagement\",\"locations\":[],\"enableDataResidency\":true,\"ipVersion\":\"ipv4ipv6\"},\"sku\":{\"name\":\"S3\",\"tier\":\"Free\",\"capacity\":8474633220472193573},\"identity\":{\"principalId\":\"baiuebbaumny\",\"tenantId\":\"ped\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"bckhsmtxpsi\",\"tags\":{\"rdqmhjjdhtldwkyz\":\"fhvpesaps\",\"cwsvlxotog\":\"uutkncw\",\"o\":\"wrupqsxvnmicykvc\",\"vnotyfjfcnj\":\"eil\"},\"id\":\"k\",\"name\":\"nxdhbt\",\"type\":\"kphywpnvjto\"}],\"nextLink\":\"ermclfplphoxuscr\"}")
- .toObject(IotHubDescriptionListResult.class);
- Assertions.assertEquals("bckhsmtxpsi", model.value().get(0).location());
- Assertions.assertEquals("fhvpesaps", model.value().get(0).tags().get("rdqmhjjdhtldwkyz"));
- Assertions.assertEquals("gnxytxhpzxbz", model.value().get(0).etag());
- Assertions.assertEquals(false, model.value().get(0).properties().disableLocalAuth());
- Assertions.assertEquals(true, model.value().get(0).properties().disableDeviceSas());
- Assertions.assertEquals(true, model.value().get(0).properties().disableModuleSas());
- Assertions.assertEquals(true, model.value().get(0).properties().restrictOutboundNetworkAccess());
- Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).properties().publicNetworkAccess());
- Assertions.assertEquals("iklbbovpl", model.value().get(0).properties().minTlsVersion());
- Assertions.assertEquals(false, model.value().get(0).properties().enableFileUploadNotifications());
- Assertions.assertEquals("kde", model.value().get(0).properties().comments());
- Assertions.assertEquals(Capabilities.DEVICE_MANAGEMENT, model.value().get(0).properties().features());
- Assertions.assertEquals(true, model.value().get(0).properties().enableDataResidency());
- Assertions.assertEquals(IpVersion.IPV4IPV6, model.value().get(0).properties().ipVersion());
- Assertions.assertEquals(IotHubSku.S3, model.value().get(0).sku().name());
- Assertions.assertEquals(8474633220472193573L, model.value().get(0).sku().capacity());
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IotHubDescriptionListResult model =
- new IotHubDescriptionListResult()
- .withValue(
- Arrays
- .asList(
- new IotHubDescriptionInner()
- .withLocation("bckhsmtxpsi")
- .withTags(
- mapOf(
- "rdqmhjjdhtldwkyz",
- "fhvpesaps",
- "cwsvlxotog",
- "uutkncw",
- "o",
- "wrupqsxvnmicykvc",
- "vnotyfjfcnj",
- "eil"))
- .withEtag("gnxytxhpzxbz")
- .withProperties(
- new IotHubProperties()
- .withAuthorizationPolicies(Arrays.asList())
- .withDisableLocalAuth(false)
- .withDisableDeviceSas(true)
- .withDisableModuleSas(true)
- .withRestrictOutboundNetworkAccess(true)
- .withAllowedFqdnList(Arrays.asList())
- .withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
- .withIpFilterRules(Arrays.asList())
- .withMinTlsVersion("iklbbovpl")
- .withPrivateEndpointConnections(Arrays.asList())
- .withEventHubEndpoints(mapOf())
- .withStorageEndpoints(mapOf())
- .withMessagingEndpoints(mapOf())
- .withEnableFileUploadNotifications(false)
- .withComments("kde")
- .withFeatures(Capabilities.DEVICE_MANAGEMENT)
- .withEnableDataResidency(true)
- .withIpVersion(IpVersion.IPV4IPV6))
- .withSku(new IotHubSkuInfo().withName(IotHubSku.S3).withCapacity(8474633220472193573L))
- .withIdentity(
- new ArmIdentity()
- .withType(ResourceIdentityType.SYSTEM_ASSIGNED)
- .withUserAssignedIdentities(mapOf()))));
- model = BinaryData.fromObject(model).toObject(IotHubDescriptionListResult.class);
- Assertions.assertEquals("bckhsmtxpsi", model.value().get(0).location());
- Assertions.assertEquals("fhvpesaps", model.value().get(0).tags().get("rdqmhjjdhtldwkyz"));
- Assertions.assertEquals("gnxytxhpzxbz", model.value().get(0).etag());
- Assertions.assertEquals(false, model.value().get(0).properties().disableLocalAuth());
- Assertions.assertEquals(true, model.value().get(0).properties().disableDeviceSas());
- Assertions.assertEquals(true, model.value().get(0).properties().disableModuleSas());
- Assertions.assertEquals(true, model.value().get(0).properties().restrictOutboundNetworkAccess());
- Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).properties().publicNetworkAccess());
- Assertions.assertEquals("iklbbovpl", model.value().get(0).properties().minTlsVersion());
- Assertions.assertEquals(false, model.value().get(0).properties().enableFileUploadNotifications());
- Assertions.assertEquals("kde", model.value().get(0).properties().comments());
- Assertions.assertEquals(Capabilities.DEVICE_MANAGEMENT, model.value().get(0).properties().features());
- Assertions.assertEquals(true, model.value().get(0).properties().enableDataResidency());
- Assertions.assertEquals(IpVersion.IPV4IPV6, model.value().get(0).properties().ipVersion());
- Assertions.assertEquals(IotHubSku.S3, model.value().get(0).sku().name());
- Assertions.assertEquals(8474633220472193573L, model.value().get(0).sku().capacity());
- Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubLocationDescriptionTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubLocationDescriptionTests.java
deleted file mode 100644
index c0c8bb8600d4..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubLocationDescriptionTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.IotHubLocationDescription;
-import com.azure.resourcemanager.iothub.models.IotHubReplicaRoleType;
-import org.junit.jupiter.api.Assertions;
-
-public final class IotHubLocationDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IotHubLocationDescription model =
- BinaryData
- .fromString("{\"location\":\"ijhtxf\",\"role\":\"primary\"}")
- .toObject(IotHubLocationDescription.class);
- Assertions.assertEquals("ijhtxf", model.location());
- Assertions.assertEquals(IotHubReplicaRoleType.PRIMARY, model.role());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IotHubLocationDescription model =
- new IotHubLocationDescription().withLocation("ijhtxf").withRole(IotHubReplicaRoleType.PRIMARY);
- model = BinaryData.fromObject(model).toObject(IotHubLocationDescription.class);
- Assertions.assertEquals("ijhtxf", model.location());
- Assertions.assertEquals(IotHubReplicaRoleType.PRIMARY, model.role());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubManagerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubManagerTests.java
deleted file mode 100644
index c6bbc17d308b..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubManagerTests.java
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.resourcemanager.iothub.generated;
-
-import com.azure.core.credential.TokenCredential;
-import com.azure.core.http.policy.HttpLogDetailLevel;
-import com.azure.core.http.policy.HttpLogOptions;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.Region;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.core.test.TestBase;
-import com.azure.core.test.annotation.DoNotRecord;
-import com.azure.core.util.Configuration;
-import com.azure.core.util.CoreUtils;
-import com.azure.identity.DefaultAzureCredentialBuilder;
-import com.azure.resourcemanager.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.ArmIdentity;
-import com.azure.resourcemanager.iothub.models.Capabilities;
-import com.azure.resourcemanager.iothub.models.CloudToDeviceProperties;
-import com.azure.resourcemanager.iothub.models.EventHubProperties;
-import com.azure.resourcemanager.iothub.models.FallbackRouteProperties;
-import com.azure.resourcemanager.iothub.models.FeedbackProperties;
-import com.azure.resourcemanager.iothub.models.IotHubDescription;
-import com.azure.resourcemanager.iothub.models.IotHubProperties;
-import com.azure.resourcemanager.iothub.models.IotHubSku;
-import com.azure.resourcemanager.iothub.models.IotHubSkuInfo;
-import com.azure.resourcemanager.iothub.models.MessagingEndpointProperties;
-import com.azure.resourcemanager.iothub.models.RoutingProperties;
-import com.azure.resourcemanager.iothub.models.RoutingSource;
-import com.azure.resourcemanager.iothub.models.ResourceIdentityType;
-import com.azure.resourcemanager.iothub.models.StorageEndpointProperties;
-import com.azure.resourcemanager.resources.ResourceManager;
-import io.netty.util.internal.StringUtil;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-import java.time.Duration;
-import java.util.Arrays;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Random;
-
-public class IotHubManagerTests extends TestBase {
-
- private static final Random RANDOM = new Random();
- private static final Region REGION = Region.US_WEST2;
- private String resourceGroupName = "rg" + randomPadding();
- private IotHubManager iotHubManager;
- private ResourceManager resourceManager;
- private boolean testEnv;
-
- @Override
- public void beforeTest() {
- final TokenCredential credential = new DefaultAzureCredentialBuilder().build();
- final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
-
- iotHubManager = IotHubManager
- .configure()
- .withLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC))
- .authenticate(credential, profile);
-
- resourceManager = ResourceManager
- .configure()
- .withLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC))
- .authenticate(credential, profile)
- .withDefaultSubscription();
-
- // use AZURE_RESOURCE_GROUP_NAME if run in LIVE CI
- String testResourceGroup = Configuration.getGlobalConfiguration().get("AZURE_RESOURCE_GROUP_NAME");
- testEnv = !CoreUtils.isNullOrEmpty(testResourceGroup);
- if (testEnv) {
- resourceGroupName = testResourceGroup;
- } else {
- resourceManager.resourceGroups()
- .define(resourceGroupName)
- .withRegion(REGION)
- .create();
- }
- }
-
- @Override
- protected void afterTest() {
- if (!testEnv) {
- resourceManager.resourceGroups().beginDeleteByName(resourceGroupName);
- }
- }
-
- @Test
- @DoNotRecord(skipInPlayback = true)
- public void testIotHubDescription() {
- IotHubDescription iotHubDescription = null;
- try {
- String iothubName = "iotHub" + randomPadding();
-
- // @embedmeStart
- Map eventHubEndpointsMap = new HashMap<>();
- eventHubEndpointsMap.put("events", new EventHubProperties()
- .withRetentionTimeInDays(1L).withPartitionCount(2));
-
- Map storageEndpointsMap = new HashMap<>();
- storageEndpointsMap.put("$default", new StorageEndpointProperties()
- .withSasTtlAsIso8601(Duration.ofHours(1L))
- .withConnectionString(StringUtil.EMPTY_STRING)
- .withContainerName(StringUtil.EMPTY_STRING));
-
- Map messagingEndpointsMap = new HashMap<>();
- messagingEndpointsMap.put("fileNotifications", new MessagingEndpointProperties()
- .withLockDurationAsIso8601(Duration.ofMinutes(1L))
- .withTtlAsIso8601(Duration.ofHours(1L))
- .withMaxDeliveryCount(10));
-
- iotHubDescription = iotHubManager.iotHubResources()
- .define(iothubName)
- .withRegion(REGION)
- .withExistingResourceGroup(resourceGroupName)
- .withSku(new IotHubSkuInfo().withName(IotHubSku.F1).withCapacity(1L))
- .withIdentity(new ArmIdentity().withType(ResourceIdentityType.NONE))
- .withProperties(
- new IotHubProperties()
- .withEventHubEndpoints(eventHubEndpointsMap)
- .withRouting(new RoutingProperties()
- .withFallbackRoute(
- new FallbackRouteProperties()
- .withName("$fallback")
- .withSource(RoutingSource.DEVICE_MESSAGES)
- .withCondition("true")
- .withIsEnabled(true)
- .withEndpointNames(Arrays.asList("events"))))
- .withStorageEndpoints(storageEndpointsMap)
- .withMessagingEndpoints(messagingEndpointsMap)
- .withEnableFileUploadNotifications(false)
- .withCloudToDevice(new CloudToDeviceProperties()
- .withMaxDeliveryCount(10)
- .withDefaultTtlAsIso8601(Duration.ofHours(1L))
- .withFeedback(new FeedbackProperties()
- .withLockDurationAsIso8601(Duration.ofMinutes(1L))
- .withTtlAsIso8601(Duration.ofHours(1L))
- .withMaxDeliveryCount(10)))
- .withFeatures(Capabilities.NONE)
- .withDisableLocalAuth(false)
- .withEnableDataResidency(false)
- )
- .create();
- // @embedmeEnd
- iotHubDescription.refresh();
-
- Assertions.assertEquals(iotHubDescription.name(), iothubName);
- Assertions.assertEquals(iotHubDescription.name(), iotHubManager.iotHubResources().getById(iotHubDescription.id()).name());
- Assertions.assertTrue(iotHubManager.iotHubResources().list().stream().count() > 0);
- } finally {
- if (iotHubDescription != null) {
- iotHubManager.iotHubResources().deleteById(iotHubDescription.id());
- }
- }
- }
-
- private static String randomPadding() {
- return String.format("%05d", Math.abs(RANDOM.nextInt() % 100000));
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubNameAvailabilityInfoInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubNameAvailabilityInfoInnerTests.java
deleted file mode 100644
index 9fa8712a2535..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubNameAvailabilityInfoInnerTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.IotHubNameAvailabilityInfoInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class IotHubNameAvailabilityInfoInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IotHubNameAvailabilityInfoInner model =
- BinaryData
- .fromString("{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"vbxwyjsflhh\"}")
- .toObject(IotHubNameAvailabilityInfoInner.class);
- Assertions.assertEquals("vbxwyjsflhh", model.message());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IotHubNameAvailabilityInfoInner model = new IotHubNameAvailabilityInfoInner().withMessage("vbxwyjsflhh");
- model = BinaryData.fromObject(model).toObject(IotHubNameAvailabilityInfoInner.class);
- Assertions.assertEquals("vbxwyjsflhh", model.message());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubPropertiesDeviceStreamsTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubPropertiesDeviceStreamsTests.java
deleted file mode 100644
index 023e53084d2d..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubPropertiesDeviceStreamsTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.IotHubPropertiesDeviceStreams;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class IotHubPropertiesDeviceStreamsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IotHubPropertiesDeviceStreams model =
- BinaryData
- .fromString("{\"streamingEndpoints\":[\"pcyvahfnljkyqx\",\"vuujq\",\"idokgjlj\"]}")
- .toObject(IotHubPropertiesDeviceStreams.class);
- Assertions.assertEquals("pcyvahfnljkyqx", model.streamingEndpoints().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IotHubPropertiesDeviceStreams model =
- new IotHubPropertiesDeviceStreams()
- .withStreamingEndpoints(Arrays.asList("pcyvahfnljkyqx", "vuujq", "idokgjlj"));
- model = BinaryData.fromObject(model).toObject(IotHubPropertiesDeviceStreams.class);
- Assertions.assertEquals("pcyvahfnljkyqx", model.streamingEndpoints().get(0));
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubQuotaMetricInfoInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubQuotaMetricInfoInnerTests.java
deleted file mode 100644
index 94c7bf06abad..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubQuotaMetricInfoInnerTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.IotHubQuotaMetricInfoInner;
-
-public final class IotHubQuotaMetricInfoInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IotHubQuotaMetricInfoInner model =
- BinaryData
- .fromString("{\"name\":\"ibycno\",\"currentValue\":4247317532240790185,\"maxValue\":35726863806871709}")
- .toObject(IotHubQuotaMetricInfoInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IotHubQuotaMetricInfoInner model = new IotHubQuotaMetricInfoInner();
- model = BinaryData.fromObject(model).toObject(IotHubQuotaMetricInfoInner.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubQuotaMetricInfoListResultTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubQuotaMetricInfoListResultTests.java
deleted file mode 100644
index 199f26c2b0a1..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubQuotaMetricInfoListResultTests.java
+++ /dev/null
@@ -1,35 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.IotHubQuotaMetricInfoInner;
-import com.azure.resourcemanager.iothub.models.IotHubQuotaMetricInfoListResult;
-import java.util.Arrays;
-
-public final class IotHubQuotaMetricInfoListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IotHubQuotaMetricInfoListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"name\":\"vlvqhjkbegi\",\"currentValue\":7757966335492850327,\"maxValue\":8168827985153452849},{\"name\":\"wwaloayqcgwrt\",\"currentValue\":1503893081288679809,\"maxValue\":203566108787836432},{\"name\":\"mhtxongmtsavjcb\",\"currentValue\":4203274454921698643,\"maxValue\":273530932074575825},{\"name\":\"nftguvriuhpr\",\"currentValue\":4550073852873606939,\"maxValue\":2697266994096414506}],\"nextLink\":\"ayriwwroyqbexrm\"}")
- .toObject(IotHubQuotaMetricInfoListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IotHubQuotaMetricInfoListResult model =
- new IotHubQuotaMetricInfoListResult()
- .withValue(
- Arrays
- .asList(
- new IotHubQuotaMetricInfoInner(),
- new IotHubQuotaMetricInfoInner(),
- new IotHubQuotaMetricInfoInner(),
- new IotHubQuotaMetricInfoInner()));
- model = BinaryData.fromObject(model).toObject(IotHubQuotaMetricInfoListResult.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesCheckNameAvailabilityWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesCheckNameAvailabilityWithResponseMockTests.java
deleted file mode 100644
index a1e5554d9051..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesCheckNameAvailabilityWithResponseMockTests.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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.IotHubNameAvailabilityInfo;
-import com.azure.resourcemanager.iothub.models.OperationInputs;
-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 IotHubResourcesCheckNameAvailabilityWithResponseMockTests {
- @Test
- public void testCheckNameAvailabilityWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"uslfead\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- IotHubNameAvailabilityInfo response =
- manager
- .iotHubResources()
- .checkNameAvailabilityWithResponse(
- new OperationInputs().withName("dtclusiypb"), com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("uslfead", response.message());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesCreateEventHubConsumerGroupWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesCreateEventHubConsumerGroupWithResponseMockTests.java
deleted file mode 100644
index 54e510be0fdc..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesCreateEventHubConsumerGroupWithResponseMockTests.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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupInfo;
-import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupName;
-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 IotHubResourcesCreateEventHubConsumerGroupWithResponseMockTests {
- @Test
- public void testCreateEventHubConsumerGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"dhtmdvypgikd\":\"datangwfqatm\"},\"etag\":\"zywkb\",\"id\":\"rryuzhlhkjo\",\"name\":\"rvqqaatj\",\"type\":\"nrvgoupmfiibfgg\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- EventHubConsumerGroupInfo response =
- manager
- .iotHubResources()
- .defineEventHubConsumerGroup("csnjvcdwxlpqekft")
- .withExistingEventHubEndpoint("opgxedkowepb", "pc", "fkbw")
- .withProperties(new EventHubConsumerGroupName().withName("khtj"))
- .create();
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesDeleteEventHubConsumerGroupWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesDeleteEventHubConsumerGroupWithResponseMockTests.java
deleted file mode 100644
index 5b4001c8d852..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesDeleteEventHubConsumerGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,64 +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.iothub.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.iothub.IotHubManager;
-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 IotHubResourcesDeleteEventHubConsumerGroupWithResponseMockTests {
- @Test
- public void testDeleteEventHubConsumerGroupWithResponse() 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .iotHubResources()
- .deleteEventHubConsumerGroupWithResponse(
- "qgsfraoyzkoow", "lmnguxaw", "aldsy", "uximerqfobw", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetEndpointHealthMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetEndpointHealthMockTests.java
deleted file mode 100644
index 3e334d389cef..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetEndpointHealthMockTests.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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.EndpointHealthData;
-import com.azure.resourcemanager.iothub.models.EndpointHealthStatus;
-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 IotHubResourcesGetEndpointHealthMockTests {
- @Test
- public void testGetEndpointHealth() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"endpointId\":\"gicccnxqhuex\",\"healthStatus\":\"healthy\",\"lastKnownError\":\"lstvlzywe\",\"lastKnownErrorTime\":\"Fri,"
- + " 10 Dec 2021 13:38:49 GMT\",\"lastSuccessfulSendAttemptTime\":\"Tue, 25 May 2021 03:52:53"
- + " GMT\",\"lastSendAttemptTime\":\"Wed, 07 Apr 2021 16:00:46 GMT\"}]}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.iotHubResources().getEndpointHealth("swe", "pqwd", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("gicccnxqhuex", response.iterator().next().endpointId());
- Assertions.assertEquals(EndpointHealthStatus.HEALTHY, response.iterator().next().healthStatus());
- Assertions.assertEquals("lstvlzywe", response.iterator().next().lastKnownError());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-12-10T13:38:49Z"), response.iterator().next().lastKnownErrorTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-25T03:52:53Z"),
- response.iterator().next().lastSuccessfulSendAttemptTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-07T16:00:46Z"), response.iterator().next().lastSendAttemptTime());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetEventHubConsumerGroupWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetEventHubConsumerGroupWithResponseMockTests.java
deleted file mode 100644
index a9a3c87be377..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetEventHubConsumerGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,68 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupInfo;
-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 IotHubResourcesGetEventHubConsumerGroupWithResponseMockTests {
- @Test
- public void testGetEventHubConsumerGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"ujmqlgkfbtndoa\":\"datau\",\"bjcntujitc\":\"datan\",\"twwaezkojvdcpzf\":\"dataed\",\"foxciq\":\"dataqouicybxarzgsz\"},\"etag\":\"idoamciodhkha\",\"id\":\"xkhnzbonlwnto\",\"name\":\"gokdwbwhks\",\"type\":\"zcmrvexztvb\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- EventHubConsumerGroupInfo response =
- manager
- .iotHubResources()
- .getEventHubConsumerGroupWithResponse(
- "wjue", "aeburuvdmo", "s", "zlxwabmqoefkifr", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetJobWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetJobWithResponseMockTests.java
deleted file mode 100644
index cbb47a86f79b..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetJobWithResponseMockTests.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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.JobResponse;
-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 IotHubResourcesGetJobWithResponseMockTests {
- @Test
- public void testGetJobWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"jobId\":\"fozbhdmsmlmzqhof\",\"startTimeUtc\":\"Wed, 05 May 2021 04:42:21 GMT\",\"endTimeUtc\":\"Tue,"
- + " 16 Nov 2021 17:43:34"
- + " GMT\",\"type\":\"readDeviceProperties\",\"status\":\"failed\",\"failureReason\":\"xicslfao\",\"statusMessage\":\"piyylhalnswhccsp\",\"parentJobId\":\"aivwitqscywu\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- JobResponse response =
- manager
- .iotHubResources()
- .getJobWithResponse("enuuzkopbm", "nrfdw", "yuhhziu", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetQuotaMetricsMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetQuotaMetricsMockTests.java
deleted file mode 100644
index 3658c9401382..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetQuotaMetricsMockTests.java
+++ /dev/null
@@ -1,65 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.IotHubQuotaMetricInfo;
-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 IotHubResourcesGetQuotaMetricsMockTests {
- @Test
- public void testGetQuotaMetrics() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"name\":\"bwemhairs\",\"currentValue\":2396598992556522813,\"maxValue\":1910924176223083649}]}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.iotHubResources().getQuotaMetrics("gwol", "h", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetStatsWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetStatsWithResponseMockTests.java
deleted file mode 100644
index 403f7571037d..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetStatsWithResponseMockTests.java
+++ /dev/null
@@ -1,67 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.RegistryStatistics;
-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 IotHubResourcesGetStatsWithResponseMockTests {
- @Test
- public void testGetStatsWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"totalDeviceCount\":1881000145918379423,\"enabledDeviceCount\":5500271153534098761,\"disabledDeviceCount\":6702265057684474491}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- RegistryStatistics response =
- manager
- .iotHubResources()
- .getStatsWithResponse("ofncckwyfzqwhxxb", "yq", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetValidSkusMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetValidSkusMockTests.java
deleted file mode 100644
index 006754707ca6..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesGetValidSkusMockTests.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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.IotHubSku;
-import com.azure.resourcemanager.iothub.models.IotHubSkuDescription;
-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 IotHubResourcesGetValidSkusMockTests {
- @Test
- public void testGetValidSkus() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"resourceType\":\"bqwcsdbnwdcf\",\"sku\":{\"name\":\"S2\",\"tier\":\"Standard\",\"capacity\":3846405596035643939},\"capacity\":{\"minimum\":1028769978978951070,\"maximum\":4684256943455156597,\"default\":6093345050470116807,\"scaleType\":\"Manual\"}}]}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.iotHubResources().getValidSkus("riolxorjalt", "lmncw", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(IotHubSku.S2, response.iterator().next().sku().name());
- Assertions.assertEquals(3846405596035643939L, response.iterator().next().sku().capacity());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesImportDevicesWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesImportDevicesWithResponseMockTests.java
deleted file mode 100644
index 6419a1058e68..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesImportDevicesWithResponseMockTests.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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.AuthenticationType;
-import com.azure.resourcemanager.iothub.models.ImportDevicesRequest;
-import com.azure.resourcemanager.iothub.models.JobResponse;
-import com.azure.resourcemanager.iothub.models.ManagedIdentity;
-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 IotHubResourcesImportDevicesWithResponseMockTests {
- @Test
- public void testImportDevicesWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"jobId\":\"kvtvsexso\",\"startTimeUtc\":\"Sat, 09 Jan 2021 15:20:12 GMT\",\"endTimeUtc\":\"Thu, 28 Jan"
- + " 2021 09:30:25"
- + " GMT\",\"type\":\"readDeviceProperties\",\"status\":\"completed\",\"failureReason\":\"hxvrhmzkwpjg\",\"statusMessage\":\"spughftqsxhq\",\"parentJobId\":\"j\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- JobResponse response =
- manager
- .iotHubResources()
- .importDevicesWithResponse(
- "gzpfrla",
- "szrnwo",
- new ImportDevicesRequest()
- .withInputBlobContainerUri("indfpwpjyl")
- .withOutputBlobContainerUri("bt")
- .withInputBlobName("flsjc")
- .withOutputBlobName("szfjvfbgofelja")
- .withAuthenticationType(AuthenticationType.IDENTITY_BASED)
- .withIdentity(new ManagedIdentity().withUserAssignedIdentity("hldvriii"))
- .withIncludeConfigurations(true)
- .withConfigurationsBlobName("lg"),
- com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesListEventHubConsumerGroupsMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesListEventHubConsumerGroupsMockTests.java
deleted file mode 100644
index 5f7e916f7048..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesListEventHubConsumerGroupsMockTests.java
+++ /dev/null
@@ -1,67 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupInfo;
-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 IotHubResourcesListEventHubConsumerGroupsMockTests {
- @Test
- public void testListEventHubConsumerGroups() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"kgjubgdknnqvsazn\":\"datalxqtvcofudfl\"},\"etag\":\"tor\",\"id\":\"dsg\",\"name\":\"a\",\"type\":\"mkycgra\"}]}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .iotHubResources()
- .listEventHubConsumerGroups("vxb", "t", "udutnco", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesListJobsMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesListJobsMockTests.java
deleted file mode 100644
index 029b1156ec60..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesListJobsMockTests.java
+++ /dev/null
@@ -1,67 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.JobResponse;
-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 IotHubResourcesListJobsMockTests {
- @Test
- public void testListJobs() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"jobId\":\"dsnfdsdoakgtdl\",\"startTimeUtc\":\"Sat, 23 Oct 2021 18:05:06"
- + " GMT\",\"endTimeUtc\":\"Mon, 21 Jun 2021 09:18:55"
- + " GMT\",\"type\":\"writeDeviceProperties\",\"status\":\"enqueued\",\"failureReason\":\"wpusdsttwvogv\",\"statusMessage\":\"ejdcngqqmoakuf\",\"parentJobId\":\"jzrwrdgrtw\"}]}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.iotHubResources().listJobs("znkbykutwpfhpagm", "r", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesTestAllRoutesWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesTestAllRoutesWithResponseMockTests.java
deleted file mode 100644
index 94215f051155..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesTestAllRoutesWithResponseMockTests.java
+++ /dev/null
@@ -1,101 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.RoutingMessage;
-import com.azure.resourcemanager.iothub.models.RoutingSource;
-import com.azure.resourcemanager.iothub.models.RoutingTwin;
-import com.azure.resourcemanager.iothub.models.RoutingTwinProperties;
-import com.azure.resourcemanager.iothub.models.TestAllRoutesInput;
-import com.azure.resourcemanager.iothub.models.TestAllRoutesResult;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.HashMap;
-import java.util.Map;
-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 IotHubResourcesTestAllRoutesWithResponseMockTests {
- @Test
- public void testTestAllRoutesWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"routes\":[{}]}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- TestAllRoutesResult response =
- manager
- .iotHubResources()
- .testAllRoutesWithResponse(
- "ygqukyhejh",
- "isxgfp",
- new TestAllRoutesInput()
- .withRoutingSource(RoutingSource.DEVICE_CONNECTION_STATE_EVENTS)
- .withMessage(
- new RoutingMessage()
- .withBody("pv")
- .withAppProperties(mapOf("swibyr", "pqvujzraehtwdwrf"))
- .withSystemProperties(mapOf("hevxcced", "bhshfwpracstwity")))
- .withTwin(
- new RoutingTwin()
- .withTags("datamd")
- .withProperties(
- new RoutingTwinProperties()
- .withDesired("datanwzxltjcv")
- .withReported("dataltiugcxnavv"))),
- com.azure.core.util.Context.NONE)
- .getValue();
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesTestRouteWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesTestRouteWithResponseMockTests.java
deleted file mode 100644
index e62cb8cf08c8..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubResourcesTestRouteWithResponseMockTests.java
+++ /dev/null
@@ -1,113 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.RouteProperties;
-import com.azure.resourcemanager.iothub.models.RoutingMessage;
-import com.azure.resourcemanager.iothub.models.RoutingSource;
-import com.azure.resourcemanager.iothub.models.RoutingTwin;
-import com.azure.resourcemanager.iothub.models.RoutingTwinProperties;
-import com.azure.resourcemanager.iothub.models.TestResultStatus;
-import com.azure.resourcemanager.iothub.models.TestRouteInput;
-import com.azure.resourcemanager.iothub.models.TestRouteResult;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-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 IotHubResourcesTestRouteWithResponseMockTests {
- @Test
- public void testTestRouteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"result\":\"undefined\",\"details\":{\"compilationErrors\":[]}}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- TestRouteResult response =
- manager
- .iotHubResources()
- .testRouteWithResponse(
- "byqunyow",
- "wlmdjrkv",
- new TestRouteInput()
- .withMessage(
- new RoutingMessage()
- .withBody("vfvpdbodaciz")
- .withAppProperties(mapOf("hvxndzwmkrefajpj", "lhkrribdeibqipqk"))
- .withSystemProperties(mapOf("b", "kqnyh", "jivfxzsjabib", "j")))
- .withRoute(
- new RouteProperties()
- .withName("ystawfsdjpvkvp")
- .withSource(RoutingSource.DIGITAL_TWIN_CHANGE_EVENTS)
- .withCondition("bkzbzkd")
- .withEndpointNames(Arrays.asList("cjabudurgkakmo"))
- .withIsEnabled(true))
- .withTwin(
- new RoutingTwin()
- .withTags("datajk")
- .withProperties(
- new RoutingTwinProperties()
- .withDesired("datahmouwqlgzrfze")
- .withReported("dataebizikayuh"))),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(TestResultStatus.UNDEFINED, response.result());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubSkuDescriptionInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubSkuDescriptionInnerTests.java
deleted file mode 100644
index 1d052317f760..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubSkuDescriptionInnerTests.java
+++ /dev/null
@@ -1,36 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.IotHubSkuDescriptionInner;
-import com.azure.resourcemanager.iothub.models.IotHubCapacity;
-import com.azure.resourcemanager.iothub.models.IotHubSku;
-import com.azure.resourcemanager.iothub.models.IotHubSkuInfo;
-import org.junit.jupiter.api.Assertions;
-
-public final class IotHubSkuDescriptionInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IotHubSkuDescriptionInner model =
- BinaryData
- .fromString(
- "{\"resourceType\":\"srtslhspkdeem\",\"sku\":{\"name\":\"S3\",\"tier\":\"Basic\",\"capacity\":1461011233299690621},\"capacity\":{\"minimum\":1611861407793999607,\"maximum\":5342331061504753909,\"default\":2936969663422181948,\"scaleType\":\"Automatic\"}}")
- .toObject(IotHubSkuDescriptionInner.class);
- Assertions.assertEquals(IotHubSku.S3, model.sku().name());
- Assertions.assertEquals(1461011233299690621L, model.sku().capacity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IotHubSkuDescriptionInner model =
- new IotHubSkuDescriptionInner()
- .withSku(new IotHubSkuInfo().withName(IotHubSku.S3).withCapacity(1461011233299690621L))
- .withCapacity(new IotHubCapacity());
- model = BinaryData.fromObject(model).toObject(IotHubSkuDescriptionInner.class);
- Assertions.assertEquals(IotHubSku.S3, model.sku().name());
- Assertions.assertEquals(1461011233299690621L, model.sku().capacity());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubSkuDescriptionListResultTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubSkuDescriptionListResultTests.java
deleted file mode 100644
index f5610049f6e7..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubSkuDescriptionListResultTests.java
+++ /dev/null
@@ -1,51 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.IotHubSkuDescriptionInner;
-import com.azure.resourcemanager.iothub.models.IotHubCapacity;
-import com.azure.resourcemanager.iothub.models.IotHubSku;
-import com.azure.resourcemanager.iothub.models.IotHubSkuDescriptionListResult;
-import com.azure.resourcemanager.iothub.models.IotHubSkuInfo;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class IotHubSkuDescriptionListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IotHubSkuDescriptionListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"resourceType\":\"qugxywpmueefjzwf\",\"sku\":{\"name\":\"B1\",\"tier\":\"Free\",\"capacity\":2752624738826273376},\"capacity\":{\"minimum\":2895240290674738337,\"maximum\":722648832186407891,\"default\":5846205401797666469,\"scaleType\":\"Automatic\"}},{\"resourceType\":\"qxtccmgyudx\",\"sku\":{\"name\":\"B2\",\"tier\":\"Standard\",\"capacity\":5036022727729954665},\"capacity\":{\"minimum\":5697722366346871182,\"maximum\":328428173774055677,\"default\":1705151259952930874,\"scaleType\":\"None\"}},{\"resourceType\":\"hdzhlrqj\",\"sku\":{\"name\":\"B2\",\"tier\":\"Standard\",\"capacity\":6374623406138918990},\"capacity\":{\"minimum\":8781176229641624570,\"maximum\":5275318016138914703,\"default\":1967797899884280622,\"scaleType\":\"None\"}},{\"resourceType\":\"n\",\"sku\":{\"name\":\"S2\",\"tier\":\"Free\",\"capacity\":5373828477618369096},\"capacity\":{\"minimum\":739899630467630797,\"maximum\":574839923891984639,\"default\":6504833090063292182,\"scaleType\":\"Automatic\"}}],\"nextLink\":\"hhseyv\"}")
- .toObject(IotHubSkuDescriptionListResult.class);
- Assertions.assertEquals(IotHubSku.B1, model.value().get(0).sku().name());
- Assertions.assertEquals(2752624738826273376L, model.value().get(0).sku().capacity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IotHubSkuDescriptionListResult model =
- new IotHubSkuDescriptionListResult()
- .withValue(
- Arrays
- .asList(
- new IotHubSkuDescriptionInner()
- .withSku(new IotHubSkuInfo().withName(IotHubSku.B1).withCapacity(2752624738826273376L))
- .withCapacity(new IotHubCapacity()),
- new IotHubSkuDescriptionInner()
- .withSku(new IotHubSkuInfo().withName(IotHubSku.B2).withCapacity(5036022727729954665L))
- .withCapacity(new IotHubCapacity()),
- new IotHubSkuDescriptionInner()
- .withSku(new IotHubSkuInfo().withName(IotHubSku.B2).withCapacity(6374623406138918990L))
- .withCapacity(new IotHubCapacity()),
- new IotHubSkuDescriptionInner()
- .withSku(new IotHubSkuInfo().withName(IotHubSku.S2).withCapacity(5373828477618369096L))
- .withCapacity(new IotHubCapacity())));
- model = BinaryData.fromObject(model).toObject(IotHubSkuDescriptionListResult.class);
- Assertions.assertEquals(IotHubSku.B1, model.value().get(0).sku().name());
- Assertions.assertEquals(2752624738826273376L, model.value().get(0).sku().capacity());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubSkuInfoTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubSkuInfoTests.java
deleted file mode 100644
index 3fe350ea0473..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubSkuInfoTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.IotHubSku;
-import com.azure.resourcemanager.iothub.models.IotHubSkuInfo;
-import org.junit.jupiter.api.Assertions;
-
-public final class IotHubSkuInfoTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IotHubSkuInfo model =
- BinaryData
- .fromString("{\"name\":\"F1\",\"tier\":\"Free\",\"capacity\":6629328138871723809}")
- .toObject(IotHubSkuInfo.class);
- Assertions.assertEquals(IotHubSku.F1, model.name());
- Assertions.assertEquals(6629328138871723809L, model.capacity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IotHubSkuInfo model = new IotHubSkuInfo().withName(IotHubSku.F1).withCapacity(6629328138871723809L);
- model = BinaryData.fromObject(model).toObject(IotHubSkuInfo.class);
- Assertions.assertEquals(IotHubSku.F1, model.name());
- Assertions.assertEquals(6629328138871723809L, model.capacity());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubsManualFailoverMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubsManualFailoverMockTests.java
deleted file mode 100644
index 6e80d396a3fc..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IotHubsManualFailoverMockTests.java
+++ /dev/null
@@ -1,68 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.FailoverInput;
-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 IotHubsManualFailoverMockTests {
- @Test
- public void testManualFailover() 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .iotHubs()
- .manualFailover(
- "ggufhyaomtb",
- "hhavgrvkffovjz",
- new FailoverInput().withFailoverRegion("pjbi"),
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IpFilterRuleTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IpFilterRuleTests.java
deleted file mode 100644
index 9e18bb2a6132..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/IpFilterRuleTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.IpFilterActionType;
-import com.azure.resourcemanager.iothub.models.IpFilterRule;
-import org.junit.jupiter.api.Assertions;
-
-public final class IpFilterRuleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IpFilterRule model =
- BinaryData
- .fromString("{\"filterName\":\"git\",\"action\":\"Accept\",\"ipMask\":\"qhabifpikxwcz\"}")
- .toObject(IpFilterRule.class);
- Assertions.assertEquals("git", model.filterName());
- Assertions.assertEquals(IpFilterActionType.ACCEPT, model.action());
- Assertions.assertEquals("qhabifpikxwcz", model.ipMask());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IpFilterRule model =
- new IpFilterRule().withFilterName("git").withAction(IpFilterActionType.ACCEPT).withIpMask("qhabifpikxwcz");
- model = BinaryData.fromObject(model).toObject(IpFilterRule.class);
- Assertions.assertEquals("git", model.filterName());
- Assertions.assertEquals(IpFilterActionType.ACCEPT, model.action());
- Assertions.assertEquals("qhabifpikxwcz", model.ipMask());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/JobResponseInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/JobResponseInnerTests.java
deleted file mode 100644
index f67fb5faa5c3..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/JobResponseInnerTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.JobResponseInner;
-
-public final class JobResponseInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- JobResponseInner model =
- BinaryData
- .fromString(
- "{\"jobId\":\"lupj\",\"startTimeUtc\":\"Wed, 21 Apr 2021 08:53:38 GMT\",\"endTimeUtc\":\"Mon, 26"
- + " Apr 2021 22:12:21"
- + " GMT\",\"type\":\"import\",\"status\":\"completed\",\"failureReason\":\"wsrtjriplrbpbe\",\"statusMessage\":\"ghfg\",\"parentJobId\":\"c\"}")
- .toObject(JobResponseInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- JobResponseInner model = new JobResponseInner();
- model = BinaryData.fromObject(model).toObject(JobResponseInner.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/JobResponseListResultTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/JobResponseListResultTests.java
deleted file mode 100644
index 356fda77e2ad..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/JobResponseListResultTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.JobResponseInner;
-import com.azure.resourcemanager.iothub.models.JobResponseListResult;
-import java.util.Arrays;
-
-public final class JobResponseListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- JobResponseListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"jobId\":\"skxfbk\",\"startTimeUtc\":\"Fri, 05 Feb 2021 18:39:24"
- + " GMT\",\"endTimeUtc\":\"Sun, 14 Feb 2021 18:57:00"
- + " GMT\",\"type\":\"writeDeviceProperties\",\"status\":\"completed\",\"failureReason\":\"hjdauwhvylwz\",\"statusMessage\":\"dhxujznbmpo\",\"parentJobId\":\"wpr\"}],\"nextLink\":\"lve\"}")
- .toObject(JobResponseListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- JobResponseListResult model = new JobResponseListResult().withValue(Arrays.asList(new JobResponseInner()));
- model = BinaryData.fromObject(model).toObject(JobResponseListResult.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ManagedIdentityTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ManagedIdentityTests.java
deleted file mode 100644
index ae9f03a5015c..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ManagedIdentityTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.ManagedIdentity;
-import org.junit.jupiter.api.Assertions;
-
-public final class ManagedIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ManagedIdentity model =
- BinaryData.fromString("{\"userAssignedIdentity\":\"czvyifq\"}").toObject(ManagedIdentity.class);
- Assertions.assertEquals("czvyifq", model.userAssignedIdentity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ManagedIdentity model = new ManagedIdentity().withUserAssignedIdentity("czvyifq");
- model = BinaryData.fromObject(model).toObject(ManagedIdentity.class);
- Assertions.assertEquals("czvyifq", model.userAssignedIdentity());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/MatchedRouteTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/MatchedRouteTests.java
deleted file mode 100644
index 935cf6b5d5b7..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/MatchedRouteTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.MatchedRoute;
-import com.azure.resourcemanager.iothub.models.RouteProperties;
-import com.azure.resourcemanager.iothub.models.RoutingSource;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class MatchedRouteTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- MatchedRoute model =
- BinaryData
- .fromString(
- "{\"properties\":{\"name\":\"gynduha\",\"source\":\"DigitalTwinChangeEvents\",\"condition\":\"lkthu\",\"endpointNames\":[\"qolbgyc\",\"uie\",\"tgccymvaolpss\",\"qlfmmdnbb\"],\"isEnabled\":true}}")
- .toObject(MatchedRoute.class);
- Assertions.assertEquals("gynduha", model.properties().name());
- Assertions.assertEquals(RoutingSource.DIGITAL_TWIN_CHANGE_EVENTS, model.properties().source());
- Assertions.assertEquals("lkthu", model.properties().condition());
- Assertions.assertEquals("qolbgyc", model.properties().endpointNames().get(0));
- Assertions.assertEquals(true, model.properties().isEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- MatchedRoute model =
- new MatchedRoute()
- .withProperties(
- new RouteProperties()
- .withName("gynduha")
- .withSource(RoutingSource.DIGITAL_TWIN_CHANGE_EVENTS)
- .withCondition("lkthu")
- .withEndpointNames(Arrays.asList("qolbgyc", "uie", "tgccymvaolpss", "qlfmmdnbb"))
- .withIsEnabled(true));
- model = BinaryData.fromObject(model).toObject(MatchedRoute.class);
- Assertions.assertEquals("gynduha", model.properties().name());
- Assertions.assertEquals(RoutingSource.DIGITAL_TWIN_CHANGE_EVENTS, model.properties().source());
- Assertions.assertEquals("lkthu", model.properties().condition());
- Assertions.assertEquals("qolbgyc", model.properties().endpointNames().get(0));
- Assertions.assertEquals(true, model.properties().isEnabled());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/MessagingEndpointPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/MessagingEndpointPropertiesTests.java
deleted file mode 100644
index 012ac5d11736..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/MessagingEndpointPropertiesTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.MessagingEndpointProperties;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class MessagingEndpointPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- MessagingEndpointProperties model =
- BinaryData
- .fromString(
- "{\"lockDurationAsIso8601\":\"PT61H42M35S\",\"ttlAsIso8601\":\"PT18H25M44S\",\"maxDeliveryCount\":1688727412}")
- .toObject(MessagingEndpointProperties.class);
- Assertions.assertEquals(Duration.parse("PT61H42M35S"), model.lockDurationAsIso8601());
- Assertions.assertEquals(Duration.parse("PT18H25M44S"), model.ttlAsIso8601());
- Assertions.assertEquals(1688727412, model.maxDeliveryCount());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- MessagingEndpointProperties model =
- new MessagingEndpointProperties()
- .withLockDurationAsIso8601(Duration.parse("PT61H42M35S"))
- .withTtlAsIso8601(Duration.parse("PT18H25M44S"))
- .withMaxDeliveryCount(1688727412);
- model = BinaryData.fromObject(model).toObject(MessagingEndpointProperties.class);
- Assertions.assertEquals(Duration.parse("PT61H42M35S"), model.lockDurationAsIso8601());
- Assertions.assertEquals(Duration.parse("PT18H25M44S"), model.ttlAsIso8601());
- Assertions.assertEquals(1688727412, model.maxDeliveryCount());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/NameTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/NameTests.java
deleted file mode 100644
index 04edc5aef8cf..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/NameTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.Name;
-import org.junit.jupiter.api.Assertions;
-
-public final class NameTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Name model =
- BinaryData
- .fromString("{\"value\":\"gktrmgucnapkte\",\"localizedValue\":\"llwptfdy\"}")
- .toObject(Name.class);
- Assertions.assertEquals("gktrmgucnapkte", model.value());
- Assertions.assertEquals("llwptfdy", model.localizedValue());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Name model = new Name().withValue("gktrmgucnapkte").withLocalizedValue("llwptfdy");
- model = BinaryData.fromObject(model).toObject(Name.class);
- Assertions.assertEquals("gktrmgucnapkte", model.value());
- Assertions.assertEquals("llwptfdy", model.localizedValue());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/NetworkRuleSetIpRuleTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/NetworkRuleSetIpRuleTests.java
deleted file mode 100644
index d311375f0218..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/NetworkRuleSetIpRuleTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.NetworkRuleIpAction;
-import com.azure.resourcemanager.iothub.models.NetworkRuleSetIpRule;
-import org.junit.jupiter.api.Assertions;
-
-public final class NetworkRuleSetIpRuleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- NetworkRuleSetIpRule model =
- BinaryData
- .fromString("{\"filterName\":\"vd\",\"action\":\"Allow\",\"ipMask\":\"grtfwvu\"}")
- .toObject(NetworkRuleSetIpRule.class);
- Assertions.assertEquals("vd", model.filterName());
- Assertions.assertEquals(NetworkRuleIpAction.ALLOW, model.action());
- Assertions.assertEquals("grtfwvu", model.ipMask());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- NetworkRuleSetIpRule model =
- new NetworkRuleSetIpRule().withFilterName("vd").withAction(NetworkRuleIpAction.ALLOW).withIpMask("grtfwvu");
- model = BinaryData.fromObject(model).toObject(NetworkRuleSetIpRule.class);
- Assertions.assertEquals("vd", model.filterName());
- Assertions.assertEquals(NetworkRuleIpAction.ALLOW, model.action());
- Assertions.assertEquals("grtfwvu", model.ipMask());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/NetworkRuleSetPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/NetworkRuleSetPropertiesTests.java
deleted file mode 100644
index 3c5459998c87..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/NetworkRuleSetPropertiesTests.java
+++ /dev/null
@@ -1,54 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.DefaultAction;
-import com.azure.resourcemanager.iothub.models.NetworkRuleIpAction;
-import com.azure.resourcemanager.iothub.models.NetworkRuleSetIpRule;
-import com.azure.resourcemanager.iothub.models.NetworkRuleSetProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class NetworkRuleSetPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- NetworkRuleSetProperties model =
- BinaryData
- .fromString(
- "{\"defaultAction\":\"Allow\",\"applyToBuiltInEventHubEndpoint\":true,\"ipRules\":[{\"filterName\":\"pqxu\",\"action\":\"Allow\",\"ipMask\":\"y\"},{\"filterName\":\"n\",\"action\":\"Allow\",\"ipMask\":\"ybrk\"}]}")
- .toObject(NetworkRuleSetProperties.class);
- Assertions.assertEquals(DefaultAction.ALLOW, model.defaultAction());
- Assertions.assertEquals(true, model.applyToBuiltInEventHubEndpoint());
- Assertions.assertEquals("pqxu", model.ipRules().get(0).filterName());
- Assertions.assertEquals(NetworkRuleIpAction.ALLOW, model.ipRules().get(0).action());
- Assertions.assertEquals("y", model.ipRules().get(0).ipMask());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- NetworkRuleSetProperties model =
- new NetworkRuleSetProperties()
- .withDefaultAction(DefaultAction.ALLOW)
- .withApplyToBuiltInEventHubEndpoint(true)
- .withIpRules(
- Arrays
- .asList(
- new NetworkRuleSetIpRule()
- .withFilterName("pqxu")
- .withAction(NetworkRuleIpAction.ALLOW)
- .withIpMask("y"),
- new NetworkRuleSetIpRule()
- .withFilterName("n")
- .withAction(NetworkRuleIpAction.ALLOW)
- .withIpMask("ybrk")));
- model = BinaryData.fromObject(model).toObject(NetworkRuleSetProperties.class);
- Assertions.assertEquals(DefaultAction.ALLOW, model.defaultAction());
- Assertions.assertEquals(true, model.applyToBuiltInEventHubEndpoint());
- Assertions.assertEquals("pqxu", model.ipRules().get(0).filterName());
- Assertions.assertEquals(NetworkRuleIpAction.ALLOW, model.ipRules().get(0).action());
- Assertions.assertEquals("y", model.ipRules().get(0).ipMask());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationDisplayTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationDisplayTests.java
deleted file mode 100644
index 15226929d47c..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationDisplayTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.OperationDisplay;
-
-public final class OperationDisplayTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationDisplay model =
- BinaryData
- .fromString(
- "{\"provider\":\"lx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"}")
- .toObject(OperationDisplay.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationDisplay model = new OperationDisplay();
- model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationInnerTests.java
deleted file mode 100644
index 7760dba4fce2..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationInnerTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.OperationInner;
-import com.azure.resourcemanager.iothub.models.OperationDisplay;
-
-public final class OperationInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationInner model =
- BinaryData
- .fromString(
- "{\"name\":\"nygj\",\"display\":{\"provider\":\"ddeqsrdeupewnwre\",\"resource\":\"jzyflu\",\"operation\":\"rh\",\"description\":\"fcqhsmyurkd\"}}")
- .toObject(OperationInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationInner model = new OperationInner().withDisplay(new OperationDisplay());
- model = BinaryData.fromObject(model).toObject(OperationInner.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationInputsTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationInputsTests.java
deleted file mode 100644
index 6ef78cd8ea4e..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationInputsTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.OperationInputs;
-import org.junit.jupiter.api.Assertions;
-
-public final class OperationInputsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationInputs model = BinaryData.fromString("{\"name\":\"touwaboekqv\"}").toObject(OperationInputs.class);
- Assertions.assertEquals("touwaboekqv", model.name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationInputs model = new OperationInputs().withName("touwaboekqv");
- model = BinaryData.fromObject(model).toObject(OperationInputs.class);
- Assertions.assertEquals("touwaboekqv", model.name());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationListResultTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationListResultTests.java
deleted file mode 100644
index df2d04c5f9a7..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationListResultTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.OperationListResult;
-
-public final class OperationListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"}},{\"name\":\"ownoizhw\",\"display\":{\"provider\":\"ybqsoqijg\",\"resource\":\"mbpazlobcufpdzn\",\"operation\":\"t\",\"description\":\"qjnqglhqgnufoooj\"}},{\"name\":\"ifsqesaagdfmg\",\"display\":{\"provider\":\"hjxri\",\"resource\":\"wmrvktsizntocipa\",\"operation\":\"ajpsquc\",\"description\":\"o\"}}],\"nextLink\":\"dkfo\"}")
- .toObject(OperationListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationListResult model = new OperationListResult();
- model = BinaryData.fromObject(model).toObject(OperationListResult.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationsListMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationsListMockTests.java
deleted file mode 100644
index 4bbe3a9cb3fc..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/OperationsListMockTests.java
+++ /dev/null
@@ -1,64 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.Operation;
-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 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\":\"xdy\",\"display\":{\"provider\":\"y\",\"resource\":\"ogjltdtbnnhad\",\"operation\":\"crkvcikhnv\",\"description\":\"mqg\"}}]}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .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);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionInnerTests.java
deleted file mode 100644
index 21ad1c1963ff..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionInnerTests.java
+++ /dev/null
@@ -1,51 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.PrivateEndpointConnectionInner;
-import com.azure.resourcemanager.iothub.models.PrivateEndpoint;
-import com.azure.resourcemanager.iothub.models.PrivateEndpointConnectionProperties;
-import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionState;
-import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionStatus;
-import org.junit.jupiter.api.Assertions;
-
-public final class PrivateEndpointConnectionInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateEndpointConnectionInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"privateEndpoint\":{\"id\":\"audccsnhs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"nyejhkryhtnap\",\"actionsRequired\":\"wlokjyem\"}},\"id\":\"kvnipjoxz\",\"name\":\"nchgej\",\"type\":\"podmailzydehojwy\"}")
- .toObject(PrivateEndpointConnectionInner.class);
- Assertions
- .assertEquals(
- PrivateLinkServiceConnectionStatus.DISCONNECTED,
- model.properties().privateLinkServiceConnectionState().status());
- Assertions.assertEquals("nyejhkryhtnap", model.properties().privateLinkServiceConnectionState().description());
- Assertions.assertEquals("wlokjyem", model.properties().privateLinkServiceConnectionState().actionsRequired());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateEndpointConnectionInner model =
- new PrivateEndpointConnectionInner()
- .withProperties(
- new PrivateEndpointConnectionProperties()
- .withPrivateEndpoint(new PrivateEndpoint())
- .withPrivateLinkServiceConnectionState(
- new PrivateLinkServiceConnectionState()
- .withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED)
- .withDescription("nyejhkryhtnap")
- .withActionsRequired("wlokjyem")));
- model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class);
- Assertions
- .assertEquals(
- PrivateLinkServiceConnectionStatus.DISCONNECTED,
- model.properties().privateLinkServiceConnectionState().status());
- Assertions.assertEquals("nyejhkryhtnap", model.properties().privateLinkServiceConnectionState().description());
- Assertions.assertEquals("wlokjyem", model.properties().privateLinkServiceConnectionState().actionsRequired());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionPropertiesTests.java
deleted file mode 100644
index b895a676db3d..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionPropertiesTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.PrivateEndpoint;
-import com.azure.resourcemanager.iothub.models.PrivateEndpointConnectionProperties;
-import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionState;
-import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionStatus;
-import org.junit.jupiter.api.Assertions;
-
-public final class PrivateEndpointConnectionPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateEndpointConnectionProperties model =
- BinaryData
- .fromString(
- "{\"privateEndpoint\":{\"id\":\"xinpmqnjaq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"xj\",\"actionsRequired\":\"r\"}}")
- .toObject(PrivateEndpointConnectionProperties.class);
- Assertions
- .assertEquals(
- PrivateLinkServiceConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status());
- Assertions.assertEquals("xj", model.privateLinkServiceConnectionState().description());
- Assertions.assertEquals("r", model.privateLinkServiceConnectionState().actionsRequired());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateEndpointConnectionProperties model =
- new PrivateEndpointConnectionProperties()
- .withPrivateEndpoint(new PrivateEndpoint())
- .withPrivateLinkServiceConnectionState(
- new PrivateLinkServiceConnectionState()
- .withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED)
- .withDescription("xj")
- .withActionsRequired("r"));
- model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class);
- Assertions
- .assertEquals(
- PrivateLinkServiceConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status());
- Assertions.assertEquals("xj", model.privateLinkServiceConnectionState().description());
- Assertions.assertEquals("r", model.privateLinkServiceConnectionState().actionsRequired());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsDeleteMockTests.java
deleted file mode 100644
index 5bdc17b521b9..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsDeleteMockTests.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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.PrivateEndpointConnection;
-import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionStatus;
-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 PrivateEndpointConnectionsDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"privateEndpoint\":{\"id\":\"ubkwdle\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"d\",\"actionsRequired\":\"tujbazpju\"}},\"id\":\"hminyflnorwmduv\",\"name\":\"pklvxw\",\"type\":\"ygdxpgpqchis\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PrivateEndpointConnection response =
- manager
- .privateEndpointConnections()
- .delete("kahzo", "ajjziuxxpshne", "kulfg", com.azure.core.util.Context.NONE);
-
- Assertions
- .assertEquals(
- PrivateLinkServiceConnectionStatus.PENDING,
- response.properties().privateLinkServiceConnectionState().status());
- Assertions.assertEquals("d", response.properties().privateLinkServiceConnectionState().description());
- Assertions
- .assertEquals("tujbazpju", response.properties().privateLinkServiceConnectionState().actionsRequired());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java
deleted file mode 100644
index 850119b6c093..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,78 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.PrivateEndpointConnection;
-import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionStatus;
-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 PrivateEndpointConnectionsGetWithResponseMockTests {
- @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\":{\"privateEndpoint\":{\"id\":\"tbaxk\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ywrckp\",\"actionsRequired\":\"lyhpluodpvruud\"}},\"id\":\"gzibthostgktstv\",\"name\":\"xeclzedqbcvhzlhp\",\"type\":\"odqkdlwwqfb\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PrivateEndpointConnection response =
- manager
- .privateEndpointConnections()
- .getWithResponse("sdshmkxmaehvb", "xu", "iplt", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions
- .assertEquals(
- PrivateLinkServiceConnectionStatus.PENDING,
- response.properties().privateLinkServiceConnectionState().status());
- Assertions.assertEquals("ywrckp", response.properties().privateLinkServiceConnectionState().description());
- Assertions
- .assertEquals(
- "lyhpluodpvruud", response.properties().privateLinkServiceConnectionState().actionsRequired());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsListWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsListWithResponseMockTests.java
deleted file mode 100644
index 750eac435338..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsListWithResponseMockTests.java
+++ /dev/null
@@ -1,68 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.PrivateEndpointConnection;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.List;
-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 PrivateEndpointConnectionsListWithResponseMockTests {
- @Test
- public void testListWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "[{\"properties\":{},\"id\":\"qgaifmviklbydv\",\"name\":\"hbejdznxcvdsrhnj\",\"type\":\"volvtn\"},{\"properties\":{},\"id\":\"qfzgemjdftul\",\"name\":\"ltducea\",\"type\":\"tmczuomejwcwwqi\"},{\"properties\":{},\"id\":\"nssxmojmsvpk\",\"name\":\"prvkwcfzqljyxgtc\",\"type\":\"heyd\"}]";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- List response =
- manager
- .privateEndpointConnections()
- .listWithResponse("fmznba", "qphchqnrnrpxehuw", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsUpdateMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsUpdateMockTests.java
deleted file mode 100644
index 883a23e14bb3..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsUpdateMockTests.java
+++ /dev/null
@@ -1,93 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.fluent.models.PrivateEndpointConnectionInner;
-import com.azure.resourcemanager.iothub.models.PrivateEndpoint;
-import com.azure.resourcemanager.iothub.models.PrivateEndpointConnection;
-import com.azure.resourcemanager.iothub.models.PrivateEndpointConnectionProperties;
-import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionState;
-import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionStatus;
-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 PrivateEndpointConnectionsUpdateMockTests {
- @Test
- public void testUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"privateEndpoint\":{\"id\":\"quwrbehwag\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"buffkmrqemvvhm\",\"actionsRequired\":\"drjf\"}},\"id\":\"tac\",\"name\":\"ebjvewzcjzn\",\"type\":\"wcpmguaadraufac\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PrivateEndpointConnection response =
- manager
- .privateEndpointConnections()
- .update(
- "mlkxtrqjfs",
- "lmbtxhwgfwsrt",
- "wcoezbrhub",
- new PrivateEndpointConnectionInner()
- .withProperties(
- new PrivateEndpointConnectionProperties()
- .withPrivateEndpoint(new PrivateEndpoint())
- .withPrivateLinkServiceConnectionState(
- new PrivateLinkServiceConnectionState()
- .withStatus(PrivateLinkServiceConnectionStatus.APPROVED)
- .withDescription("qfqjbvleorfm")
- .withActionsRequired("iqtqzfavyvnq"))),
- com.azure.core.util.Context.NONE);
-
- Assertions
- .assertEquals(
- PrivateLinkServiceConnectionStatus.REJECTED,
- response.properties().privateLinkServiceConnectionState().status());
- Assertions
- .assertEquals("buffkmrqemvvhm", response.properties().privateLinkServiceConnectionState().description());
- Assertions.assertEquals("drjf", response.properties().privateLinkServiceConnectionState().actionsRequired());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointTests.java
deleted file mode 100644
index 13b1418d88a8..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointTests.java
+++ /dev/null
@@ -1,21 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.PrivateEndpoint;
-
-public final class PrivateEndpointTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateEndpoint model = BinaryData.fromString("{\"id\":\"vcputegj\"}").toObject(PrivateEndpoint.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateEndpoint model = new PrivateEndpoint();
- model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesInnerTests.java
deleted file mode 100644
index 4a8acf0aec6a..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesInnerTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.GroupIdInformationInner;
-import com.azure.resourcemanager.iothub.fluent.models.PrivateLinkResourcesInner;
-import com.azure.resourcemanager.iothub.models.GroupIdInformationProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class PrivateLinkResourcesInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateLinkResourcesInner model =
- BinaryData
- .fromString(
- "{\"value\":[{\"id\":\"kuwhh\",\"name\":\"ykojoxafnndlpic\",\"type\":\"o\",\"properties\":{\"groupId\":\"kcdyhbpk\",\"requiredMembers\":[],\"requiredZoneNames\":[]}},{\"id\":\"reqnovvqfov\",\"name\":\"xywsuws\",\"type\":\"s\",\"properties\":{\"groupId\":\"sytgadgvraea\",\"requiredMembers\":[],\"requiredZoneNames\":[]}}]}")
- .toObject(PrivateLinkResourcesInner.class);
- Assertions.assertEquals("kcdyhbpk", model.value().get(0).properties().groupId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateLinkResourcesInner model =
- new PrivateLinkResourcesInner()
- .withValue(
- Arrays
- .asList(
- new GroupIdInformationInner()
- .withProperties(
- new GroupIdInformationProperties()
- .withGroupId("kcdyhbpk")
- .withRequiredMembers(Arrays.asList())
- .withRequiredZoneNames(Arrays.asList())),
- new GroupIdInformationInner()
- .withProperties(
- new GroupIdInformationProperties()
- .withGroupId("sytgadgvraea")
- .withRequiredMembers(Arrays.asList())
- .withRequiredZoneNames(Arrays.asList()))));
- model = BinaryData.fromObject(model).toObject(PrivateLinkResourcesInner.class);
- Assertions.assertEquals("kcdyhbpk", model.value().get(0).properties().groupId());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationsGetWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationsGetWithResponseMockTests.java
deleted file mode 100644
index 92f619ee0810..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationsGetWithResponseMockTests.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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.GroupIdInformation;
-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 PrivateLinkResourcesOperationsGetWithResponseMockTests {
- @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 =
- "{\"id\":\"sutrgjup\",\"name\":\"utpwoqhihejqgw\",\"type\":\"nfqn\",\"properties\":{\"groupId\":\"ypsxjvfoim\",\"requiredMembers\":[\"lirc\",\"zjxvydfcea\"],\"requiredZoneNames\":[\"hvygdyftumr\",\"wnawjslbiw\",\"ojgcyzt\"]}}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- GroupIdInformation response =
- manager
- .privateLinkResourcesOperations()
- .getWithResponse("amrsreuzv", "urisjnhnytxifqj", "gxmrhublwp", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("ypsxjvfoim", response.properties().groupId());
- Assertions.assertEquals("lirc", response.properties().requiredMembers().get(0));
- Assertions.assertEquals("hvygdyftumr", response.properties().requiredZoneNames().get(0));
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationsListWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationsListWithResponseMockTests.java
deleted file mode 100644
index 15f380902b0b..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationsListWithResponseMockTests.java
+++ /dev/null
@@ -1,67 +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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.PrivateLinkResources;
-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 PrivateLinkResourcesOperationsListWithResponseMockTests {
- @Test
- public void testListWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"id\":\"bkfezzxscyhwzdgi\",\"name\":\"jbzbomvzzbtdcq\",\"type\":\"niyujv\"},{\"id\":\"l\",\"name\":\"shfssnrbgyef\",\"type\":\"msgaoj\"},{\"id\":\"wncot\",\"name\":\"fhir\",\"type\":\"ymoxoftpipiwyczu\"},{\"id\":\"a\",\"name\":\"qjlihhyuspska\",\"type\":\"vlmfwdgzxulucv\"}]}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PrivateLinkResources response =
- manager
- .privateLinkResourcesOperations()
- .listWithResponse("gjmfxumvfcl", "yo", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkServiceConnectionStateTests.java
deleted file mode 100644
index 25c00e1d0d7b..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/PrivateLinkServiceConnectionStateTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionState;
-import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionStatus;
-import org.junit.jupiter.api.Assertions;
-
-public final class PrivateLinkServiceConnectionStateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateLinkServiceConnectionState model =
- BinaryData
- .fromString(
- "{\"status\":\"Disconnected\",\"description\":\"mfdatscmdvpj\",\"actionsRequired\":\"lsuuvmkjozkrwfnd\"}")
- .toObject(PrivateLinkServiceConnectionState.class);
- Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.status());
- Assertions.assertEquals("mfdatscmdvpj", model.description());
- Assertions.assertEquals("lsuuvmkjozkrwfnd", model.actionsRequired());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateLinkServiceConnectionState model =
- new PrivateLinkServiceConnectionState()
- .withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED)
- .withDescription("mfdatscmdvpj")
- .withActionsRequired("lsuuvmkjozkrwfnd");
- model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class);
- Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.status());
- Assertions.assertEquals("mfdatscmdvpj", model.description());
- Assertions.assertEquals("lsuuvmkjozkrwfnd", model.actionsRequired());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RegistryStatisticsInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RegistryStatisticsInnerTests.java
deleted file mode 100644
index 4c50c3f4fe7a..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RegistryStatisticsInnerTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.RegistryStatisticsInner;
-
-public final class RegistryStatisticsInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RegistryStatisticsInner model =
- BinaryData
- .fromString(
- "{\"totalDeviceCount\":8751195016646991326,\"enabledDeviceCount\":1457030135916183053,\"disabledDeviceCount\":6300383751543557162}")
- .toObject(RegistryStatisticsInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RegistryStatisticsInner model = new RegistryStatisticsInner();
- model = BinaryData.fromObject(model).toObject(RegistryStatisticsInner.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ResourceProviderCommonsGetSubscriptionQuotaWithResponseMockTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ResourceProviderCommonsGetSubscriptionQuotaWithResponseMockTests.java
deleted file mode 100644
index 72d210e21ceb..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ResourceProviderCommonsGetSubscriptionQuotaWithResponseMockTests.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.iothub.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.iothub.IotHubManager;
-import com.azure.resourcemanager.iothub.models.UserSubscriptionQuotaListResult;
-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 ResourceProviderCommonsGetSubscriptionQuotaWithResponseMockTests {
- @Test
- public void testGetSubscriptionQuotaWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"id\":\"lvrwxkvtkk\",\"type\":\"lqwjygvjayvblm\",\"unit\":\"k\",\"currentValue\":2100624724,\"limit\":919724990}],\"nextLink\":\"yhgsopbyrqufe\"}";
-
- 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);
- }));
-
- IotHubManager manager =
- IotHubManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- UserSubscriptionQuotaListResult response =
- manager
- .resourceProviderCommons()
- .getSubscriptionQuotaWithResponse(com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("lvrwxkvtkk", response.value().get(0).id());
- Assertions.assertEquals("lqwjygvjayvblm", response.value().get(0).type());
- Assertions.assertEquals("k", response.value().get(0).unit());
- Assertions.assertEquals(2100624724, response.value().get(0).currentValue());
- Assertions.assertEquals(919724990, response.value().get(0).limit());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RootCertificatePropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RootCertificatePropertiesTests.java
deleted file mode 100644
index f448465f5771..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RootCertificatePropertiesTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.RootCertificateProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class RootCertificatePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RootCertificateProperties model =
- BinaryData
- .fromString("{\"enableRootCertificateV2\":false,\"lastUpdatedTimeUtc\":\"2021-01-10T16:47:02Z\"}")
- .toObject(RootCertificateProperties.class);
- Assertions.assertEquals(false, model.enableRootCertificateV2());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RootCertificateProperties model = new RootCertificateProperties().withEnableRootCertificateV2(false);
- model = BinaryData.fromObject(model).toObject(RootCertificateProperties.class);
- Assertions.assertEquals(false, model.enableRootCertificateV2());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RouteCompilationErrorTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RouteCompilationErrorTests.java
deleted file mode 100644
index b46be8b5e637..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RouteCompilationErrorTests.java
+++ /dev/null
@@ -1,48 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.RouteCompilationError;
-import com.azure.resourcemanager.iothub.models.RouteErrorPosition;
-import com.azure.resourcemanager.iothub.models.RouteErrorRange;
-import com.azure.resourcemanager.iothub.models.RouteErrorSeverity;
-import org.junit.jupiter.api.Assertions;
-
-public final class RouteCompilationErrorTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RouteCompilationError model =
- BinaryData
- .fromString(
- "{\"message\":\"dsjnka\",\"severity\":\"warning\",\"location\":{\"start\":{\"line\":600848345,\"column\":1914741160},\"end\":{\"line\":1975902978,\"column\":2043531661}}}")
- .toObject(RouteCompilationError.class);
- Assertions.assertEquals("dsjnka", model.message());
- Assertions.assertEquals(RouteErrorSeverity.WARNING, model.severity());
- Assertions.assertEquals(600848345, model.location().start().line());
- Assertions.assertEquals(1914741160, model.location().start().column());
- Assertions.assertEquals(1975902978, model.location().end().line());
- Assertions.assertEquals(2043531661, model.location().end().column());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RouteCompilationError model =
- new RouteCompilationError()
- .withMessage("dsjnka")
- .withSeverity(RouteErrorSeverity.WARNING)
- .withLocation(
- new RouteErrorRange()
- .withStart(new RouteErrorPosition().withLine(600848345).withColumn(1914741160))
- .withEnd(new RouteErrorPosition().withLine(1975902978).withColumn(2043531661)));
- model = BinaryData.fromObject(model).toObject(RouteCompilationError.class);
- Assertions.assertEquals("dsjnka", model.message());
- Assertions.assertEquals(RouteErrorSeverity.WARNING, model.severity());
- Assertions.assertEquals(600848345, model.location().start().line());
- Assertions.assertEquals(1914741160, model.location().start().column());
- Assertions.assertEquals(1975902978, model.location().end().line());
- Assertions.assertEquals(2043531661, model.location().end().column());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RouteErrorPositionTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RouteErrorPositionTests.java
deleted file mode 100644
index d88ccda0380d..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RouteErrorPositionTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.RouteErrorPosition;
-import org.junit.jupiter.api.Assertions;
-
-public final class RouteErrorPositionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RouteErrorPosition model =
- BinaryData.fromString("{\"line\":875285248,\"column\":1367629772}").toObject(RouteErrorPosition.class);
- Assertions.assertEquals(875285248, model.line());
- Assertions.assertEquals(1367629772, model.column());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RouteErrorPosition model = new RouteErrorPosition().withLine(875285248).withColumn(1367629772);
- model = BinaryData.fromObject(model).toObject(RouteErrorPosition.class);
- Assertions.assertEquals(875285248, model.line());
- Assertions.assertEquals(1367629772, model.column());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RouteErrorRangeTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RouteErrorRangeTests.java
deleted file mode 100644
index ee095b5ca31b..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RouteErrorRangeTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.RouteErrorPosition;
-import com.azure.resourcemanager.iothub.models.RouteErrorRange;
-import org.junit.jupiter.api.Assertions;
-
-public final class RouteErrorRangeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RouteErrorRange model =
- BinaryData
- .fromString(
- "{\"start\":{\"line\":900444322,\"column\":1157139188},\"end\":{\"line\":2137392775,\"column\":1769895546}}")
- .toObject(RouteErrorRange.class);
- Assertions.assertEquals(900444322, model.start().line());
- Assertions.assertEquals(1157139188, model.start().column());
- Assertions.assertEquals(2137392775, model.end().line());
- Assertions.assertEquals(1769895546, model.end().column());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RouteErrorRange model =
- new RouteErrorRange()
- .withStart(new RouteErrorPosition().withLine(900444322).withColumn(1157139188))
- .withEnd(new RouteErrorPosition().withLine(2137392775).withColumn(1769895546));
- model = BinaryData.fromObject(model).toObject(RouteErrorRange.class);
- Assertions.assertEquals(900444322, model.start().line());
- Assertions.assertEquals(1157139188, model.start().column());
- Assertions.assertEquals(2137392775, model.end().line());
- Assertions.assertEquals(1769895546, model.end().column());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutePropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutePropertiesTests.java
deleted file mode 100644
index 68207e7e9d52..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutePropertiesTests.java
+++ /dev/null
@@ -1,44 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.RouteProperties;
-import com.azure.resourcemanager.iothub.models.RoutingSource;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class RoutePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RouteProperties model =
- BinaryData
- .fromString(
- "{\"name\":\"uzoqft\",\"source\":\"DeviceConnectionStateEvents\",\"condition\":\"zrnkcqvyxlwh\",\"endpointNames\":[\"sicohoqqnwvlry\",\"vwhheunmmqhgyx\",\"konocu\"],\"isEnabled\":true}")
- .toObject(RouteProperties.class);
- Assertions.assertEquals("uzoqft", model.name());
- Assertions.assertEquals(RoutingSource.DEVICE_CONNECTION_STATE_EVENTS, model.source());
- Assertions.assertEquals("zrnkcqvyxlwh", model.condition());
- Assertions.assertEquals("sicohoqqnwvlry", model.endpointNames().get(0));
- Assertions.assertEquals(true, model.isEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RouteProperties model =
- new RouteProperties()
- .withName("uzoqft")
- .withSource(RoutingSource.DEVICE_CONNECTION_STATE_EVENTS)
- .withCondition("zrnkcqvyxlwh")
- .withEndpointNames(Arrays.asList("sicohoqqnwvlry", "vwhheunmmqhgyx", "konocu"))
- .withIsEnabled(true);
- model = BinaryData.fromObject(model).toObject(RouteProperties.class);
- Assertions.assertEquals("uzoqft", model.name());
- Assertions.assertEquals(RoutingSource.DEVICE_CONNECTION_STATE_EVENTS, model.source());
- Assertions.assertEquals("zrnkcqvyxlwh", model.condition());
- Assertions.assertEquals("sicohoqqnwvlry", model.endpointNames().get(0));
- Assertions.assertEquals(true, model.isEnabled());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingEventHubPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingEventHubPropertiesTests.java
deleted file mode 100644
index 3fc1631b02bc..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingEventHubPropertiesTests.java
+++ /dev/null
@@ -1,56 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.AuthenticationType;
-import com.azure.resourcemanager.iothub.models.ManagedIdentity;
-import com.azure.resourcemanager.iothub.models.RoutingEventHubProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class RoutingEventHubPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RoutingEventHubProperties model =
- BinaryData
- .fromString(
- "{\"id\":\"mjmvxieduugidyjr\",\"connectionString\":\"byao\",\"endpointUri\":\"e\",\"entityPath\":\"sonpclhocohs\",\"authenticationType\":\"keyBased\",\"identity\":{\"userAssignedIdentity\":\"eggzfb\"},\"name\":\"hfmvfaxkffe\",\"subscriptionId\":\"th\",\"resourceGroup\":\"m\"}")
- .toObject(RoutingEventHubProperties.class);
- Assertions.assertEquals("mjmvxieduugidyjr", model.id());
- Assertions.assertEquals("byao", model.connectionString());
- Assertions.assertEquals("e", model.endpointUri());
- Assertions.assertEquals("sonpclhocohs", model.entityPath());
- Assertions.assertEquals(AuthenticationType.KEY_BASED, model.authenticationType());
- Assertions.assertEquals("eggzfb", model.identity().userAssignedIdentity());
- Assertions.assertEquals("hfmvfaxkffe", model.name());
- Assertions.assertEquals("th", model.subscriptionId());
- Assertions.assertEquals("m", model.resourceGroup());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RoutingEventHubProperties model =
- new RoutingEventHubProperties()
- .withId("mjmvxieduugidyjr")
- .withConnectionString("byao")
- .withEndpointUri("e")
- .withEntityPath("sonpclhocohs")
- .withAuthenticationType(AuthenticationType.KEY_BASED)
- .withIdentity(new ManagedIdentity().withUserAssignedIdentity("eggzfb"))
- .withName("hfmvfaxkffe")
- .withSubscriptionId("th")
- .withResourceGroup("m");
- model = BinaryData.fromObject(model).toObject(RoutingEventHubProperties.class);
- Assertions.assertEquals("mjmvxieduugidyjr", model.id());
- Assertions.assertEquals("byao", model.connectionString());
- Assertions.assertEquals("e", model.endpointUri());
- Assertions.assertEquals("sonpclhocohs", model.entityPath());
- Assertions.assertEquals(AuthenticationType.KEY_BASED, model.authenticationType());
- Assertions.assertEquals("eggzfb", model.identity().userAssignedIdentity());
- Assertions.assertEquals("hfmvfaxkffe", model.name());
- Assertions.assertEquals("th", model.subscriptionId());
- Assertions.assertEquals("m", model.resourceGroup());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingMessageTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingMessageTests.java
deleted file mode 100644
index ab3f5e9b4ecc..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingMessageTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.RoutingMessage;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class RoutingMessageTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RoutingMessage model =
- BinaryData
- .fromString(
- "{\"body\":\"xoblytkbl\",\"appProperties\":{\"rn\":\"wwwfbkr\",\"bfovasrruvwbhsq\":\"vshqjohxcr\",\"gjb\":\"sub\",\"rfbjf\":\"rxbpyb\"},\"systemProperties\":{\"zbexilzznfqqnvw\":\"ssotftpv\"}}")
- .toObject(RoutingMessage.class);
- Assertions.assertEquals("xoblytkbl", model.body());
- Assertions.assertEquals("wwwfbkr", model.appProperties().get("rn"));
- Assertions.assertEquals("ssotftpv", model.systemProperties().get("zbexilzznfqqnvw"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RoutingMessage model =
- new RoutingMessage()
- .withBody("xoblytkbl")
- .withAppProperties(
- mapOf("rn", "wwwfbkr", "bfovasrruvwbhsq", "vshqjohxcr", "gjb", "sub", "rfbjf", "rxbpyb"))
- .withSystemProperties(mapOf("zbexilzznfqqnvw", "ssotftpv"));
- model = BinaryData.fromObject(model).toObject(RoutingMessage.class);
- Assertions.assertEquals("xoblytkbl", model.body());
- Assertions.assertEquals("wwwfbkr", model.appProperties().get("rn"));
- Assertions.assertEquals("ssotftpv", model.systemProperties().get("zbexilzznfqqnvw"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingServiceBusQueueEndpointPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingServiceBusQueueEndpointPropertiesTests.java
deleted file mode 100644
index c992353afbc0..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingServiceBusQueueEndpointPropertiesTests.java
+++ /dev/null
@@ -1,56 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.AuthenticationType;
-import com.azure.resourcemanager.iothub.models.ManagedIdentity;
-import com.azure.resourcemanager.iothub.models.RoutingServiceBusQueueEndpointProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class RoutingServiceBusQueueEndpointPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RoutingServiceBusQueueEndpointProperties model =
- BinaryData
- .fromString(
- "{\"id\":\"aodsfcpkv\",\"connectionString\":\"dpuozmyz\",\"endpointUri\":\"agfuaxbezyiu\",\"entityPath\":\"ktwh\",\"authenticationType\":\"keyBased\",\"identity\":{\"userAssignedIdentity\":\"ywqsmbsurexim\"},\"name\":\"ryocfsfksymdd\",\"subscriptionId\":\"tki\",\"resourceGroup\":\"xhqyudxorrqnb\"}")
- .toObject(RoutingServiceBusQueueEndpointProperties.class);
- Assertions.assertEquals("aodsfcpkv", model.id());
- Assertions.assertEquals("dpuozmyz", model.connectionString());
- Assertions.assertEquals("agfuaxbezyiu", model.endpointUri());
- Assertions.assertEquals("ktwh", model.entityPath());
- Assertions.assertEquals(AuthenticationType.KEY_BASED, model.authenticationType());
- Assertions.assertEquals("ywqsmbsurexim", model.identity().userAssignedIdentity());
- Assertions.assertEquals("ryocfsfksymdd", model.name());
- Assertions.assertEquals("tki", model.subscriptionId());
- Assertions.assertEquals("xhqyudxorrqnb", model.resourceGroup());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RoutingServiceBusQueueEndpointProperties model =
- new RoutingServiceBusQueueEndpointProperties()
- .withId("aodsfcpkv")
- .withConnectionString("dpuozmyz")
- .withEndpointUri("agfuaxbezyiu")
- .withEntityPath("ktwh")
- .withAuthenticationType(AuthenticationType.KEY_BASED)
- .withIdentity(new ManagedIdentity().withUserAssignedIdentity("ywqsmbsurexim"))
- .withName("ryocfsfksymdd")
- .withSubscriptionId("tki")
- .withResourceGroup("xhqyudxorrqnb");
- model = BinaryData.fromObject(model).toObject(RoutingServiceBusQueueEndpointProperties.class);
- Assertions.assertEquals("aodsfcpkv", model.id());
- Assertions.assertEquals("dpuozmyz", model.connectionString());
- Assertions.assertEquals("agfuaxbezyiu", model.endpointUri());
- Assertions.assertEquals("ktwh", model.entityPath());
- Assertions.assertEquals(AuthenticationType.KEY_BASED, model.authenticationType());
- Assertions.assertEquals("ywqsmbsurexim", model.identity().userAssignedIdentity());
- Assertions.assertEquals("ryocfsfksymdd", model.name());
- Assertions.assertEquals("tki", model.subscriptionId());
- Assertions.assertEquals("xhqyudxorrqnb", model.resourceGroup());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingServiceBusTopicEndpointPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingServiceBusTopicEndpointPropertiesTests.java
deleted file mode 100644
index bc7d4bd4a8e9..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingServiceBusTopicEndpointPropertiesTests.java
+++ /dev/null
@@ -1,56 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.AuthenticationType;
-import com.azure.resourcemanager.iothub.models.ManagedIdentity;
-import com.azure.resourcemanager.iothub.models.RoutingServiceBusTopicEndpointProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class RoutingServiceBusTopicEndpointPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RoutingServiceBusTopicEndpointProperties model =
- BinaryData
- .fromString(
- "{\"id\":\"kdvjsll\",\"connectionString\":\"vvdfwatkpnpul\",\"endpointUri\":\"xbczwtruwiqz\",\"entityPath\":\"j\",\"authenticationType\":\"keyBased\",\"identity\":{\"userAssignedIdentity\":\"yokacspkw\"},\"name\":\"hzdobpxjmflbvvnc\",\"subscriptionId\":\"kcciwwzjuqkhr\",\"resourceGroup\":\"jiwkuofoskghsau\"}")
- .toObject(RoutingServiceBusTopicEndpointProperties.class);
- Assertions.assertEquals("kdvjsll", model.id());
- Assertions.assertEquals("vvdfwatkpnpul", model.connectionString());
- Assertions.assertEquals("xbczwtruwiqz", model.endpointUri());
- Assertions.assertEquals("j", model.entityPath());
- Assertions.assertEquals(AuthenticationType.KEY_BASED, model.authenticationType());
- Assertions.assertEquals("yokacspkw", model.identity().userAssignedIdentity());
- Assertions.assertEquals("hzdobpxjmflbvvnc", model.name());
- Assertions.assertEquals("kcciwwzjuqkhr", model.subscriptionId());
- Assertions.assertEquals("jiwkuofoskghsau", model.resourceGroup());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RoutingServiceBusTopicEndpointProperties model =
- new RoutingServiceBusTopicEndpointProperties()
- .withId("kdvjsll")
- .withConnectionString("vvdfwatkpnpul")
- .withEndpointUri("xbczwtruwiqz")
- .withEntityPath("j")
- .withAuthenticationType(AuthenticationType.KEY_BASED)
- .withIdentity(new ManagedIdentity().withUserAssignedIdentity("yokacspkw"))
- .withName("hzdobpxjmflbvvnc")
- .withSubscriptionId("kcciwwzjuqkhr")
- .withResourceGroup("jiwkuofoskghsau");
- model = BinaryData.fromObject(model).toObject(RoutingServiceBusTopicEndpointProperties.class);
- Assertions.assertEquals("kdvjsll", model.id());
- Assertions.assertEquals("vvdfwatkpnpul", model.connectionString());
- Assertions.assertEquals("xbczwtruwiqz", model.endpointUri());
- Assertions.assertEquals("j", model.entityPath());
- Assertions.assertEquals(AuthenticationType.KEY_BASED, model.authenticationType());
- Assertions.assertEquals("yokacspkw", model.identity().userAssignedIdentity());
- Assertions.assertEquals("hzdobpxjmflbvvnc", model.name());
- Assertions.assertEquals("kcciwwzjuqkhr", model.subscriptionId());
- Assertions.assertEquals("jiwkuofoskghsau", model.resourceGroup());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingStorageContainerPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingStorageContainerPropertiesTests.java
deleted file mode 100644
index 683a2d945386..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingStorageContainerPropertiesTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.AuthenticationType;
-import com.azure.resourcemanager.iothub.models.ManagedIdentity;
-import com.azure.resourcemanager.iothub.models.RoutingStorageContainerProperties;
-import com.azure.resourcemanager.iothub.models.RoutingStorageContainerPropertiesEncoding;
-import org.junit.jupiter.api.Assertions;
-
-public final class RoutingStorageContainerPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RoutingStorageContainerProperties model =
- BinaryData
- .fromString(
- "{\"id\":\"yvshxmz\",\"connectionString\":\"bzoggigrx\",\"endpointUri\":\"ur\",\"authenticationType\":\"identityBased\",\"identity\":{\"userAssignedIdentity\":\"nspydptkoenkoukn\"},\"name\":\"udwtiukbl\",\"subscriptionId\":\"gkpocipazyxoe\",\"resourceGroup\":\"kgjn\",\"containerName\":\"iucgygevqzn\",\"fileNameFormat\":\"pmr\",\"batchFrequencyInSeconds\":129742346,\"maxChunkSizeInBytes\":173387394,\"encoding\":\"Avro\"}")
- .toObject(RoutingStorageContainerProperties.class);
- Assertions.assertEquals("yvshxmz", model.id());
- Assertions.assertEquals("bzoggigrx", model.connectionString());
- Assertions.assertEquals("ur", model.endpointUri());
- Assertions.assertEquals(AuthenticationType.IDENTITY_BASED, model.authenticationType());
- Assertions.assertEquals("nspydptkoenkoukn", model.identity().userAssignedIdentity());
- Assertions.assertEquals("udwtiukbl", model.name());
- Assertions.assertEquals("gkpocipazyxoe", model.subscriptionId());
- Assertions.assertEquals("kgjn", model.resourceGroup());
- Assertions.assertEquals("iucgygevqzn", model.containerName());
- Assertions.assertEquals("pmr", model.fileNameFormat());
- Assertions.assertEquals(129742346, model.batchFrequencyInSeconds());
- Assertions.assertEquals(173387394, model.maxChunkSizeInBytes());
- Assertions.assertEquals(RoutingStorageContainerPropertiesEncoding.AVRO, model.encoding());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RoutingStorageContainerProperties model =
- new RoutingStorageContainerProperties()
- .withId("yvshxmz")
- .withConnectionString("bzoggigrx")
- .withEndpointUri("ur")
- .withAuthenticationType(AuthenticationType.IDENTITY_BASED)
- .withIdentity(new ManagedIdentity().withUserAssignedIdentity("nspydptkoenkoukn"))
- .withName("udwtiukbl")
- .withSubscriptionId("gkpocipazyxoe")
- .withResourceGroup("kgjn")
- .withContainerName("iucgygevqzn")
- .withFileNameFormat("pmr")
- .withBatchFrequencyInSeconds(129742346)
- .withMaxChunkSizeInBytes(173387394)
- .withEncoding(RoutingStorageContainerPropertiesEncoding.AVRO);
- model = BinaryData.fromObject(model).toObject(RoutingStorageContainerProperties.class);
- Assertions.assertEquals("yvshxmz", model.id());
- Assertions.assertEquals("bzoggigrx", model.connectionString());
- Assertions.assertEquals("ur", model.endpointUri());
- Assertions.assertEquals(AuthenticationType.IDENTITY_BASED, model.authenticationType());
- Assertions.assertEquals("nspydptkoenkoukn", model.identity().userAssignedIdentity());
- Assertions.assertEquals("udwtiukbl", model.name());
- Assertions.assertEquals("gkpocipazyxoe", model.subscriptionId());
- Assertions.assertEquals("kgjn", model.resourceGroup());
- Assertions.assertEquals("iucgygevqzn", model.containerName());
- Assertions.assertEquals("pmr", model.fileNameFormat());
- Assertions.assertEquals(129742346, model.batchFrequencyInSeconds());
- Assertions.assertEquals(173387394, model.maxChunkSizeInBytes());
- Assertions.assertEquals(RoutingStorageContainerPropertiesEncoding.AVRO, model.encoding());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingTwinPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingTwinPropertiesTests.java
deleted file mode 100644
index 037ecc960f20..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingTwinPropertiesTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.RoutingTwinProperties;
-
-public final class RoutingTwinPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RoutingTwinProperties model =
- BinaryData
- .fromString("{\"desired\":\"dataewgdrjervn\",\"reported\":\"datanqpeh\"}")
- .toObject(RoutingTwinProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RoutingTwinProperties model =
- new RoutingTwinProperties().withDesired("dataewgdrjervn").withReported("datanqpeh");
- model = BinaryData.fromObject(model).toObject(RoutingTwinProperties.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingTwinTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingTwinTests.java
deleted file mode 100644
index 2798b1fa76ce..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/RoutingTwinTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.RoutingTwin;
-import com.azure.resourcemanager.iothub.models.RoutingTwinProperties;
-
-public final class RoutingTwinTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RoutingTwin model =
- BinaryData
- .fromString(
- "{\"tags\":\"dataqtaruoujmkcjhwq\",\"properties\":{\"desired\":\"datar\",\"reported\":\"datan\"}}")
- .toObject(RoutingTwin.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RoutingTwin model =
- new RoutingTwin()
- .withTags("dataqtaruoujmkcjhwq")
- .withProperties(new RoutingTwinProperties().withDesired("datar").withReported("datan"));
- model = BinaryData.fromObject(model).toObject(RoutingTwin.class);
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/StorageEndpointPropertiesTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/StorageEndpointPropertiesTests.java
deleted file mode 100644
index 9d9c0339af2f..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/StorageEndpointPropertiesTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.AuthenticationType;
-import com.azure.resourcemanager.iothub.models.ManagedIdentity;
-import com.azure.resourcemanager.iothub.models.StorageEndpointProperties;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class StorageEndpointPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- StorageEndpointProperties model =
- BinaryData
- .fromString(
- "{\"sasTtlAsIso8601\":\"PT227H21M53S\",\"connectionString\":\"hkaetcktvfc\",\"containerName\":\"vf\",\"authenticationType\":\"identityBased\",\"identity\":{\"userAssignedIdentity\":\"uctqhjfbe\"}}")
- .toObject(StorageEndpointProperties.class);
- Assertions.assertEquals(Duration.parse("PT227H21M53S"), model.sasTtlAsIso8601());
- Assertions.assertEquals("hkaetcktvfc", model.connectionString());
- Assertions.assertEquals("vf", model.containerName());
- Assertions.assertEquals(AuthenticationType.IDENTITY_BASED, model.authenticationType());
- Assertions.assertEquals("uctqhjfbe", model.identity().userAssignedIdentity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- StorageEndpointProperties model =
- new StorageEndpointProperties()
- .withSasTtlAsIso8601(Duration.parse("PT227H21M53S"))
- .withConnectionString("hkaetcktvfc")
- .withContainerName("vf")
- .withAuthenticationType(AuthenticationType.IDENTITY_BASED)
- .withIdentity(new ManagedIdentity().withUserAssignedIdentity("uctqhjfbe"));
- model = BinaryData.fromObject(model).toObject(StorageEndpointProperties.class);
- Assertions.assertEquals(Duration.parse("PT227H21M53S"), model.sasTtlAsIso8601());
- Assertions.assertEquals("hkaetcktvfc", model.connectionString());
- Assertions.assertEquals("vf", model.containerName());
- Assertions.assertEquals(AuthenticationType.IDENTITY_BASED, model.authenticationType());
- Assertions.assertEquals("uctqhjfbe", model.identity().userAssignedIdentity());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TagsResourceTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TagsResourceTests.java
deleted file mode 100644
index f5b21cb02db7..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TagsResourceTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.TagsResource;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class TagsResourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TagsResource model =
- BinaryData
- .fromString(
- "{\"tags\":{\"nyyazttbtwwrqpue\":\"ucoc\",\"xibxujwbhqwalm\":\"ckzywbiexzfeyue\",\"ux\":\"zyoxaepdkzjan\",\"zt\":\"hdwbavxbniwdjs\"}}")
- .toObject(TagsResource.class);
- Assertions.assertEquals("ucoc", model.tags().get("nyyazttbtwwrqpue"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TagsResource model =
- new TagsResource()
- .withTags(
- mapOf(
- "nyyazttbtwwrqpue",
- "ucoc",
- "xibxujwbhqwalm",
- "ckzywbiexzfeyue",
- "ux",
- "zyoxaepdkzjan",
- "zt",
- "hdwbavxbniwdjs"));
- model = BinaryData.fromObject(model).toObject(TagsResource.class);
- Assertions.assertEquals("ucoc", model.tags().get("nyyazttbtwwrqpue"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestAllRoutesInputTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestAllRoutesInputTests.java
deleted file mode 100644
index ff56c98199e0..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestAllRoutesInputTests.java
+++ /dev/null
@@ -1,66 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.RoutingMessage;
-import com.azure.resourcemanager.iothub.models.RoutingSource;
-import com.azure.resourcemanager.iothub.models.RoutingTwin;
-import com.azure.resourcemanager.iothub.models.RoutingTwinProperties;
-import com.azure.resourcemanager.iothub.models.TestAllRoutesInput;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class TestAllRoutesInputTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TestAllRoutesInput model =
- BinaryData
- .fromString(
- "{\"routingSource\":\"DigitalTwinChangeEvents\",\"message\":{\"body\":\"uaceopzfqrhhu\",\"appProperties\":{\"ahzxctobgbk\":\"ppcqeqxolz\",\"mgrcfbu\":\"moizpos\",\"mjh\":\"rmfqjhhkxbpvj\"},\"systemProperties\":{\"tswb\":\"yngudivk\"}},\"twin\":{\"tags\":\"datavszjfauvjfdxxi\",\"properties\":{\"desired\":\"datavtcqaqtdo\",\"reported\":\"datacbxvwvxyslqbh\"}}}")
- .toObject(TestAllRoutesInput.class);
- Assertions.assertEquals(RoutingSource.DIGITAL_TWIN_CHANGE_EVENTS, model.routingSource());
- Assertions.assertEquals("uaceopzfqrhhu", model.message().body());
- Assertions.assertEquals("ppcqeqxolz", model.message().appProperties().get("ahzxctobgbk"));
- Assertions.assertEquals("yngudivk", model.message().systemProperties().get("tswb"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TestAllRoutesInput model =
- new TestAllRoutesInput()
- .withRoutingSource(RoutingSource.DIGITAL_TWIN_CHANGE_EVENTS)
- .withMessage(
- new RoutingMessage()
- .withBody("uaceopzfqrhhu")
- .withAppProperties(
- mapOf("ahzxctobgbk", "ppcqeqxolz", "mgrcfbu", "moizpos", "mjh", "rmfqjhhkxbpvj"))
- .withSystemProperties(mapOf("tswb", "yngudivk")))
- .withTwin(
- new RoutingTwin()
- .withTags("datavszjfauvjfdxxi")
- .withProperties(
- new RoutingTwinProperties()
- .withDesired("datavtcqaqtdo")
- .withReported("datacbxvwvxyslqbh")));
- model = BinaryData.fromObject(model).toObject(TestAllRoutesInput.class);
- Assertions.assertEquals(RoutingSource.DIGITAL_TWIN_CHANGE_EVENTS, model.routingSource());
- Assertions.assertEquals("uaceopzfqrhhu", model.message().body());
- Assertions.assertEquals("ppcqeqxolz", model.message().appProperties().get("ahzxctobgbk"));
- Assertions.assertEquals("yngudivk", model.message().systemProperties().get("tswb"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestAllRoutesResultInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestAllRoutesResultInnerTests.java
deleted file mode 100644
index c29252e0b7d8..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestAllRoutesResultInnerTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.TestAllRoutesResultInner;
-import com.azure.resourcemanager.iothub.models.MatchedRoute;
-import com.azure.resourcemanager.iothub.models.RouteProperties;
-import com.azure.resourcemanager.iothub.models.RoutingSource;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class TestAllRoutesResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TestAllRoutesResultInner model =
- BinaryData
- .fromString(
- "{\"routes\":[{\"properties\":{\"name\":\"ygmi\",\"source\":\"TwinChangeEvents\",\"condition\":\"nzdndslgna\",\"endpointNames\":[],\"isEnabled\":false}}]}")
- .toObject(TestAllRoutesResultInner.class);
- Assertions.assertEquals("ygmi", model.routes().get(0).properties().name());
- Assertions.assertEquals(RoutingSource.TWIN_CHANGE_EVENTS, model.routes().get(0).properties().source());
- Assertions.assertEquals("nzdndslgna", model.routes().get(0).properties().condition());
- Assertions.assertEquals(false, model.routes().get(0).properties().isEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TestAllRoutesResultInner model =
- new TestAllRoutesResultInner()
- .withRoutes(
- Arrays
- .asList(
- new MatchedRoute()
- .withProperties(
- new RouteProperties()
- .withName("ygmi")
- .withSource(RoutingSource.TWIN_CHANGE_EVENTS)
- .withCondition("nzdndslgna")
- .withEndpointNames(Arrays.asList())
- .withIsEnabled(false))));
- model = BinaryData.fromObject(model).toObject(TestAllRoutesResultInner.class);
- Assertions.assertEquals("ygmi", model.routes().get(0).properties().name());
- Assertions.assertEquals(RoutingSource.TWIN_CHANGE_EVENTS, model.routes().get(0).properties().source());
- Assertions.assertEquals("nzdndslgna", model.routes().get(0).properties().condition());
- Assertions.assertEquals(false, model.routes().get(0).properties().isEnabled());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestRouteInputTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestRouteInputTests.java
deleted file mode 100644
index 5703ac8c25dd..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestRouteInputTests.java
+++ /dev/null
@@ -1,99 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.RouteProperties;
-import com.azure.resourcemanager.iothub.models.RoutingMessage;
-import com.azure.resourcemanager.iothub.models.RoutingSource;
-import com.azure.resourcemanager.iothub.models.RoutingTwin;
-import com.azure.resourcemanager.iothub.models.RoutingTwinProperties;
-import com.azure.resourcemanager.iothub.models.TestRouteInput;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class TestRouteInputTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TestRouteInput model =
- BinaryData
- .fromString(
- "{\"message\":{\"body\":\"swiydmcwyhzdx\",\"appProperties\":{\"vdfznudaodvxzb\":\"dbzm\",\"dzu\":\"cblylpstdbhhxsr\",\"fiwjmygtdssls\":\"erscdntne\",\"emwabnet\":\"tmweriofzpyq\"},\"systemProperties\":{\"wubmwmbesldn\":\"szhedplvw\",\"lcxog\":\"wwtppj\",\"qqkdltfzxmhhvhgu\":\"okonzmnsikvmkqz\",\"xtibqdxbxwakbog\":\"eodkwobda\"}},\"route\":{\"name\":\"xndlkzgxhu\",\"source\":\"MqttBrokerMessages\",\"condition\":\"lbpodxunk\",\"endpointNames\":[\"bxmubyynt\",\"lrb\",\"tkoievseotgq\"],\"isEnabled\":false},\"twin\":{\"tags\":\"datamuwlauwzizxbm\",\"properties\":{\"desired\":\"datajefuzmuvpbttdumo\",\"reported\":\"datapxebmnzbt\"}}}")
- .toObject(TestRouteInput.class);
- Assertions.assertEquals("swiydmcwyhzdx", model.message().body());
- Assertions.assertEquals("dbzm", model.message().appProperties().get("vdfznudaodvxzb"));
- Assertions.assertEquals("szhedplvw", model.message().systemProperties().get("wubmwmbesldn"));
- Assertions.assertEquals("xndlkzgxhu", model.route().name());
- Assertions.assertEquals(RoutingSource.MQTT_BROKER_MESSAGES, model.route().source());
- Assertions.assertEquals("lbpodxunk", model.route().condition());
- Assertions.assertEquals("bxmubyynt", model.route().endpointNames().get(0));
- Assertions.assertEquals(false, model.route().isEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TestRouteInput model =
- new TestRouteInput()
- .withMessage(
- new RoutingMessage()
- .withBody("swiydmcwyhzdx")
- .withAppProperties(
- mapOf(
- "vdfznudaodvxzb",
- "dbzm",
- "dzu",
- "cblylpstdbhhxsr",
- "fiwjmygtdssls",
- "erscdntne",
- "emwabnet",
- "tmweriofzpyq"))
- .withSystemProperties(
- mapOf(
- "wubmwmbesldn",
- "szhedplvw",
- "lcxog",
- "wwtppj",
- "qqkdltfzxmhhvhgu",
- "okonzmnsikvmkqz",
- "xtibqdxbxwakbog",
- "eodkwobda")))
- .withRoute(
- new RouteProperties()
- .withName("xndlkzgxhu")
- .withSource(RoutingSource.MQTT_BROKER_MESSAGES)
- .withCondition("lbpodxunk")
- .withEndpointNames(Arrays.asList("bxmubyynt", "lrb", "tkoievseotgq"))
- .withIsEnabled(false))
- .withTwin(
- new RoutingTwin()
- .withTags("datamuwlauwzizxbm")
- .withProperties(
- new RoutingTwinProperties()
- .withDesired("datajefuzmuvpbttdumo")
- .withReported("datapxebmnzbt")));
- model = BinaryData.fromObject(model).toObject(TestRouteInput.class);
- Assertions.assertEquals("swiydmcwyhzdx", model.message().body());
- Assertions.assertEquals("dbzm", model.message().appProperties().get("vdfznudaodvxzb"));
- Assertions.assertEquals("szhedplvw", model.message().systemProperties().get("wubmwmbesldn"));
- Assertions.assertEquals("xndlkzgxhu", model.route().name());
- Assertions.assertEquals(RoutingSource.MQTT_BROKER_MESSAGES, model.route().source());
- Assertions.assertEquals("lbpodxunk", model.route().condition());
- Assertions.assertEquals("bxmubyynt", model.route().endpointNames().get(0));
- Assertions.assertEquals(false, model.route().isEnabled());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestRouteResultDetailsTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestRouteResultDetailsTests.java
deleted file mode 100644
index 5998c1664a5d..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestRouteResultDetailsTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.RouteCompilationError;
-import com.azure.resourcemanager.iothub.models.RouteErrorRange;
-import com.azure.resourcemanager.iothub.models.RouteErrorSeverity;
-import com.azure.resourcemanager.iothub.models.TestRouteResultDetails;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class TestRouteResultDetailsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TestRouteResultDetails model =
- BinaryData
- .fromString(
- "{\"compilationErrors\":[{\"message\":\"ikdowwquuvx\",\"severity\":\"error\",\"location\":{}},{\"message\":\"hhqzonosgg\",\"severity\":\"error\",\"location\":{}}]}")
- .toObject(TestRouteResultDetails.class);
- Assertions.assertEquals("ikdowwquuvx", model.compilationErrors().get(0).message());
- Assertions.assertEquals(RouteErrorSeverity.ERROR, model.compilationErrors().get(0).severity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TestRouteResultDetails model =
- new TestRouteResultDetails()
- .withCompilationErrors(
- Arrays
- .asList(
- new RouteCompilationError()
- .withMessage("ikdowwquuvx")
- .withSeverity(RouteErrorSeverity.ERROR)
- .withLocation(new RouteErrorRange()),
- new RouteCompilationError()
- .withMessage("hhqzonosgg")
- .withSeverity(RouteErrorSeverity.ERROR)
- .withLocation(new RouteErrorRange())));
- model = BinaryData.fromObject(model).toObject(TestRouteResultDetails.class);
- Assertions.assertEquals("ikdowwquuvx", model.compilationErrors().get(0).message());
- Assertions.assertEquals(RouteErrorSeverity.ERROR, model.compilationErrors().get(0).severity());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestRouteResultInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestRouteResultInnerTests.java
deleted file mode 100644
index cadef67fcf41..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/TestRouteResultInnerTests.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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.TestRouteResultInner;
-import com.azure.resourcemanager.iothub.models.RouteCompilationError;
-import com.azure.resourcemanager.iothub.models.RouteErrorSeverity;
-import com.azure.resourcemanager.iothub.models.TestResultStatus;
-import com.azure.resourcemanager.iothub.models.TestRouteResultDetails;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class TestRouteResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TestRouteResultInner model =
- BinaryData
- .fromString(
- "{\"result\":\"true\",\"details\":{\"compilationErrors\":[{\"message\":\"fgohdneuelfphs\",\"severity\":\"warning\"}]}}")
- .toObject(TestRouteResultInner.class);
- Assertions.assertEquals(TestResultStatus.TRUE, model.result());
- Assertions.assertEquals("fgohdneuelfphs", model.details().compilationErrors().get(0).message());
- Assertions.assertEquals(RouteErrorSeverity.WARNING, model.details().compilationErrors().get(0).severity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TestRouteResultInner model =
- new TestRouteResultInner()
- .withResult(TestResultStatus.TRUE)
- .withDetails(
- new TestRouteResultDetails()
- .withCompilationErrors(
- Arrays
- .asList(
- new RouteCompilationError()
- .withMessage("fgohdneuelfphs")
- .withSeverity(RouteErrorSeverity.WARNING))));
- model = BinaryData.fromObject(model).toObject(TestRouteResultInner.class);
- Assertions.assertEquals(TestResultStatus.TRUE, model.result());
- Assertions.assertEquals("fgohdneuelfphs", model.details().compilationErrors().get(0).message());
- Assertions.assertEquals(RouteErrorSeverity.WARNING, model.details().compilationErrors().get(0).severity());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/UserSubscriptionQuotaListResultInnerTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/UserSubscriptionQuotaListResultInnerTests.java
deleted file mode 100644
index 20e695035587..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/UserSubscriptionQuotaListResultInnerTests.java
+++ /dev/null
@@ -1,54 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.fluent.models.UserSubscriptionQuotaListResultInner;
-import com.azure.resourcemanager.iothub.models.Name;
-import com.azure.resourcemanager.iothub.models.UserSubscriptionQuota;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class UserSubscriptionQuotaListResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UserSubscriptionQuotaListResultInner model =
- BinaryData
- .fromString(
- "{\"value\":[{\"id\":\"n\",\"type\":\"xisxyawjoyaqcsl\",\"unit\":\"pkii\",\"currentValue\":983085062,\"limit\":1211885049,\"name\":{\"value\":\"eli\",\"localizedValue\":\"nr\"}}],\"nextLink\":\"folhbnxknal\"}")
- .toObject(UserSubscriptionQuotaListResultInner.class);
- Assertions.assertEquals("n", model.value().get(0).id());
- Assertions.assertEquals("xisxyawjoyaqcsl", model.value().get(0).type());
- Assertions.assertEquals("pkii", model.value().get(0).unit());
- Assertions.assertEquals(983085062, model.value().get(0).currentValue());
- Assertions.assertEquals(1211885049, model.value().get(0).limit());
- Assertions.assertEquals("eli", model.value().get(0).name().value());
- Assertions.assertEquals("nr", model.value().get(0).name().localizedValue());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UserSubscriptionQuotaListResultInner model =
- new UserSubscriptionQuotaListResultInner()
- .withValue(
- Arrays
- .asList(
- new UserSubscriptionQuota()
- .withId("n")
- .withType("xisxyawjoyaqcsl")
- .withUnit("pkii")
- .withCurrentValue(983085062)
- .withLimit(1211885049)
- .withName(new Name().withValue("eli").withLocalizedValue("nr"))));
- model = BinaryData.fromObject(model).toObject(UserSubscriptionQuotaListResultInner.class);
- Assertions.assertEquals("n", model.value().get(0).id());
- Assertions.assertEquals("xisxyawjoyaqcsl", model.value().get(0).type());
- Assertions.assertEquals("pkii", model.value().get(0).unit());
- Assertions.assertEquals(983085062, model.value().get(0).currentValue());
- Assertions.assertEquals(1211885049, model.value().get(0).limit());
- Assertions.assertEquals("eli", model.value().get(0).name().value());
- Assertions.assertEquals("nr", model.value().get(0).name().localizedValue());
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/UserSubscriptionQuotaTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/UserSubscriptionQuotaTests.java
deleted file mode 100644
index 3cdb18b12679..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/UserSubscriptionQuotaTests.java
+++ /dev/null
@@ -1,48 +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.iothub.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.iothub.models.Name;
-import com.azure.resourcemanager.iothub.models.UserSubscriptionQuota;
-import org.junit.jupiter.api.Assertions;
-
-public final class UserSubscriptionQuotaTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UserSubscriptionQuota model =
- BinaryData
- .fromString(
- "{\"id\":\"lp\",\"type\":\"gdtpnapnyiro\",\"unit\":\"hpigv\",\"currentValue\":2000011197,\"limit\":1573909011,\"name\":{\"value\":\"itxmedjvcslynqww\",\"localizedValue\":\"wzz\"}}")
- .toObject(UserSubscriptionQuota.class);
- Assertions.assertEquals("lp", model.id());
- Assertions.assertEquals("gdtpnapnyiro", model.type());
- Assertions.assertEquals("hpigv", model.unit());
- Assertions.assertEquals(2000011197, model.currentValue());
- Assertions.assertEquals(1573909011, model.limit());
- Assertions.assertEquals("itxmedjvcslynqww", model.name().value());
- Assertions.assertEquals("wzz", model.name().localizedValue());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UserSubscriptionQuota model =
- new UserSubscriptionQuota()
- .withId("lp")
- .withType("gdtpnapnyiro")
- .withUnit("hpigv")
- .withCurrentValue(2000011197)
- .withLimit(1573909011)
- .withName(new Name().withValue("itxmedjvcslynqww").withLocalizedValue("wzz"));
- model = BinaryData.fromObject(model).toObject(UserSubscriptionQuota.class);
- Assertions.assertEquals("lp", model.id());
- Assertions.assertEquals("gdtpnapnyiro", model.type());
- Assertions.assertEquals("hpigv", model.unit());
- Assertions.assertEquals(2000011197, model.currentValue());
- Assertions.assertEquals(1573909011, model.limit());
- Assertions.assertEquals("itxmedjvcslynqww", model.name().value());
- Assertions.assertEquals("wzz", model.name().localizedValue());
- }
-}