diff --git a/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md b/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
index 570f6db94a48f..a4313de918b2c 100644
--- a/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
+++ b/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 2.1.0-beta.1 (Unreleased)
+## 1.0.0-beta.1 (2023-07-06)
+
+- Azure Resource Manager Communication client library for Java. This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-preview-2023-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/communication/azure-resourcemanager-communication/README.md b/sdk/communication/azure-resourcemanager-communication/README.md
index 4537b54f28224..5d90d7fe8828a 100644
--- a/sdk/communication/azure-resourcemanager-communication/README.md
+++ b/sdk/communication/azure-resourcemanager-communication/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Communication client library for Java.
-This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-2023-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-preview-2023-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-communication
- 2.0.0
+ 2.1.0-beta.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/communication/azure-resourcemanager-communication/SAMPLE.md b/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
index bd3b4e56097e3..71eab66c2040e 100644
--- a/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
+++ b/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
@@ -52,7 +52,7 @@ import com.azure.resourcemanager.communication.models.NameAvailabilityParameters
/** Samples for CommunicationServices CheckNameAvailability. */
public final class CommunicationServicesCheckNameAvailabilitySamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/checkNameAvailabilityAvailable.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/checkNameAvailabilityAvailable.json
*/
/**
* Sample code: Check name availability available.
@@ -71,7 +71,7 @@ public final class CommunicationServicesCheckNameAvailabilitySamples {
}
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/checkNameAvailabilityUnavailable.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/checkNameAvailabilityUnavailable.json
*/
/**
* Sample code: Check name availability unavailable.
@@ -94,10 +94,13 @@ public final class CommunicationServicesCheckNameAvailabilitySamples {
### CommunicationServices_CreateOrUpdate
```java
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentityType;
+
/** Samples for CommunicationServices CreateOrUpdate. */
public final class CommunicationServicesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/createOrUpdate.json
*/
/**
* Sample code: Create or update resource.
@@ -113,6 +116,26 @@ public final class CommunicationServicesCreateOrUpdateSamples {
.withDataLocation("United States")
.create();
}
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/createOrUpdateWithSystemAssignedIdentity.json
+ */
+ /**
+ * Sample code: Create or update resource with managed identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void createOrUpdateResourceWithManagedIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager
+ .communicationServices()
+ .define("MyCommunicationResource")
+ .withRegion("Global")
+ .withExistingResourceGroup("MyResourceGroup")
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED))
+ .withDataLocation("United States")
+ .create();
+ }
}
```
@@ -122,7 +145,7 @@ public final class CommunicationServicesCreateOrUpdateSamples {
/** Samples for CommunicationServices Delete. */
public final class CommunicationServicesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/delete.json
*/
/**
* Sample code: Delete resource.
@@ -143,7 +166,7 @@ public final class CommunicationServicesDeleteSamples {
/** Samples for CommunicationServices GetByResourceGroup. */
public final class CommunicationServicesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/get.json
*/
/**
* Sample code: Get resource.
@@ -167,7 +190,7 @@ import com.azure.resourcemanager.communication.models.LinkNotificationHubParamet
/** Samples for CommunicationServices LinkNotificationHub. */
public final class CommunicationServicesLinkNotificationHubSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/linkNotificationHub.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/linkNotificationHub.json
*/
/**
* Sample code: Link notification hub.
@@ -195,7 +218,7 @@ public final class CommunicationServicesLinkNotificationHubSamples {
/** Samples for CommunicationServices List. */
public final class CommunicationServicesListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listBySubscription.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/listBySubscription.json
*/
/**
* Sample code: List by subscription.
@@ -214,7 +237,7 @@ public final class CommunicationServicesListSamples {
/** Samples for CommunicationServices ListByResourceGroup. */
public final class CommunicationServicesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listByResourceGroup.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/listByResourceGroup.json
*/
/**
* Sample code: List by resource group.
@@ -233,7 +256,7 @@ public final class CommunicationServicesListByResourceGroupSamples {
/** Samples for CommunicationServices ListKeys. */
public final class CommunicationServicesListKeysSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listKeys.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/listKeys.json
*/
/**
* Sample code: List keys.
@@ -257,7 +280,7 @@ import com.azure.resourcemanager.communication.models.RegenerateKeyParameters;
/** Samples for CommunicationServices RegenerateKey. */
public final class CommunicationServicesRegenerateKeySamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/regenerateKey.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/regenerateKey.json
*/
/**
* Sample code: Regenerate key.
@@ -280,13 +303,16 @@ public final class CommunicationServicesRegenerateKeySamples {
```java
import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.communication.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
/** Samples for CommunicationServices Update. */
public final class CommunicationServicesUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/update.json
*/
/**
* Sample code: Update resource.
@@ -303,6 +329,104 @@ public final class CommunicationServicesUpdateSamples {
resource.update().withTags(mapOf("newTag", "newVal")).apply();
}
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateWithUserAssignedIdentity.json
+ */
+ /**
+ * Sample code: Update resource to add a User Assigned managed identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToAddAUserAssignedManagedIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ManagedServiceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(mapOf("/user/assigned/resource/id", new UserAssignedIdentity())))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateWithSystemAssignedIdentity.json
+ */
+ /**
+ * Sample code: Update resource to add a System Assigned managed identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToAddASystemAssignedManagedIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateRemoveSystemIdentity.json
+ */
+ /**
+ * Sample code: Update resource to remove identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToRemoveIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateWithSystemAndUserIdentity.json
+ */
+ /**
+ * Sample code: Update resource to add System and User managed identities.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToAddSystemAndUserManagedIdentities(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
+ .withUserAssignedIdentities(mapOf("/user/assigned/resource/id", new UserAssignedIdentity())))
+ .apply();
+ }
+
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
@@ -325,7 +449,7 @@ import com.azure.resourcemanager.communication.models.VerificationType;
/** Samples for Domains CancelVerification. */
public final class DomainsCancelVerificationSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/cancelVerification.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/cancelVerification.json
*/
/**
* Sample code: Cancel verification.
@@ -353,7 +477,7 @@ import com.azure.resourcemanager.communication.models.DomainManagement;
/** Samples for Domains CreateOrUpdate. */
public final class DomainsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/createOrUpdate.json
*/
/**
* Sample code: Create or update Domains resource.
@@ -379,7 +503,7 @@ public final class DomainsCreateOrUpdateSamples {
/** Samples for Domains Delete. */
public final class DomainsDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/delete.json
*/
/**
* Sample code: Delete Domains resource.
@@ -400,7 +524,7 @@ public final class DomainsDeleteSamples {
/** Samples for Domains Get. */
public final class DomainsGetSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/get.json
*/
/**
* Sample code: Get Domains resource.
@@ -425,7 +549,7 @@ import com.azure.resourcemanager.communication.models.VerificationType;
/** Samples for Domains InitiateVerification. */
public final class DomainsInitiateVerificationSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/initiateVerification.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/initiateVerification.json
*/
/**
* Sample code: Initiate verification.
@@ -451,7 +575,7 @@ public final class DomainsInitiateVerificationSamples {
/** Samples for Domains ListByEmailServiceResource. */
public final class DomainsListByEmailServiceResourceSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/listByEmailService.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/listByEmailService.json
*/
/**
* Sample code: List Domains resources by EmailServiceName.
@@ -476,7 +600,7 @@ import com.azure.resourcemanager.communication.models.UserEngagementTracking;
/** Samples for Domains Update. */
public final class DomainsUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/update.json
*/
/**
* Sample code: Update Domains resource.
@@ -501,7 +625,7 @@ public final class DomainsUpdateSamples {
/** Samples for EmailServices CreateOrUpdate. */
public final class EmailServicesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/createOrUpdate.json
*/
/**
* Sample code: Create or update EmailService resource.
@@ -527,7 +651,7 @@ public final class EmailServicesCreateOrUpdateSamples {
/** Samples for EmailServices Delete. */
public final class EmailServicesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/delete.json
*/
/**
* Sample code: Delete EmailService resource.
@@ -547,7 +671,7 @@ public final class EmailServicesDeleteSamples {
/** Samples for EmailServices GetByResourceGroup. */
public final class EmailServicesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/get.json
*/
/**
* Sample code: Get EmailService resource.
@@ -569,7 +693,7 @@ public final class EmailServicesGetByResourceGroupSamples {
/** Samples for EmailServices List. */
public final class EmailServicesListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/listBySubscription.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/listBySubscription.json
*/
/**
* Sample code: List EmailService resources by subscription.
@@ -589,7 +713,7 @@ public final class EmailServicesListSamples {
/** Samples for EmailServices ListByResourceGroup. */
public final class EmailServicesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/listByResourceGroup.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/listByResourceGroup.json
*/
/**
* Sample code: List EmailService resources by resource group.
@@ -609,7 +733,7 @@ public final class EmailServicesListByResourceGroupSamples {
/** Samples for EmailServices ListVerifiedExchangeOnlineDomains. */
public final class EmailServicesListVerifiedExchangeOnlineDomainsSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/getVerifiedExchangeOnlineDomains.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/getVerifiedExchangeOnlineDomains.json
*/
/**
* Sample code: Get verified Exchange Online domains.
@@ -633,7 +757,7 @@ import java.util.Map;
/** Samples for EmailServices Update. */
public final class EmailServicesUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/update.json
*/
/**
* Sample code: Update EmailService resource.
@@ -670,7 +794,7 @@ public final class EmailServicesUpdateSamples {
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/operationsList.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/operationsList.json
*/
/**
* Sample code: Operations_List.
@@ -689,7 +813,7 @@ public final class OperationsListSamples {
/** Samples for SenderUsernames CreateOrUpdate. */
public final class SenderUsernamesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/createOrUpdate.json
*/
/**
* Sample code: Create or update SenderUsernames resource.
@@ -715,7 +839,7 @@ public final class SenderUsernamesCreateOrUpdateSamples {
/** Samples for SenderUsernames Delete. */
public final class SenderUsernamesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/delete.json
*/
/**
* Sample code: Delete SenderUsernames resource.
@@ -742,7 +866,7 @@ public final class SenderUsernamesDeleteSamples {
/** Samples for SenderUsernames Get. */
public final class SenderUsernamesGetSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/get.json
*/
/**
* Sample code: Get SenderUsernames resource.
@@ -769,7 +893,7 @@ public final class SenderUsernamesGetSamples {
/** Samples for SenderUsernames ListByDomains. */
public final class SenderUsernamesListByDomainsSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/listByDomain.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/listByDomain.json
*/
/**
* Sample code: Get SenderUsernames resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/pom.xml b/sdk/communication/azure-resourcemanager-communication/pom.xml
index f5ab2b4871461..637aa8d38a4a5 100644
--- a/sdk/communication/azure-resourcemanager-communication/pom.xml
+++ b/sdk/communication/azure-resourcemanager-communication/pom.xml
@@ -18,7 +18,7 @@
jar
Microsoft Azure SDK for Communication Management
- This package contains Microsoft Azure SDK for Communication Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Communication Services. Package tag package-2023-03.
+ This package contains Microsoft Azure SDK for Communication Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Communication Services. Package tag package-preview-2023-04.
https://github.com/Azure/azure-sdk-for-java
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
index 4d58952e1db4a..83c6b5fc8ead1 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
@@ -219,7 +219,7 @@ public CommunicationManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.communication")
.append("/")
- .append("2.0.0");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java
index f303a26c9ddb6..14ffe2908d60d 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java
@@ -8,6 +8,7 @@
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.communication.models.CommunicationServicesProvisioningState;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
@@ -21,6 +22,12 @@ public final class CommunicationServiceResourceInner extends Resource {
@JsonProperty(value = "properties")
private CommunicationServiceProperties innerProperties;
+ /*
+ * Managed service identity (system assigned and/or user assigned identities)
+ */
+ @JsonProperty(value = "identity")
+ private ManagedServiceIdentity identity;
+
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@@ -40,6 +47,26 @@ private CommunicationServiceProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the identity property: Managed service identity (system assigned and/or user assigned identities).
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed service identity (system assigned and/or user assigned identities).
+ *
+ * @param identity the identity value to set.
+ * @return the CommunicationServiceResourceInner object itself.
+ */
+ public CommunicationServiceResourceInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/**
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
@@ -164,5 +191,8 @@ public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
+ if (identity() != null) {
+ identity().validate();
+ }
}
}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
index d327e7da80114..57298f86a7838 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
@@ -194,7 +194,7 @@ public SenderUsernamesClient getSenderUsernames() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-03-31";
+ this.apiVersion = "2023-04-01-preview";
this.operations = new OperationsClientImpl(this);
this.communicationServices = new CommunicationServicesClientImpl(this);
this.domains = new DomainsClientImpl(this);
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java
index 393671ddd6a56..f59b6a0091b98 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java
@@ -15,6 +15,7 @@
import com.azure.resourcemanager.communication.models.CommunicationServicesProvisioningState;
import com.azure.resourcemanager.communication.models.LinkNotificationHubParameters;
import com.azure.resourcemanager.communication.models.LinkedNotificationHub;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
import com.azure.resourcemanager.communication.models.RegenerateKeyParameters;
import java.util.Collections;
import java.util.List;
@@ -53,6 +54,10 @@ public Map tags() {
}
}
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
public SystemData systemData() {
return this.innerModel().systemData();
}
@@ -255,6 +260,16 @@ public CommunicationServiceResourceImpl withTags(Map tags) {
}
}
+ public CommunicationServiceResourceImpl withIdentity(ManagedServiceIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateParameters.withIdentity(identity);
+ return this;
+ }
+ }
+
public CommunicationServiceResourceImpl withDataLocation(String dataLocation) {
this.innerModel().withDataLocation(dataLocation);
return this;
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResource.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResource.java
index 7cc8668c737ec..ca45bd70b8be1 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResource.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResource.java
@@ -49,6 +49,13 @@ public interface CommunicationServiceResource {
*/
Map tags();
+ /**
+ * Gets the identity property: Managed service identity (system assigned and/or user assigned identities).
+ *
+ * @return the identity value.
+ */
+ ManagedServiceIdentity identity();
+
/**
* Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
@@ -179,7 +186,10 @@ interface WithResourceGroup {
* for the resource to be created, but also allows for any other optional properties to be specified.
*/
interface WithCreate
- extends DefinitionStages.WithTags, DefinitionStages.WithDataLocation, DefinitionStages.WithLinkedDomains {
+ extends DefinitionStages.WithTags,
+ DefinitionStages.WithIdentity,
+ DefinitionStages.WithDataLocation,
+ DefinitionStages.WithLinkedDomains {
/**
* Executes the create request.
*
@@ -205,6 +215,17 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+ /** The stage of the CommunicationServiceResource definition allowing to specify identity. */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: Managed service identity (system assigned and/or user assigned
+ * identities).
+ *
+ * @param identity Managed service identity (system assigned and/or user assigned identities).
+ * @return the next definition stage.
+ */
+ WithCreate withIdentity(ManagedServiceIdentity identity);
+ }
/** The stage of the CommunicationServiceResource definition allowing to specify dataLocation. */
interface WithDataLocation {
/**
@@ -235,7 +256,7 @@ interface WithLinkedDomains {
CommunicationServiceResource.Update update();
/** The template for CommunicationServiceResource update. */
- interface Update extends UpdateStages.WithTags, UpdateStages.WithLinkedDomains {
+ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithLinkedDomains {
/**
* Executes the update request.
*
@@ -264,6 +285,17 @@ interface WithTags {
*/
Update withTags(Map tags);
}
+ /** The stage of the CommunicationServiceResource update allowing to specify identity. */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: Managed service identity (system assigned and/or user assigned
+ * identities).
+ *
+ * @param identity Managed service identity (system assigned and/or user assigned identities).
+ * @return the next definition stage.
+ */
+ Update withIdentity(ManagedServiceIdentity identity);
+ }
/** The stage of the CommunicationServiceResource update allowing to specify linkedDomains. */
interface WithLinkedDomains {
/**
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResourceUpdate.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResourceUpdate.java
index c7079d69d4587..c3bd658038fc1 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResourceUpdate.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResourceUpdate.java
@@ -19,6 +19,12 @@ public final class CommunicationServiceResourceUpdate extends TaggedResource {
@JsonProperty(value = "properties")
private CommunicationServiceUpdateProperties innerProperties;
+ /*
+ * Managed service identity (system assigned and/or user assigned identities)
+ */
+ @JsonProperty(value = "identity")
+ private ManagedServiceIdentity identity;
+
/** Creates an instance of CommunicationServiceResourceUpdate class. */
public CommunicationServiceResourceUpdate() {
}
@@ -32,6 +38,26 @@ private CommunicationServiceUpdateProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the identity property: Managed service identity (system assigned and/or user assigned identities).
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed service identity (system assigned and/or user assigned identities).
+ *
+ * @param identity the identity value to set.
+ * @return the CommunicationServiceResourceUpdate object itself.
+ */
+ public CommunicationServiceResourceUpdate withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/** {@inheritDoc} */
@Override
public CommunicationServiceResourceUpdate withTags(Map tags) {
@@ -73,5 +99,8 @@ public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
+ if (identity() != null) {
+ identity().validate();
+ }
}
}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/ManagedServiceIdentity.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/ManagedServiceIdentity.java
new file mode 100644
index 0000000000000..9325a9bc01781
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/ManagedServiceIdentity.java
@@ -0,0 +1,143 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+import java.util.UUID;
+
+/** Managed service identity (system assigned and/or user assigned identities). */
+@Fluent
+public final class ManagedServiceIdentity {
+ /*
+ * The service principal ID of the system assigned identity. This property will only be provided for a system
+ * assigned identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID principalId;
+
+ /*
+ * The tenant ID of the system assigned identity. This property will only be provided for a system assigned
+ * identity.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID tenantId;
+
+ /*
+ * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
+ */
+ @JsonProperty(value = "type", required = true)
+ private ManagedServiceIdentityType type;
+
+ /*
+ * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys
+ * will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ * The dictionary values can be empty objects ({}) in requests.
+ */
+ @JsonProperty(value = "userAssignedIdentities")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map userAssignedIdentities;
+
+ /** Creates an instance of ManagedServiceIdentity class. */
+ public ManagedServiceIdentity() {
+ }
+
+ /**
+ * Get the principalId property: The service principal ID of the system assigned identity. This property will only
+ * be provided for a system assigned identity.
+ *
+ * @return the principalId value.
+ */
+ public UUID principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for
+ * a system assigned identity.
+ *
+ * @return the tenantId value.
+ */
+ public UUID tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are
+ * allowed).
+ *
+ * @return the type value.
+ */
+ public ManagedServiceIdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are
+ * allowed).
+ *
+ * @param type the type value to set.
+ * @return the ManagedServiceIdentity object itself.
+ */
+ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The
+ * userAssignedIdentities dictionary keys will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ * The dictionary values can be empty objects ({}) in requests.
+ *
+ * @return the userAssignedIdentities value.
+ */
+ public Map userAssignedIdentities() {
+ return this.userAssignedIdentities;
+ }
+
+ /**
+ * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The
+ * userAssignedIdentities dictionary keys will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ * The dictionary values can be empty objects ({}) in requests.
+ *
+ * @param userAssignedIdentities the userAssignedIdentities value to set.
+ * @return the ManagedServiceIdentity object itself.
+ */
+ public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) {
+ this.userAssignedIdentities = userAssignedIdentities;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (type() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity"));
+ }
+ if (userAssignedIdentities() != null) {
+ userAssignedIdentities()
+ .values()
+ .forEach(
+ e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class);
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/ManagedServiceIdentityType.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/ManagedServiceIdentityType.java
new file mode 100644
index 0000000000000..c90c7855684f9
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/ManagedServiceIdentityType.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */
+public final class ManagedServiceIdentityType extends ExpandableStringEnum {
+ /** Static value None for ManagedServiceIdentityType. */
+ public static final ManagedServiceIdentityType NONE = fromString("None");
+
+ /** Static value SystemAssigned for ManagedServiceIdentityType. */
+ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned");
+
+ /** Static value UserAssigned for ManagedServiceIdentityType. */
+ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned");
+
+ /** Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. */
+ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED =
+ fromString("SystemAssigned,UserAssigned");
+
+ /**
+ * Creates a new instance of ManagedServiceIdentityType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ManagedServiceIdentityType() {
+ }
+
+ /**
+ * Creates or finds a ManagedServiceIdentityType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ManagedServiceIdentityType.
+ */
+ @JsonCreator
+ public static ManagedServiceIdentityType fromString(String name) {
+ return fromString(name, ManagedServiceIdentityType.class);
+ }
+
+ /**
+ * Gets known ManagedServiceIdentityType values.
+ *
+ * @return known ManagedServiceIdentityType values.
+ */
+ public static Collection values() {
+ return values(ManagedServiceIdentityType.class);
+ }
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/UserAssignedIdentity.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/UserAssignedIdentity.java
new file mode 100644
index 0000000000000..5cd6538ebbb33
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/UserAssignedIdentity.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.UUID;
+
+/** User assigned identity properties. */
+@Immutable
+public final class UserAssignedIdentity {
+ /*
+ * The principal ID of the assigned identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID principalId;
+
+ /*
+ * The client ID of the assigned identity.
+ */
+ @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID clientId;
+
+ /** Creates an instance of UserAssignedIdentity class. */
+ public UserAssignedIdentity() {
+ }
+
+ /**
+ * Get the principalId property: The principal ID of the assigned identity.
+ *
+ * @return the principalId value.
+ */
+ public UUID principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the clientId property: The client ID of the assigned identity.
+ *
+ * @return the clientId value.
+ */
+ public UUID clientId() {
+ return this.clientId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilitySamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilitySamples.java
index 94d25eeb44ee7..029494fa3a09d 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilitySamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilitySamples.java
@@ -9,7 +9,7 @@
/** Samples for CommunicationServices CheckNameAvailability. */
public final class CommunicationServicesCheckNameAvailabilitySamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/checkNameAvailabilityAvailable.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/checkNameAvailabilityAvailable.json
*/
/**
* Sample code: Check name availability available.
@@ -28,7 +28,7 @@ public static void checkNameAvailabilityAvailable(
}
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/checkNameAvailabilityUnavailable.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/checkNameAvailabilityUnavailable.json
*/
/**
* Sample code: Check name availability unavailable.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateSamples.java
index 0094fee116b30..fe4c71d205556 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateSamples.java
@@ -4,10 +4,13 @@
package com.azure.resourcemanager.communication.generated;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentityType;
+
/** Samples for CommunicationServices CreateOrUpdate. */
public final class CommunicationServicesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/createOrUpdate.json
*/
/**
* Sample code: Create or update resource.
@@ -23,4 +26,24 @@ public static void createOrUpdateResource(com.azure.resourcemanager.communicatio
.withDataLocation("United States")
.create();
}
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/createOrUpdateWithSystemAssignedIdentity.json
+ */
+ /**
+ * Sample code: Create or update resource with managed identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void createOrUpdateResourceWithManagedIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager
+ .communicationServices()
+ .define("MyCommunicationResource")
+ .withRegion("Global")
+ .withExistingResourceGroup("MyResourceGroup")
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED))
+ .withDataLocation("United States")
+ .create();
+ }
}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteSamples.java
index 8ac2049c40f73..03526ba4ed8e1 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for CommunicationServices Delete. */
public final class CommunicationServicesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/delete.json
*/
/**
* Sample code: Delete resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupSamples.java
index ae2f31ce3496a..865fb583db3ac 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for CommunicationServices GetByResourceGroup. */
public final class CommunicationServicesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/get.json
*/
/**
* Sample code: Get resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubSamples.java
index 518ca5e3831b9..89a42fe43155d 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubSamples.java
@@ -9,7 +9,7 @@
/** Samples for CommunicationServices LinkNotificationHub. */
public final class CommunicationServicesLinkNotificationHubSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/linkNotificationHub.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/linkNotificationHub.json
*/
/**
* Sample code: Link notification hub.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupSamples.java
index 615f4b7a44fa7..cbf3e0e798230 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for CommunicationServices ListByResourceGroup. */
public final class CommunicationServicesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listByResourceGroup.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/listByResourceGroup.json
*/
/**
* Sample code: List by resource group.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListKeysSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListKeysSamples.java
index af3882ca22ca9..3a07133eb2434 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListKeysSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListKeysSamples.java
@@ -7,7 +7,7 @@
/** Samples for CommunicationServices ListKeys. */
public final class CommunicationServicesListKeysSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listKeys.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/listKeys.json
*/
/**
* Sample code: List keys.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListSamples.java
index 6eb24ffb78ec5..2722680aea8e2 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for CommunicationServices List. */
public final class CommunicationServicesListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listBySubscription.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/listBySubscription.json
*/
/**
* Sample code: List by subscription.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesRegenerateKeySamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesRegenerateKeySamples.java
index 70e7cb613a711..8f73c99425b4f 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesRegenerateKeySamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesRegenerateKeySamples.java
@@ -10,7 +10,7 @@
/** Samples for CommunicationServices RegenerateKey. */
public final class CommunicationServicesRegenerateKeySamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/regenerateKey.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/regenerateKey.json
*/
/**
* Sample code: Regenerate key.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesUpdateSamples.java
index efde62cb7f859..77acbd865e592 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesUpdateSamples.java
@@ -5,13 +5,16 @@
package com.azure.resourcemanager.communication.generated;
import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.communication.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
/** Samples for CommunicationServices Update. */
public final class CommunicationServicesUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/update.json
*/
/**
* Sample code: Update resource.
@@ -28,6 +31,104 @@ public static void updateResource(com.azure.resourcemanager.communication.Commun
resource.update().withTags(mapOf("newTag", "newVal")).apply();
}
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateWithUserAssignedIdentity.json
+ */
+ /**
+ * Sample code: Update resource to add a User Assigned managed identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToAddAUserAssignedManagedIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ManagedServiceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(mapOf("/user/assigned/resource/id", new UserAssignedIdentity())))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateWithSystemAssignedIdentity.json
+ */
+ /**
+ * Sample code: Update resource to add a System Assigned managed identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToAddASystemAssignedManagedIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateRemoveSystemIdentity.json
+ */
+ /**
+ * Sample code: Update resource to remove identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToRemoveIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateWithSystemAndUserIdentity.json
+ */
+ /**
+ * Sample code: Update resource to add System and User managed identities.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToAddSystemAndUserManagedIdentities(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
+ .withUserAssignedIdentities(mapOf("/user/assigned/resource/id", new UserAssignedIdentity())))
+ .apply();
+ }
+
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCancelVerificationSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCancelVerificationSamples.java
index b849132993498..cb65f097e16e3 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCancelVerificationSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCancelVerificationSamples.java
@@ -10,7 +10,7 @@
/** Samples for Domains CancelVerification. */
public final class DomainsCancelVerificationSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/cancelVerification.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/cancelVerification.json
*/
/**
* Sample code: Cancel verification.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateSamples.java
index cec0b60193253..41c82a11b7cea 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateSamples.java
@@ -9,7 +9,7 @@
/** Samples for Domains CreateOrUpdate. */
public final class DomainsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/createOrUpdate.json
*/
/**
* Sample code: Create or update Domains resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsDeleteSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsDeleteSamples.java
index 9f0530177b658..6d207259fdd8f 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsDeleteSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for Domains Delete. */
public final class DomainsDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/delete.json
*/
/**
* Sample code: Delete Domains resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsGetSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsGetSamples.java
index 71e1cc374e189..7251049c1f61b 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsGetSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for Domains Get. */
public final class DomainsGetSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/get.json
*/
/**
* Sample code: Get Domains resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsInitiateVerificationSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsInitiateVerificationSamples.java
index e372b6e96a3b4..88e5072243b3e 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsInitiateVerificationSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsInitiateVerificationSamples.java
@@ -10,7 +10,7 @@
/** Samples for Domains InitiateVerification. */
public final class DomainsInitiateVerificationSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/initiateVerification.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/initiateVerification.json
*/
/**
* Sample code: Initiate verification.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceSamples.java
index 77b7a0a290837..71a1c6aef6506 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceSamples.java
@@ -7,7 +7,7 @@
/** Samples for Domains ListByEmailServiceResource. */
public final class DomainsListByEmailServiceResourceSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/listByEmailService.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/listByEmailService.json
*/
/**
* Sample code: List Domains resources by EmailServiceName.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsUpdateSamples.java
index da4491cb2aafd..8fac76f6b13cd 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsUpdateSamples.java
@@ -10,7 +10,7 @@
/** Samples for Domains Update. */
public final class DomainsUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/update.json
*/
/**
* Sample code: Update Domains resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateSamples.java
index 62bca15965192..4f2dc248c8643 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices CreateOrUpdate. */
public final class EmailServicesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/createOrUpdate.json
*/
/**
* Sample code: Create or update EmailService resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteSamples.java
index bb87e893d4bb7..ec5f1d237a29b 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices Delete. */
public final class EmailServicesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/delete.json
*/
/**
* Sample code: Delete EmailService resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupSamples.java
index 3540747770013..e32e5c02fa48a 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices GetByResourceGroup. */
public final class EmailServicesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/get.json
*/
/**
* Sample code: Get EmailService resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupSamples.java
index 15403da56ebeb..d1bc7f0b7d0c9 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices ListByResourceGroup. */
public final class EmailServicesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/listByResourceGroup.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/listByResourceGroup.json
*/
/**
* Sample code: List EmailService resources by resource group.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListSamples.java
index e9be5022bab3a..1886e863f883f 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices List. */
public final class EmailServicesListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/listBySubscription.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/listBySubscription.json
*/
/**
* Sample code: List EmailService resources by subscription.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsSamples.java
index fb4990f2c8aae..09dc589072694 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices ListVerifiedExchangeOnlineDomains. */
public final class EmailServicesListVerifiedExchangeOnlineDomainsSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/getVerifiedExchangeOnlineDomains.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/getVerifiedExchangeOnlineDomains.json
*/
/**
* Sample code: Get verified Exchange Online domains.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesUpdateSamples.java
index a4aa463e31976..7e06eab36ce61 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesUpdateSamples.java
@@ -11,7 +11,7 @@
/** Samples for EmailServices Update. */
public final class EmailServicesUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/update.json
*/
/**
* Sample code: Update EmailService resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/OperationsListSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/OperationsListSamples.java
index 78a43fc8327e8..4be61c6836612 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/OperationsListSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/OperationsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/operationsList.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/operationsList.json
*/
/**
* Sample code: Operations_List.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateSamples.java
index 2d13fd6fbebf6..ff2eb0b3edf04 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateSamples.java
@@ -7,7 +7,7 @@
/** Samples for SenderUsernames CreateOrUpdate. */
public final class SenderUsernamesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/createOrUpdate.json
*/
/**
* Sample code: Create or update SenderUsernames resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteSamples.java
index bc0b61fe67af9..f07acf6005998 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for SenderUsernames Delete. */
public final class SenderUsernamesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/delete.json
*/
/**
* Sample code: Delete SenderUsernames resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetSamples.java
index cf5f4d1cce8b2..e2730eca8ed6a 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for SenderUsernames Get. */
public final class SenderUsernamesGetSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/get.json
*/
/**
* Sample code: Get SenderUsernames resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsSamples.java
index 939a62d48a91f..a8d26515d24b1 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsSamples.java
@@ -7,7 +7,7 @@
/** Samples for SenderUsernames ListByDomains. */
public final class SenderUsernamesListByDomainsSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/listByDomain.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/listByDomain.json
*/
/**
* Sample code: Get SenderUsernames resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityRequestTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityRequestTests.java
deleted file mode 100644
index 37555586c4370..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityRequestTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.CheckNameAvailabilityRequest;
-import org.junit.jupiter.api.Assertions;
-
-public final class CheckNameAvailabilityRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CheckNameAvailabilityRequest model =
- BinaryData
- .fromString("{\"name\":\"hab\",\"type\":\"pikxwczbyscnpqxu\"}")
- .toObject(CheckNameAvailabilityRequest.class);
- Assertions.assertEquals("hab", model.name());
- Assertions.assertEquals("pikxwczbyscnpqxu", model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CheckNameAvailabilityRequest model =
- new CheckNameAvailabilityRequest().withName("hab").withType("pikxwczbyscnpqxu");
- model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class);
- Assertions.assertEquals("hab", model.name());
- Assertions.assertEquals("pikxwczbyscnpqxu", model.type());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityResponseInnerTests.java
deleted file mode 100644
index b9e34c85d9516..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityResponseInnerTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.CheckNameAvailabilityResponseInner;
-import com.azure.resourcemanager.communication.models.CheckNameAvailabilityReason;
-import org.junit.jupiter.api.Assertions;
-
-public final class CheckNameAvailabilityResponseInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CheckNameAvailabilityResponseInner model =
- BinaryData
- .fromString("{\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"iwbybrkxvdumjg\"}")
- .toObject(CheckNameAvailabilityResponseInner.class);
- Assertions.assertEquals(false, model.nameAvailable());
- Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason());
- Assertions.assertEquals("iwbybrkxvdumjg", model.message());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CheckNameAvailabilityResponseInner model =
- new CheckNameAvailabilityResponseInner()
- .withNameAvailable(false)
- .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS)
- .withMessage("iwbybrkxvdumjg");
- model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class);
- Assertions.assertEquals(false, model.nameAvailable());
- Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason());
- Assertions.assertEquals("iwbybrkxvdumjg", model.message());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicePropertiesTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicePropertiesTests.java
deleted file mode 100644
index 0a7918d5a26b4..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicePropertiesTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.CommunicationServiceProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class CommunicationServicePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CommunicationServiceProperties model =
- BinaryData
- .fromString(
- "{\"provisioningState\":\"Unknown\",\"hostName\":\"kjfkg\",\"dataLocation\":\"awxklr\",\"notificationHubId\":\"lwckbasyypnddhs\",\"version\":\"bacphejko\",\"immutableResourceId\":\"nqgoulzndli\",\"linkedDomains\":[\"qkgfgibma\",\"gakeqsr\"]}")
- .toObject(CommunicationServiceProperties.class);
- Assertions.assertEquals("awxklr", model.dataLocation());
- Assertions.assertEquals("qkgfgibma", model.linkedDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CommunicationServiceProperties model =
- new CommunicationServiceProperties()
- .withDataLocation("awxklr")
- .withLinkedDomains(Arrays.asList("qkgfgibma", "gakeqsr"));
- model = BinaryData.fromObject(model).toObject(CommunicationServiceProperties.class);
- Assertions.assertEquals("awxklr", model.dataLocation());
- Assertions.assertEquals("qkgfgibma", model.linkedDomains().get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceInnerTests.java
deleted file mode 100644
index 0bd0966dface5..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceInnerTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.CommunicationServiceResourceInner;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class CommunicationServiceResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CommunicationServiceResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"provisioningState\":\"Moving\",\"hostName\":\"xxwr\",\"dataLocation\":\"jdous\",\"notificationHubId\":\"qvkoc\",\"version\":\"jdkwtnhxbnjb\",\"immutableResourceId\":\"sqrglssainq\",\"linkedDomains\":[\"nzl\",\"jfm\",\"pee\",\"vmgxsab\"]},\"location\":\"qduujitcjczdz\",\"tags\":{\"wrwjfeu\":\"dhkrwpdappdsbdk\",\"zdatqxhocdg\":\"nhutjeltmrldhugj\"},\"id\":\"ablgphuticndvk\",\"name\":\"ozwyiftyhxhuro\",\"type\":\"ftyxolniw\"}")
- .toObject(CommunicationServiceResourceInner.class);
- Assertions.assertEquals("qduujitcjczdz", model.location());
- Assertions.assertEquals("dhkrwpdappdsbdk", model.tags().get("wrwjfeu"));
- Assertions.assertEquals("jdous", model.dataLocation());
- Assertions.assertEquals("nzl", model.linkedDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CommunicationServiceResourceInner model =
- new CommunicationServiceResourceInner()
- .withLocation("qduujitcjczdz")
- .withTags(mapOf("wrwjfeu", "dhkrwpdappdsbdk", "zdatqxhocdg", "nhutjeltmrldhugj"))
- .withDataLocation("jdous")
- .withLinkedDomains(Arrays.asList("nzl", "jfm", "pee", "vmgxsab"));
- model = BinaryData.fromObject(model).toObject(CommunicationServiceResourceInner.class);
- Assertions.assertEquals("qduujitcjczdz", model.location());
- Assertions.assertEquals("dhkrwpdappdsbdk", model.tags().get("wrwjfeu"));
- Assertions.assertEquals("jdous", model.dataLocation());
- Assertions.assertEquals("nzl", model.linkedDomains().get(0));
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceListTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceListTests.java
deleted file mode 100644
index 5e4447b99145d..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceListTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.CommunicationServiceResourceInner;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResourceList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class CommunicationServiceResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CommunicationServiceResourceList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Running\",\"hostName\":\"mkkvnip\",\"dataLocation\":\"oxzjnchgejspod\",\"notificationHubId\":\"ilzyd\",\"version\":\"o\",\"immutableResourceId\":\"yahux\",\"linkedDomains\":[]},\"location\":\"mqnjaqw\",\"tags\":{\"gjvw\":\"sprozvcput\",\"dvpjhulsuuvmk\":\"fdatsc\",\"jdpvwryo\":\"ozkrwfndiodjpslw\"},\"id\":\"psoacctazakljl\",\"name\":\"hbcryffdfdosyge\",\"type\":\"paojakhmsbzjh\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"hostName\":\"dphlxaolt\",\"dataLocation\":\"qtrgqjbpfzfsinzg\",\"notificationHubId\":\"cjrwzoxxjtfellu\",\"version\":\"zitonpeqfpjkjl\",\"immutableResourceId\":\"fpdvhpfxxypi\",\"linkedDomains\":[]},\"location\":\"mayhuybbkpodepoo\",\"tags\":{\"eotusivyevc\":\"uvamiheognarxzxt\",\"un\":\"iqihn\",\"fygxgispemvtzfk\":\"bwjzr\"},\"id\":\"fublj\",\"name\":\"fxqeof\",\"type\":\"aeqjhqjbasvms\"}],\"nextLink\":\"qulngsntnbybkzgc\"}")
- .toObject(CommunicationServiceResourceList.class);
- Assertions.assertEquals("mqnjaqw", model.value().get(0).location());
- Assertions.assertEquals("sprozvcput", model.value().get(0).tags().get("gjvw"));
- Assertions.assertEquals("oxzjnchgejspod", model.value().get(0).dataLocation());
- Assertions.assertEquals("qulngsntnbybkzgc", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CommunicationServiceResourceList model =
- new CommunicationServiceResourceList()
- .withValue(
- Arrays
- .asList(
- new CommunicationServiceResourceInner()
- .withLocation("mqnjaqw")
- .withTags(
- mapOf(
- "gjvw",
- "sprozvcput",
- "dvpjhulsuuvmk",
- "fdatsc",
- "jdpvwryo",
- "ozkrwfndiodjpslw"))
- .withDataLocation("oxzjnchgejspod")
- .withLinkedDomains(Arrays.asList()),
- new CommunicationServiceResourceInner()
- .withLocation("mayhuybbkpodepoo")
- .withTags(
- mapOf("eotusivyevc", "uvamiheognarxzxt", "un", "iqihn", "fygxgispemvtzfk", "bwjzr"))
- .withDataLocation("qtrgqjbpfzfsinzg")
- .withLinkedDomains(Arrays.asList())))
- .withNextLink("qulngsntnbybkzgc");
- model = BinaryData.fromObject(model).toObject(CommunicationServiceResourceList.class);
- Assertions.assertEquals("mqnjaqw", model.value().get(0).location());
- Assertions.assertEquals("sprozvcput", model.value().get(0).tags().get("gjvw"));
- Assertions.assertEquals("oxzjnchgejspod", model.value().get(0).dataLocation());
- Assertions.assertEquals("qulngsntnbybkzgc", model.nextLink());
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceUpdateTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceUpdateTests.java
deleted file mode 100644
index 3fd83c2a26bda..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceUpdateTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResourceUpdate;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class CommunicationServiceResourceUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CommunicationServiceResourceUpdate model =
- BinaryData
- .fromString(
- "{\"properties\":{\"linkedDomains\":[\"qqedqytbciqfou\",\"lmmnkzsmodmglo\"]},\"tags\":{\"wtmutduq\":\"b\",\"spwgcuertumkdosv\":\"ta\"}}")
- .toObject(CommunicationServiceResourceUpdate.class);
- Assertions.assertEquals("b", model.tags().get("wtmutduq"));
- Assertions.assertEquals("qqedqytbciqfou", model.linkedDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CommunicationServiceResourceUpdate model =
- new CommunicationServiceResourceUpdate()
- .withTags(mapOf("wtmutduq", "b", "spwgcuertumkdosv", "ta"))
- .withLinkedDomains(Arrays.asList("qqedqytbciqfou", "lmmnkzsmodmglo"));
- model = BinaryData.fromObject(model).toObject(CommunicationServiceResourceUpdate.class);
- Assertions.assertEquals("b", model.tags().get("wtmutduq"));
- Assertions.assertEquals("qqedqytbciqfou", model.linkedDomains().get(0));
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceUpdatePropertiesTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceUpdatePropertiesTests.java
deleted file mode 100644
index 6c61a876a7cc4..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceUpdatePropertiesTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.CommunicationServiceUpdateProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class CommunicationServiceUpdatePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CommunicationServiceUpdateProperties model =
- BinaryData
- .fromString("{\"linkedDomains\":[\"bmdg\",\"bjf\",\"dgmb\"]}")
- .toObject(CommunicationServiceUpdateProperties.class);
- Assertions.assertEquals("bmdg", model.linkedDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CommunicationServiceUpdateProperties model =
- new CommunicationServiceUpdateProperties().withLinkedDomains(Arrays.asList("bmdg", "bjf", "dgmb"));
- model = BinaryData.fromObject(model).toObject(CommunicationServiceUpdateProperties.class);
- Assertions.assertEquals("bmdg", model.linkedDomains().get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilityWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilityWithResponseMockTests.java
deleted file mode 100644
index 3a7269410ac40..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilityWithResponseMockTests.java
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.CheckNameAvailabilityReason;
-import com.azure.resourcemanager.communication.models.CheckNameAvailabilityResponse;
-import com.azure.resourcemanager.communication.models.NameAvailabilityParameters;
-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 CommunicationServicesCheckNameAvailabilityWithResponseMockTests {
- @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\":\"AlreadyExists\",\"message\":\"eoejzic\"}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CheckNameAvailabilityResponse response =
- manager
- .communicationServices()
- .checkNameAvailabilityWithResponse(
- new NameAvailabilityParameters().withName("mrbpizcdrqj").withType("pyd"),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(true, response.nameAvailable());
- Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason());
- Assertions.assertEquals("eoejzic", response.message());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateMockTests.java
deleted file mode 100644
index e1f67ca8d03a7..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateMockTests.java
+++ /dev/null
@@ -1,92 +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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
-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 CommunicationServicesCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Succeeded\",\"hostName\":\"ids\",\"dataLocation\":\"yonobgl\",\"notificationHubId\":\"cq\",\"version\":\"ccm\",\"immutableResourceId\":\"udxytlmoyrx\",\"linkedDomains\":[\"u\",\"wpzntxhdzh\"]},\"location\":\"qj\",\"tags\":{\"pycanuzbpz\":\"kfrlhrxsbky\"},\"id\":\"afkuwb\",\"name\":\"rnwb\",\"type\":\"ehhseyvjusrts\"}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CommunicationServiceResource response =
- manager
- .communicationServices()
- .define("upedeojnabckhs")
- .withRegion("cnjbkcnxdhbt")
- .withExistingResourceGroup("baiuebbaumny")
- .withTags(mapOf("wpn", "h", "mclfplphoxuscr", "jtoqne"))
- .withDataLocation("tfhvpesapskrdqmh")
- .withLinkedDomains(Arrays.asList("upqsx", "nmic", "kvceoveilovnotyf"))
- .create();
-
- Assertions.assertEquals("qj", response.location());
- Assertions.assertEquals("kfrlhrxsbky", response.tags().get("pycanuzbpz"));
- Assertions.assertEquals("yonobgl", response.dataLocation());
- Assertions.assertEquals("u", response.linkedDomains().get(0));
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteMockTests.java
deleted file mode 100644
index 94e5afc562332..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.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.communication.CommunicationManager;
-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 CommunicationServicesDeleteMockTests {
- @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 = "{}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.communicationServices().delete("bhvgy", "gu", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index b82586ca7f9fb..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
-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 CommunicationServicesGetByResourceGroupWithResponseMockTests {
- @Test
- public void testGetByResourceGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Deleting\",\"hostName\":\"xdbabphlwr\",\"dataLocation\":\"lfktsths\",\"notificationHubId\":\"ocmnyyazttbtwwrq\",\"version\":\"edckzywbiexzfey\",\"immutableResourceId\":\"axibxujw\",\"linkedDomains\":[\"walm\",\"zyoxaepdkzjan\",\"ux\",\"hdwbavxbniwdjs\"]},\"location\":\"tsdbpgn\",\"tags\":{\"pzxbz\":\"x\"},\"id\":\"fzab\",\"name\":\"lcuhxwtctyqiklb\",\"type\":\"ovplw\"}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CommunicationServiceResource response =
- manager
- .communicationServices()
- .getByResourceGroupWithResponse("nrs", "nlqidybyxczf", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("tsdbpgn", response.location());
- Assertions.assertEquals("x", response.tags().get("pzxbz"));
- Assertions.assertEquals("lfktsths", response.dataLocation());
- Assertions.assertEquals("walm", response.linkedDomains().get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubWithResponseMockTests.java
deleted file mode 100644
index c9a3d30efa9f4..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubWithResponseMockTests.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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.LinkNotificationHubParameters;
-import com.azure.resourcemanager.communication.models.LinkedNotificationHub;
-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 CommunicationServicesLinkNotificationHubWithResponseMockTests {
- @Test
- public void testLinkNotificationHubWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"resourceId\":\"ixzbinjeputtmryw\"}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- LinkedNotificationHub response =
- manager
- .communicationServices()
- .linkNotificationHubWithResponse(
- "ifsjttgzfbishcb",
- "hajdeyeamdpha",
- new LinkNotificationHubParameters()
- .withResourceId("alpbuxwgipwhon")
- .withConnectionString("wkgshwa"),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("ixzbinjeputtmryw", response.resourceId());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupMockTests.java
deleted file mode 100644
index dbaf40b565128..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupMockTests.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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
-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 CommunicationServicesListByResourceGroupMockTests {
- @Test
- public void testListByResourceGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"hostName\":\"tbgsncghkj\",\"dataLocation\":\"szzhbijhtxfvgxbf\",\"notificationHubId\":\"xnehmpvec\",\"version\":\"odebfqkkrbmpu\",\"immutableResourceId\":\"riwflzlfb\",\"linkedDomains\":[\"uzycispnqza\"]},\"location\":\"gkbrpyyd\",\"tags\":{\"agnb\":\"nuqqkpikadrgvt\",\"fsiarbutr\":\"ynhijggme\",\"jrunmpxtt\":\"vpnazzm\"},\"id\":\"bh\",\"name\":\"bnlankxmyskpb\",\"type\":\"enbtkcxywny\"}]}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.communicationServices().listByResourceGroup("uujqgidokgjljyo", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("gkbrpyyd", response.iterator().next().location());
- Assertions.assertEquals("nuqqkpikadrgvt", response.iterator().next().tags().get("agnb"));
- Assertions.assertEquals("szzhbijhtxfvgxbf", response.iterator().next().dataLocation());
- Assertions.assertEquals("uzycispnqza", response.iterator().next().linkedDomains().get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListMockTests.java
deleted file mode 100644
index 86afbbd559b64..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListMockTests.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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
-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 CommunicationServicesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"hostName\":\"ftiyqzrnkcq\",\"dataLocation\":\"yx\",\"notificationHubId\":\"hzls\",\"version\":\"ohoqqnwvlryav\",\"immutableResourceId\":\"heun\",\"linkedDomains\":[\"hgyxzkonoc\",\"koklya\",\"uconuqszfkbey\",\"ewrmjmwvvjektc\"]},\"location\":\"enhwlrs\",\"tags\":{\"qdqgbi\":\"zpwv\",\"fcivfsnkym\":\"ylihkaetckt\",\"jf\":\"ctq\",\"fuwutttxf\":\"ebrjcxe\"},\"id\":\"jrbirphxepcyv\",\"name\":\"hfnljkyq\",\"type\":\"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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.communicationServices().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("enhwlrs", response.iterator().next().location());
- Assertions.assertEquals("zpwv", response.iterator().next().tags().get("qdqgbi"));
- Assertions.assertEquals("yx", response.iterator().next().dataLocation());
- Assertions.assertEquals("hgyxzkonoc", response.iterator().next().linkedDomains().get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DnsRecordTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DnsRecordTests.java
deleted file mode 100644
index 9e85b4afcc2cc..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DnsRecordTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.DnsRecord;
-
-public final class DnsRecordTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DnsRecord model =
- BinaryData
- .fromString("{\"type\":\"dxob\",\"name\":\"dxkqpx\",\"value\":\"ajionpimexgstxg\",\"ttl\":1489591694}")
- .toObject(DnsRecord.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DnsRecord model = new DnsRecord();
- model = BinaryData.fromObject(model).toObject(DnsRecord.class);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainPropertiesVerificationRecordsTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainPropertiesVerificationRecordsTests.java
deleted file mode 100644
index 0970c97cc7f04..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainPropertiesVerificationRecordsTests.java
+++ /dev/null
@@ -1,32 +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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.DnsRecord;
-import com.azure.resourcemanager.communication.models.DomainPropertiesVerificationRecords;
-
-public final class DomainPropertiesVerificationRecordsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DomainPropertiesVerificationRecords model =
- BinaryData
- .fromString(
- "{\"Domain\":{\"type\":\"pteehzzv\",\"name\":\"yqrimzin\",\"value\":\"swjdkirso\",\"ttl\":1633669342},\"SPF\":{\"type\":\"crmnohjtckwhds\",\"name\":\"fiyipjxsqwpgrj\",\"value\":\"norcjxvsnbyxqab\",\"ttl\":1299140464},\"DKIM\":{\"type\":\"cyshurzafbljjgp\",\"name\":\"oq\",\"value\":\"mkljavb\",\"ttl\":1581174340},\"DKIM2\":{\"type\":\"ajzyul\",\"name\":\"u\",\"value\":\"krlkhbzhfepg\",\"ttl\":701234104},\"DMARC\":{\"type\":\"zloc\",\"name\":\"c\",\"value\":\"ierhhbcsglummaj\",\"ttl\":1273206758}}")
- .toObject(DomainPropertiesVerificationRecords.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DomainPropertiesVerificationRecords model =
- new DomainPropertiesVerificationRecords()
- .withDomain(new DnsRecord())
- .withSpf(new DnsRecord())
- .withDkim(new DnsRecord())
- .withDkim2(new DnsRecord())
- .withDmarc(new DnsRecord());
- model = BinaryData.fromObject(model).toObject(DomainPropertiesVerificationRecords.class);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceInnerTests.java
deleted file mode 100644
index d37b04f8814bf..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceInnerTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.DomainResourceInner;
-import com.azure.resourcemanager.communication.models.DomainManagement;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DomainResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DomainResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"provisioningState\":\"Running\",\"dataLocation\":\"l\",\"fromSenderDomain\":\"uvfqawrlyxwj\",\"mailFromSenderDomain\":\"prbnwbxgjvtbv\",\"domainManagement\":\"AzureManaged\",\"verificationStates\":{},\"verificationRecords\":{},\"userEngagementTracking\":\"Disabled\"},\"location\":\"uqfprwzw\",\"tags\":{\"a\":\"uitnwuiz\"},\"id\":\"x\",\"name\":\"fizuckyf\",\"type\":\"hr\"}")
- .toObject(DomainResourceInner.class);
- Assertions.assertEquals("uqfprwzw", model.location());
- Assertions.assertEquals("uitnwuiz", model.tags().get("a"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, model.domainManagement());
- Assertions.assertEquals(UserEngagementTracking.DISABLED, model.userEngagementTracking());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DomainResourceInner model =
- new DomainResourceInner()
- .withLocation("uqfprwzw")
- .withTags(mapOf("a", "uitnwuiz"))
- .withDomainManagement(DomainManagement.AZURE_MANAGED)
- .withUserEngagementTracking(UserEngagementTracking.DISABLED);
- model = BinaryData.fromObject(model).toObject(DomainResourceInner.class);
- Assertions.assertEquals("uqfprwzw", model.location());
- Assertions.assertEquals("uitnwuiz", model.tags().get("a"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, model.domainManagement());
- Assertions.assertEquals(UserEngagementTracking.DISABLED, model.userEngagementTracking());
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceListTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceListTests.java
deleted file mode 100644
index 4c7c4261603a3..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceListTests.java
+++ /dev/null
@@ -1,91 +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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.DomainResourceInner;
-import com.azure.resourcemanager.communication.models.DomainManagement;
-import com.azure.resourcemanager.communication.models.DomainResourceList;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DomainResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DomainResourceList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Unknown\",\"dataLocation\":\"jjxhvpmo\",\"fromSenderDomain\":\"xhdzxibqeojnx\",\"mailFromSenderDomain\":\"zvddntwndeicbtwn\",\"domainManagement\":\"AzureManaged\",\"userEngagementTracking\":\"Enabled\"},\"location\":\"hrhcffcyddglmjth\",\"tags\":{\"hix\":\"wpyeicxmqciwqvh\"},\"id\":\"igdtopbob\",\"name\":\"og\",\"type\":\"m\"},{\"properties\":{\"provisioningState\":\"Moving\",\"dataLocation\":\"a\",\"fromSenderDomain\":\"rzayv\",\"mailFromSenderDomain\":\"pgvdf\",\"domainManagement\":\"AzureManaged\",\"userEngagementTracking\":\"Enabled\"},\"location\":\"utqxlngx\",\"tags\":{\"xkrxdqmi\":\"gug\",\"abhjybi\":\"tthzrvqd\",\"ktzlcuiywg\":\"ehoqfbowskan\",\"nhzgpphrcgyn\":\"ywgndrv\"},\"id\":\"ocpecfvmmco\",\"name\":\"fsxlzevgbmqjqa\",\"type\":\"c\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"dataLocation\":\"kwlzuvccfwnfn\",\"fromSenderDomain\":\"cfionl\",\"mailFromSenderDomain\":\"x\",\"domainManagement\":\"CustomerManagedInExchangeOnline\",\"userEngagementTracking\":\"Enabled\"},\"location\":\"dpnqbq\",\"tags\":{\"mpmngnzscxaqwoo\":\"rjfeallnwsubisnj\",\"njeaseipheofloke\":\"hcbonqvpkvlr\",\"enjbdlwtgrhp\":\"y\",\"umasxazjpq\":\"jp\"},\"id\":\"e\",\"name\":\"ualhbxxhejj\",\"type\":\"zvdudgwdslfhotwm\"}],\"nextLink\":\"npwlbjnpg\"}")
- .toObject(DomainResourceList.class);
- Assertions.assertEquals("hrhcffcyddglmjth", model.value().get(0).location());
- Assertions.assertEquals("wpyeicxmqciwqvh", model.value().get(0).tags().get("hix"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, model.value().get(0).domainManagement());
- Assertions.assertEquals(UserEngagementTracking.ENABLED, model.value().get(0).userEngagementTracking());
- Assertions.assertEquals("npwlbjnpg", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DomainResourceList model =
- new DomainResourceList()
- .withValue(
- Arrays
- .asList(
- new DomainResourceInner()
- .withLocation("hrhcffcyddglmjth")
- .withTags(mapOf("hix", "wpyeicxmqciwqvh"))
- .withDomainManagement(DomainManagement.AZURE_MANAGED)
- .withUserEngagementTracking(UserEngagementTracking.ENABLED),
- new DomainResourceInner()
- .withLocation("utqxlngx")
- .withTags(
- mapOf(
- "xkrxdqmi",
- "gug",
- "abhjybi",
- "tthzrvqd",
- "ktzlcuiywg",
- "ehoqfbowskan",
- "nhzgpphrcgyn",
- "ywgndrv"))
- .withDomainManagement(DomainManagement.AZURE_MANAGED)
- .withUserEngagementTracking(UserEngagementTracking.ENABLED),
- new DomainResourceInner()
- .withLocation("dpnqbq")
- .withTags(
- mapOf(
- "mpmngnzscxaqwoo",
- "rjfeallnwsubisnj",
- "njeaseipheofloke",
- "hcbonqvpkvlr",
- "enjbdlwtgrhp",
- "y",
- "umasxazjpq",
- "jp"))
- .withDomainManagement(DomainManagement.CUSTOMER_MANAGED_IN_EXCHANGE_ONLINE)
- .withUserEngagementTracking(UserEngagementTracking.ENABLED)))
- .withNextLink("npwlbjnpg");
- model = BinaryData.fromObject(model).toObject(DomainResourceList.class);
- Assertions.assertEquals("hrhcffcyddglmjth", model.value().get(0).location());
- Assertions.assertEquals("wpyeicxmqciwqvh", model.value().get(0).tags().get("hix"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, model.value().get(0).domainManagement());
- Assertions.assertEquals(UserEngagementTracking.ENABLED, model.value().get(0).userEngagementTracking());
- Assertions.assertEquals("npwlbjnpg", model.nextLink());
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateMockTests.java
deleted file mode 100644
index 15f916194c5f9..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateMockTests.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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.DomainManagement;
-import com.azure.resourcemanager.communication.models.DomainResource;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-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.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 DomainsCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Succeeded\",\"dataLocation\":\"ilpjzuaejxdult\",\"fromSenderDomain\":\"zbbtdzumveek\",\"mailFromSenderDomain\":\"wozuhkf\",\"domainManagement\":\"AzureManaged\",\"verificationStates\":{},\"verificationRecords\":{},\"userEngagementTracking\":\"Enabled\"},\"location\":\"uwaboekqvke\",\"tags\":{\"wyjsflhhcaalnjix\":\"mvb\"},\"id\":\"sxyawjoyaqcs\",\"name\":\"yjpkiidzyexz\",\"type\":\"eli\"}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- DomainResource response =
- manager
- .domains()
- .define("gibtnm")
- .withRegion("qpsrknftguvri")
- .withExistingEmailService("c", "wxzvlvqhjkb")
- .withTags(mapOf("iwwroyqbexrmc", "rwmdyvxqtay", "v", "ibycno", "zhpvgqzcjrvxd", "nmefqsgzvahapj"))
- .withDomainManagement(DomainManagement.CUSTOMER_MANAGED_IN_EXCHANGE_ONLINE)
- .withUserEngagementTracking(UserEngagementTracking.ENABLED)
- .create();
-
- Assertions.assertEquals("uwaboekqvke", response.location());
- Assertions.assertEquals("mvb", response.tags().get("wyjsflhhcaalnjix"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, response.domainManagement());
- Assertions.assertEquals(UserEngagementTracking.ENABLED, response.userEngagementTracking());
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsDeleteMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsDeleteMockTests.java
deleted file mode 100644
index e0c3823adab97..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.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.communication.CommunicationManager;
-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 DomainsDeleteMockTests {
- @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 = "{}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.domains().delete("vo", "bvmeuecivy", "zceuojgjrw", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsGetWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsGetWithResponseMockTests.java
deleted file mode 100644
index 68ea7bc66b6cf..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.DomainManagement;
-import com.azure.resourcemanager.communication.models.DomainResource;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-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 DomainsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Moving\",\"dataLocation\":\"haquhcdh\",\"fromSenderDomain\":\"ualaexqpvfadmw\",\"mailFromSenderDomain\":\"crgvxpvgom\",\"domainManagement\":\"CustomerManagedInExchangeOnline\",\"verificationStates\":{},\"verificationRecords\":{},\"userEngagementTracking\":\"Disabled\"},\"location\":\"k\",\"tags\":{\"uhashsfwx\":\"liourqhak\"},\"id\":\"sowzxcugi\",\"name\":\"jooxdjebw\",\"type\":\"ucww\"}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- DomainResource response =
- manager
- .domains()
- .getWithResponse("hspkdeemao", "mx", "gkvtmelmqkrhah", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("k", response.location());
- Assertions.assertEquals("liourqhak", response.tags().get("uhashsfwx"));
- Assertions.assertEquals(DomainManagement.CUSTOMER_MANAGED_IN_EXCHANGE_ONLINE, response.domainManagement());
- Assertions.assertEquals(UserEngagementTracking.DISABLED, response.userEngagementTracking());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceMockTests.java
deleted file mode 100644
index 3517d71c7da71..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceMockTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.DomainManagement;
-import com.azure.resourcemanager.communication.models.DomainResource;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-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 DomainsListByEmailServiceResourceMockTests {
- @Test
- public void testListByEmailServiceResource() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Moving\",\"dataLocation\":\"rjaw\",\"fromSenderDomain\":\"wgxhn\",\"mailFromSenderDomain\":\"kxfbkpycgklwndn\",\"domainManagement\":\"AzureManaged\",\"verificationStates\":{},\"verificationRecords\":{},\"userEngagementTracking\":\"Disabled\"},\"location\":\"ujznb\",\"tags\":{\"ualupjmkh\":\"wuwprzqlv\"},\"id\":\"xobbcswsrt\",\"name\":\"riplrbpbewtg\",\"type\":\"fgb\"}]}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.domains().listByEmailServiceResource("ueiotwmcdyt", "x", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("ujznb", response.iterator().next().location());
- Assertions.assertEquals("wuwprzqlv", response.iterator().next().tags().get("ualupjmkh"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, response.iterator().next().domainManagement());
- Assertions.assertEquals(UserEngagementTracking.DISABLED, response.iterator().next().userEngagementTracking());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicePropertiesTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicePropertiesTests.java
deleted file mode 100644
index bd3f360c4b948..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicePropertiesTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.EmailServiceProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmailServicePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmailServiceProperties model =
- BinaryData
- .fromString("{\"provisioningState\":\"Failed\",\"dataLocation\":\"ofqweykhmenevfye\"}")
- .toObject(EmailServiceProperties.class);
- Assertions.assertEquals("ofqweykhmenevfye", model.dataLocation());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmailServiceProperties model = new EmailServiceProperties().withDataLocation("ofqweykhmenevfye");
- model = BinaryData.fromObject(model).toObject(EmailServiceProperties.class);
- Assertions.assertEquals("ofqweykhmenevfye", model.dataLocation());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceInnerTests.java
deleted file mode 100644
index 474d8fb685408..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceInnerTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.EmailServiceResourceInner;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmailServiceResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmailServiceResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"provisioningState\":\"Creating\",\"dataLocation\":\"dehxnltyfsoppu\"},\"location\":\"esnzwde\",\"tags\":{\"qvudwxdndnvowgu\":\"vorxzdmohct\"},\"id\":\"jugwdkcglhsl\",\"name\":\"zj\",\"type\":\"yggdtjixh\"}")
- .toObject(EmailServiceResourceInner.class);
- Assertions.assertEquals("esnzwde", model.location());
- Assertions.assertEquals("vorxzdmohct", model.tags().get("qvudwxdndnvowgu"));
- Assertions.assertEquals("dehxnltyfsoppu", model.dataLocation());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmailServiceResourceInner model =
- new EmailServiceResourceInner()
- .withLocation("esnzwde")
- .withTags(mapOf("qvudwxdndnvowgu", "vorxzdmohct"))
- .withDataLocation("dehxnltyfsoppu");
- model = BinaryData.fromObject(model).toObject(EmailServiceResourceInner.class);
- Assertions.assertEquals("esnzwde", model.location());
- Assertions.assertEquals("vorxzdmohct", model.tags().get("qvudwxdndnvowgu"));
- Assertions.assertEquals("dehxnltyfsoppu", model.dataLocation());
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceListTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceListTests.java
deleted file mode 100644
index 57a6fbef2430c..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceListTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.EmailServiceResourceInner;
-import com.azure.resourcemanager.communication.models.EmailServiceResourceList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmailServiceResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmailServiceResourceList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"dataLocation\":\"ypvhezrkg\"},\"location\":\"c\",\"tags\":{\"jpkcattpng\":\"fovgmkqsleyyvxy\",\"czsqpjhvm\":\"cr\"},\"id\":\"ajvnysounqe\",\"name\":\"a\",\"type\":\"oaeupfhyhltrpmo\"},{\"properties\":{\"provisioningState\":\"Updating\",\"dataLocation\":\"matuok\"},\"location\":\"fu\",\"tags\":{\"zydagfuaxbezyiuo\":\"odsfcpkvxodpuozm\",\"dxwzywqsmbsurexi\":\"ktwh\",\"yocf\":\"o\"},\"id\":\"fksymddystki\",\"name\":\"uxh\",\"type\":\"yudxorrqnbp\"}],\"nextLink\":\"zvyifqrvkdvj\"}")
- .toObject(EmailServiceResourceList.class);
- Assertions.assertEquals("c", model.value().get(0).location());
- Assertions.assertEquals("fovgmkqsleyyvxy", model.value().get(0).tags().get("jpkcattpng"));
- Assertions.assertEquals("ypvhezrkg", model.value().get(0).dataLocation());
- Assertions.assertEquals("zvyifqrvkdvj", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmailServiceResourceList model =
- new EmailServiceResourceList()
- .withValue(
- Arrays
- .asList(
- new EmailServiceResourceInner()
- .withLocation("c")
- .withTags(mapOf("jpkcattpng", "fovgmkqsleyyvxy", "czsqpjhvm", "cr"))
- .withDataLocation("ypvhezrkg"),
- new EmailServiceResourceInner()
- .withLocation("fu")
- .withTags(
- mapOf(
- "zydagfuaxbezyiuo",
- "odsfcpkvxodpuozm",
- "dxwzywqsmbsurexi",
- "ktwh",
- "yocf",
- "o"))
- .withDataLocation("matuok")))
- .withNextLink("zvyifqrvkdvj");
- model = BinaryData.fromObject(model).toObject(EmailServiceResourceList.class);
- Assertions.assertEquals("c", model.value().get(0).location());
- Assertions.assertEquals("fovgmkqsleyyvxy", model.value().get(0).tags().get("jpkcattpng"));
- Assertions.assertEquals("ypvhezrkg", model.value().get(0).dataLocation());
- Assertions.assertEquals("zvyifqrvkdvj", model.nextLink());
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceUpdateTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceUpdateTests.java
deleted file mode 100644
index 52fb8eebf1eca..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceUpdateTests.java
+++ /dev/null
@@ -1,41 +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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.EmailServiceResourceUpdate;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmailServiceResourceUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmailServiceResourceUpdate model =
- BinaryData
- .fromString("{\"tags\":{\"vdcsitynn\":\"hybcibv\",\"f\":\"amdecte\"}}")
- .toObject(EmailServiceResourceUpdate.class);
- Assertions.assertEquals("hybcibv", model.tags().get("vdcsitynn"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmailServiceResourceUpdate model =
- new EmailServiceResourceUpdate().withTags(mapOf("vdcsitynn", "hybcibv", "f", "amdecte"));
- model = BinaryData.fromObject(model).toObject(EmailServiceResourceUpdate.class);
- Assertions.assertEquals("hybcibv", model.tags().get("vdcsitynn"));
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateMockTests.java
deleted file mode 100644
index d47143470ef77..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateMockTests.java
+++ /dev/null
@@ -1,89 +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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.EmailServiceResource;
-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.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 EmailServicesCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Succeeded\",\"dataLocation\":\"xsrz\"},\"location\":\"ucerscdntnevfi\",\"tags\":{\"weriofzpyqsem\":\"ygtdsslswt\",\"zhedplvwiw\":\"abnetshh\",\"tppjflcx\":\"bmwmbesldnkw\"},\"id\":\"gaokonzmnsikv\",\"name\":\"kqze\",\"type\":\"qkdltfz\"}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- EmailServiceResource response =
- manager
- .emailServices()
- .define("enq")
- .withRegion("gnayqigynduh")
- .withExistingResourceGroup("ewgdrjervn")
- .withTags(mapOf("maqolbgycduie", "qlkth", "qlfmmdnbb", "tgccymvaolpss", "wyhzdx", "lzpswiydm"))
- .withDataLocation("ndoygmifthnzdnd")
- .create();
-
- Assertions.assertEquals("ucerscdntnevfi", response.location());
- Assertions.assertEquals("ygtdsslswt", response.tags().get("weriofzpyqsem"));
- Assertions.assertEquals("xsrz", response.dataLocation());
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteMockTests.java
deleted file mode 100644
index 14e2e71271b2f..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.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.communication.CommunicationManager;
-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 EmailServicesDeleteMockTests {
- @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 = "{}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.emailServices().delete("ol", "dahzxctobg", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index f01056acf094b..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupWithResponseMockTests.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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.EmailServiceResource;
-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 EmailServicesGetByResourceGroupWithResponseMockTests {
- @Test
- public void testGetByResourceGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Unknown\",\"dataLocation\":\"napnyiropuhpigv\"},\"location\":\"ylgqgitxmedjvcsl\",\"tags\":{\"rmgucnap\":\"wwncwzzhxgk\",\"oellwp\":\"t\"},\"id\":\"fdygpfqbuaceopz\",\"name\":\"qrhhu\",\"type\":\"opppcqeq\"}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- EmailServiceResource response =
- manager
- .emailServices()
- .getByResourceGroupWithResponse("hnrztfol", "bnxknalaulppg", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("ylgqgitxmedjvcsl", response.location());
- Assertions.assertEquals("wwncwzzhxgk", response.tags().get("rmgucnap"));
- Assertions.assertEquals("napnyiropuhpigv", response.dataLocation());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupMockTests.java
deleted file mode 100644
index 1ad18c57622a9..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupMockTests.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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.EmailServiceResource;
-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 EmailServicesListByResourceGroupMockTests {
- @Test
- public void testListByResourceGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"dataLocation\":\"blmpewww\"},\"location\":\"krvrns\",\"tags\":{\"ohxcrsbfova\":\"q\",\"sub\":\"rruvwbhsq\",\"rxbpyb\":\"gjb\",\"twss\":\"rfbjf\"},\"id\":\"t\",\"name\":\"tpvjzbexilzznfqq\",\"type\":\"vwpm\"}]}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.emailServices().listByResourceGroup("bhsfxob", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("krvrns", response.iterator().next().location());
- Assertions.assertEquals("q", response.iterator().next().tags().get("ohxcrsbfova"));
- Assertions.assertEquals("blmpewww", response.iterator().next().dataLocation());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListMockTests.java
deleted file mode 100644
index be39c0c45424e..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListMockTests.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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.EmailServiceResource;
-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 EmailServicesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Unknown\",\"dataLocation\":\"oizpostmgrcfbun\"},\"location\":\"fqjhhkxbpvjymj\",\"tags\":{\"n\":\"j\",\"ivkrtsw\":\"u\",\"vjfdx\":\"xqzvszjfa\"},\"id\":\"ivetvtcq\",\"name\":\"qtdo\",\"type\":\"mcbxvwvxysl\"}]}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.emailServices().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("fqjhhkxbpvjymj", response.iterator().next().location());
- Assertions.assertEquals("j", response.iterator().next().tags().get("n"));
- Assertions.assertEquals("oizpostmgrcfbun", response.iterator().next().dataLocation());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsWithResponseMockTests.java
deleted file mode 100644
index be22aa33f87bf..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsWithResponseMockTests.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.communication.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.communication.CommunicationManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.List;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class EmailServicesListVerifiedExchangeOnlineDomainsWithResponseMockTests {
- @Test
- public void testListVerifiedExchangeOnlineDomainsWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "[\"aruoujmkcjhwqyt\",\"r\",\"bnw\"]";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- List response =
- manager
- .emailServices()
- .listVerifiedExchangeOnlineDomainsWithResponse(com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("aruoujmkcjhwqyt", response.get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkNotificationHubParametersTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkNotificationHubParametersTests.java
deleted file mode 100644
index b7a54e7129c6a..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkNotificationHubParametersTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.LinkNotificationHubParameters;
-import org.junit.jupiter.api.Assertions;
-
-public final class LinkNotificationHubParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LinkNotificationHubParameters model =
- BinaryData
- .fromString("{\"resourceId\":\"tfwvukxgaudc\",\"connectionString\":\"snhsjcnyejhkryh\"}")
- .toObject(LinkNotificationHubParameters.class);
- Assertions.assertEquals("tfwvukxgaudc", model.resourceId());
- Assertions.assertEquals("snhsjcnyejhkryh", model.connectionString());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LinkNotificationHubParameters model =
- new LinkNotificationHubParameters().withResourceId("tfwvukxgaudc").withConnectionString("snhsjcnyejhkryh");
- model = BinaryData.fromObject(model).toObject(LinkNotificationHubParameters.class);
- Assertions.assertEquals("tfwvukxgaudc", model.resourceId());
- Assertions.assertEquals("snhsjcnyejhkryh", model.connectionString());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkedNotificationHubInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkedNotificationHubInnerTests.java
deleted file mode 100644
index 20918d598ef13..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkedNotificationHubInnerTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.LinkedNotificationHubInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class LinkedNotificationHubInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LinkedNotificationHubInner model =
- BinaryData.fromString("{\"resourceId\":\"apcz\"}").toObject(LinkedNotificationHubInner.class);
- Assertions.assertEquals("apcz", model.resourceId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LinkedNotificationHubInner model = new LinkedNotificationHubInner().withResourceId("apcz");
- model = BinaryData.fromObject(model).toObject(LinkedNotificationHubInner.class);
- Assertions.assertEquals("apcz", model.resourceId());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/NameAvailabilityParametersTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/NameAvailabilityParametersTests.java
deleted file mode 100644
index 52a79ebf0d4b3..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/NameAvailabilityParametersTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.NameAvailabilityParameters;
-import org.junit.jupiter.api.Assertions;
-
-public final class NameAvailabilityParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- NameAvailabilityParameters model =
- BinaryData.fromString("{\"name\":\"a\",\"type\":\"th\"}").toObject(NameAvailabilityParameters.class);
- Assertions.assertEquals("a", model.name());
- Assertions.assertEquals("th", model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- NameAvailabilityParameters model = new NameAvailabilityParameters().withName("a").withType("th");
- model = BinaryData.fromObject(model).toObject(NameAvailabilityParameters.class);
- Assertions.assertEquals("a", model.name());
- Assertions.assertEquals("th", model.type());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationDisplayTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationDisplayTests.java
deleted file mode 100644
index 78298ba9baf19..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.OperationDisplay;
-
-public final class OperationDisplayTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationDisplay model =
- BinaryData
- .fromString(
- "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}")
- .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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationInnerTests.java
deleted file mode 100644
index cde031729811b..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.OperationInner;
-import com.azure.resourcemanager.communication.models.OperationDisplay;
-
-public final class OperationInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationInner model =
- BinaryData
- .fromString(
- "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}")
- .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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationListResultTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationListResultTests.java
deleted file mode 100644
index ffca28052f32d..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.OperationListResult;
-
-public final class OperationListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}")
- .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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationsListMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationsListMockTests.java
deleted file mode 100644
index 5b7abe6d78dc5..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.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\":\"ur\",\"isDataAction\":true,\"display\":{\"provider\":\"nspydptkoenkoukn\",\"resource\":\"dwtiukbldngkp\",\"operation\":\"ipazyxoegukgjnpi\",\"description\":\"gygev\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamePropertiesTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamePropertiesTests.java
deleted file mode 100644
index b105fc3d4bebc..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamePropertiesTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.SenderUsernameProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class SenderUsernamePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SenderUsernameProperties model =
- BinaryData
- .fromString(
- "{\"dataLocation\":\"th\",\"username\":\"vmezy\",\"displayName\":\"hxmzsbbzoggig\",\"provisioningState\":\"Failed\"}")
- .toObject(SenderUsernameProperties.class);
- Assertions.assertEquals("vmezy", model.username());
- Assertions.assertEquals("hxmzsbbzoggig", model.displayName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SenderUsernameProperties model =
- new SenderUsernameProperties().withUsername("vmezy").withDisplayName("hxmzsbbzoggig");
- model = BinaryData.fromObject(model).toObject(SenderUsernameProperties.class);
- Assertions.assertEquals("vmezy", model.username());
- Assertions.assertEquals("hxmzsbbzoggig", model.displayName());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceCollectionTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceCollectionTests.java
deleted file mode 100644
index c7b7f6385d930..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceCollectionTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.SenderUsernameResourceInner;
-import com.azure.resourcemanager.communication.models.SenderUsernameResourceCollection;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class SenderUsernameResourceCollectionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SenderUsernameResourceCollection model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"dataLocation\":\"vvdfwatkpnpul\",\"username\":\"xxbczwtr\",\"displayName\":\"iqzbq\",\"provisioningState\":\"Running\"},\"id\":\"vmyokacspkwl\",\"name\":\"zdobpxjmflbvvnch\",\"type\":\"kcciwwzjuqkhr\"}],\"nextLink\":\"jiwkuofoskghsau\"}")
- .toObject(SenderUsernameResourceCollection.class);
- Assertions.assertEquals("xxbczwtr", model.value().get(0).username());
- Assertions.assertEquals("iqzbq", model.value().get(0).displayName());
- Assertions.assertEquals("jiwkuofoskghsau", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SenderUsernameResourceCollection model =
- new SenderUsernameResourceCollection()
- .withValue(
- Arrays.asList(new SenderUsernameResourceInner().withUsername("xxbczwtr").withDisplayName("iqzbq")))
- .withNextLink("jiwkuofoskghsau");
- model = BinaryData.fromObject(model).toObject(SenderUsernameResourceCollection.class);
- Assertions.assertEquals("xxbczwtr", model.value().get(0).username());
- Assertions.assertEquals("iqzbq", model.value().get(0).displayName());
- Assertions.assertEquals("jiwkuofoskghsau", model.nextLink());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceInnerTests.java
deleted file mode 100644
index 99bef902b3711..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceInnerTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.SenderUsernameResourceInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class SenderUsernameResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SenderUsernameResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"dataLocation\":\"jmvxie\",\"username\":\"uugidyjrrfby\",\"displayName\":\"svexcsonpclhoco\",\"provisioningState\":\"Running\"},\"id\":\"ev\",\"name\":\"eggzfb\",\"type\":\"hfmvfaxkffe\"}")
- .toObject(SenderUsernameResourceInner.class);
- Assertions.assertEquals("uugidyjrrfby", model.username());
- Assertions.assertEquals("svexcsonpclhoco", model.displayName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SenderUsernameResourceInner model =
- new SenderUsernameResourceInner().withUsername("uugidyjrrfby").withDisplayName("svexcsonpclhoco");
- model = BinaryData.fromObject(model).toObject(SenderUsernameResourceInner.class);
- Assertions.assertEquals("uugidyjrrfby", model.username());
- Assertions.assertEquals("svexcsonpclhoco", model.displayName());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index 212a09c80dbcb..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateWithResponseMockTests.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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.SenderUsernameResource;
-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 SenderUsernamesCreateOrUpdateWithResponseMockTests {
- @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\":{\"dataLocation\":\"mpaxmodfvuefywsb\",\"username\":\"fvmwy\",\"displayName\":\"fouyf\",\"provisioningState\":\"Updating\"},\"id\":\"cpwi\",\"name\":\"zvqtmnubexkp\",\"type\":\"ksmond\"}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- SenderUsernameResource response =
- manager
- .senderUsernames()
- .define("ld")
- .withExistingDomain("pkeqdcvdrhvoo", "sotbob", "dopcjwvnh")
- .withUsername("mutwuoe")
- .withDisplayName("pkhjwni")
- .create();
-
- Assertions.assertEquals("fvmwy", response.username());
- Assertions.assertEquals("fouyf", response.displayName());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteWithResponseMockTests.java
deleted file mode 100644
index 78bfab1f04d7f..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteWithResponseMockTests.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.communication.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.communication.CommunicationManager;
-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 SenderUsernamesDeleteWithResponseMockTests {
- @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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .senderUsernames()
- .deleteWithResponse("rwdmhdlxyjrxsa", "afcnih", "wqapnedgfbcvk", "vq", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetWithResponseMockTests.java
deleted file mode 100644
index a30ca5a30f8f5..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetWithResponseMockTests.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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.SenderUsernameResource;
-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 SenderUsernamesGetWithResponseMockTests {
- @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\":{\"dataLocation\":\"sdyhtozfikdowwq\",\"username\":\"uvxzxclvi\",\"displayName\":\"hqzonosggbhcoh\",\"provisioningState\":\"Deleting\"},\"id\":\"jnkaljutiiswacff\",\"name\":\"dkzzewkfvhqcrail\",\"type\":\"pnppfuf\"}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- SenderUsernameResource response =
- manager
- .senderUsernames()
- .getWithResponse("vpbttd", "morppxebmnzbtbh", "pglkf", "ohdneuel", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("uvxzxclvi", response.username());
- Assertions.assertEquals("hqzonosggbhcoh", response.displayName());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsMockTests.java
deleted file mode 100644
index 372cb44685eee..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsMockTests.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.communication.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.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.SenderUsernameResource;
-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 SenderUsernamesListByDomainsMockTests {
- @Test
- public void testListByDomains() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"dataLocation\":\"xndlkzgxhu\",\"username\":\"iplbpodxunkbebxm\",\"displayName\":\"yyntwl\",\"provisioningState\":\"Succeeded\"},\"id\":\"koievseo\",\"name\":\"gqrlltmuwla\",\"type\":\"wzizxbmpgcjefuzm\"}]}";
-
- 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);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .senderUsernames()
- .listByDomains("mhhv", "gureodkwobdag", "tibqdxbxwakb", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("iplbpodxunkbebxm", response.iterator().next().username());
- Assertions.assertEquals("yyntwl", response.iterator().next().displayName());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/TaggedResourceTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/TaggedResourceTests.java
deleted file mode 100644
index c83aa9fb86ca5..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/TaggedResourceTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.TaggedResource;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class TaggedResourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TaggedResource model =
- BinaryData.fromString("{\"tags\":{\"fpfpsalgbquxigj\":\"xppbhtqqro\"}}").toObject(TaggedResource.class);
- Assertions.assertEquals("xppbhtqqro", model.tags().get("fpfpsalgbquxigj"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TaggedResource model = new TaggedResource().withTags(mapOf("fpfpsalgbquxigj", "xppbhtqqro"));
- model = BinaryData.fromObject(model).toObject(TaggedResource.class);
- Assertions.assertEquals("xppbhtqqro", model.tags().get("fpfpsalgbquxigj"));
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainPropertiesTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainPropertiesTests.java
deleted file mode 100644
index 0ce9d62a6471b..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainPropertiesTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.UpdateDomainProperties;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-import org.junit.jupiter.api.Assertions;
-
-public final class UpdateDomainPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UpdateDomainProperties model =
- BinaryData.fromString("{\"userEngagementTracking\":\"Disabled\"}").toObject(UpdateDomainProperties.class);
- Assertions.assertEquals(UserEngagementTracking.DISABLED, model.userEngagementTracking());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UpdateDomainProperties model =
- new UpdateDomainProperties().withUserEngagementTracking(UserEngagementTracking.DISABLED);
- model = BinaryData.fromObject(model).toObject(UpdateDomainProperties.class);
- Assertions.assertEquals(UserEngagementTracking.DISABLED, model.userEngagementTracking());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainRequestParametersTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainRequestParametersTests.java
deleted file mode 100644
index 997de43474978..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainRequestParametersTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.UpdateDomainRequestParameters;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class UpdateDomainRequestParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UpdateDomainRequestParameters model =
- BinaryData
- .fromString(
- "{\"properties\":{\"userEngagementTracking\":\"Enabled\"},\"tags\":{\"mcl\":\"jrmvdjwzrlo\",\"jctbza\":\"hijco\",\"sycbkbfk\":\"s\",\"c\":\"ukdkexxppofmxa\"}}")
- .toObject(UpdateDomainRequestParameters.class);
- Assertions.assertEquals("jrmvdjwzrlo", model.tags().get("mcl"));
- Assertions.assertEquals(UserEngagementTracking.ENABLED, model.userEngagementTracking());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UpdateDomainRequestParameters model =
- new UpdateDomainRequestParameters()
- .withTags(mapOf("mcl", "jrmvdjwzrlo", "jctbza", "hijco", "sycbkbfk", "s", "c", "ukdkexxppofmxa"))
- .withUserEngagementTracking(UserEngagementTracking.ENABLED);
- model = BinaryData.fromObject(model).toObject(UpdateDomainRequestParameters.class);
- Assertions.assertEquals("jrmvdjwzrlo", model.tags().get("mcl"));
- Assertions.assertEquals(UserEngagementTracking.ENABLED, model.userEngagementTracking());
- }
-
- @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/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/VerificationParameterTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/VerificationParameterTests.java
deleted file mode 100644
index a50707932d476..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/VerificationParameterTests.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.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.VerificationParameter;
-import com.azure.resourcemanager.communication.models.VerificationType;
-import org.junit.jupiter.api.Assertions;
-
-public final class VerificationParameterTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- VerificationParameter model =
- BinaryData.fromString("{\"verificationType\":\"SPF\"}").toObject(VerificationParameter.class);
- Assertions.assertEquals(VerificationType.SPF, model.verificationType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- VerificationParameter model = new VerificationParameter().withVerificationType(VerificationType.SPF);
- model = BinaryData.fromObject(model).toObject(VerificationParameter.class);
- Assertions.assertEquals(VerificationType.SPF, model.verificationType());
- }
-}